_action_open->setIcon(QIcon::fromTheme("document-open",
QIcon(":/icons/document-open.png")));
_action_open->setObjectName(QString::fromUtf8("actionOpen"));
-
_menu_file->addAction(_action_open);
+ _menu_file->addSeparator();
+
+ _action_quit = new QAction(this);
+ _action_quit->setText(QApplication::translate(
+ "MainWindow", "&Quit", 0, QApplication::UnicodeUTF8));
+ _action_quit->setIcon(QIcon::fromTheme("application-exit",
+ QIcon(":/icons/application-exit.png")));
+ _action_quit->setObjectName(QString::fromUtf8("actionQuit"));
+ _menu_file->addAction(_action_quit);
+
// View Menu
_menu_view = new QMenu(_menu_bar);
_menu_view->setTitle(QApplication::translate(
_session.load_file(file_name.toStdString());
}
+void MainWindow::on_actionQuit_triggered()
+{
+ close();
+}
+
void MainWindow::on_actionViewZoomIn_triggered()
{
_view->zoom(1);
QMenuBar *_menu_bar;
QMenu *_menu_file;
QAction *_action_open;
+ QAction *_action_quit;
QMenu *_menu_view;
QAction *_action_view_zoom_in;
private slots:
void on_actionOpen_triggered();
+ void on_actionQuit_triggered();
void on_actionViewZoomIn_triggered();