diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-09 02:17:14 +0100 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-10 23:14:26 +0100 |
| commit | b8bad8412fb81519640e670f67c610f530011c78 (patch) | |
| tree | 9085baeee2c59aa0c0aa96eff1464317f5d97454 /utils/regtools/qeditor/mainwindow.cpp | |
| parent | a66a5af4db8249b5b86a8126e0fe7a60a6f6338a (diff) | |
| download | rockbox-b8bad8412fb81519640e670f67c610f530011c78.zip rockbox-b8bad8412fb81519640e670f67c610f530011c78.tar.gz rockbox-b8bad8412fb81519640e670f67c610f530011c78.tar.bz2 rockbox-b8bad8412fb81519640e670f67c610f530011c78.tar.xz | |
regtools/qeditor: clean-up
Free the backend when closing a tab to release some memory. Implement about
dialogs.
Change-Id: Ic8c500a23d38e6c3dd4de6a4ba862012925968be
Diffstat (limited to 'utils/regtools/qeditor/mainwindow.cpp')
| -rw-r--r-- | utils/regtools/qeditor/mainwindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/regtools/qeditor/mainwindow.cpp b/utils/regtools/qeditor/mainwindow.cpp index a57ecfb..2ba781b 100644 --- a/utils/regtools/qeditor/mainwindow.cpp +++ b/utils/regtools/qeditor/mainwindow.cpp @@ -34,11 +34,13 @@ MainWindow::MainWindow(Backend *backend) QAction *load_desc_act = new QAction(QIcon::fromTheme("document-open"), tr("&Soc Description"), this); QAction *quit_act = new QAction(QIcon::fromTheme("application-exit"), tr("&Quit"), this); QAction *about_act = new QAction(QIcon::fromTheme("help-about"), tr("&About"), this); + QAction *about_qt_act = new QAction(QIcon::fromTheme("help-about"), tr("About &Qt"), this); connect(new_regtab_act, SIGNAL(triggered()), this, SLOT(OnNewRegTab())); connect(load_desc_act, SIGNAL(triggered()), this, SLOT(OnLoadDesc())); connect(quit_act, SIGNAL(triggered()), this, SLOT(OnQuit())); connect(about_act, SIGNAL(triggered()), this, SLOT(OnAbout())); + connect(about_qt_act, SIGNAL(triggered()), this, SLOT(OnAboutQt())); QMenu *file_menu = menuBar()->addMenu(tr("&File")); QMenu *new_submenu = file_menu->addMenu(QIcon::fromTheme("document-new"), "&New"); @@ -51,6 +53,7 @@ MainWindow::MainWindow(Backend *backend) QMenu *about_menu = menuBar()->addMenu(tr("&About")); about_menu->addAction(about_act); + about_menu->addAction(about_qt_act); m_tab = new MyTabWidget(); @@ -73,11 +76,17 @@ void MainWindow::WriteSettings() void MainWindow::OnQuit() { - WriteSettings(); + close(); } void MainWindow::OnAbout() { + QMessageBox::about(this, "About", "Written by Amaury Pouly for Rockbox"); +} + +void MainWindow::OnAboutQt() +{ + QMessageBox::aboutQt(this); } void MainWindow::closeEvent(QCloseEvent *event) |