Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 212:f7176140d20d
Added menu entry to show the status dialog.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 27 Mar 2014 09:07:24 +0100 |
parents | 9c51c472e596 |
children | 6a7eb102716d |
comparison
equal
deleted
inserted
replaced
211:be628d261617 | 212:f7176140d20d |
---|---|
28 #include "certificatelist.h" | 28 #include "certificatelist.h" |
29 #include "downloader.h" | 29 #include "downloader.h" |
30 #include "listupdatedialog.h" | 30 #include "listupdatedialog.h" |
31 #include "helpdialog.h" | 31 #include "helpdialog.h" |
32 #include "aboutdialog.h" | 32 #include "aboutdialog.h" |
33 #include "statusdialog.h" | |
33 | 34 |
34 MainWindow::MainWindow() { | 35 MainWindow::MainWindow() { |
35 createActions(); | 36 createActions(); |
36 createTrayIcon(); | 37 createTrayIcon(); |
37 createMenuBar(); | 38 createMenuBar(); |
209 mMenuBar = new QMenuBar(this); | 210 mMenuBar = new QMenuBar(this); |
210 QMenu *mMenu = new QMenu(tr("Menu"), mMenuBar); | 211 QMenu *mMenu = new QMenu(tr("Menu"), mMenuBar); |
211 mMenuBar->addMenu(mMenu); | 212 mMenuBar->addMenu(mMenu); |
212 QAction *update = mMenu->addAction(tr("Force Update")); | 213 QAction *update = mMenu->addAction(tr("Force Update")); |
213 QAction *settings = mMenu->addAction(tr("Settings")); | 214 QAction *settings = mMenu->addAction(tr("Settings")); |
215 QAction *status = mMenu->addAction(tr("Statusdialog")); | |
214 mMenu->addSeparator(); | 216 mMenu->addSeparator(); |
215 QAction *help = mMenu->addAction(tr("Help")); | 217 QAction *help = mMenu->addAction(tr("Help")); |
216 QAction *about = mMenu->addAction(tr("About")); | 218 QAction *about = mMenu->addAction(tr("About")); |
217 mMenu->addSeparator(); | 219 mMenu->addSeparator(); |
218 QAction *quit = mMenu->addAction(tr("Quit")); | 220 QAction *quit = mMenu->addAction(tr("Quit")); |
219 connect(update, SIGNAL(triggered()), this, SLOT(checkUpdates())); | 221 connect(update, SIGNAL(triggered()), this, SLOT(checkUpdates())); |
220 connect(settings, SIGNAL(triggered()), this, SLOT(showSettings())); | 222 connect(settings, SIGNAL(triggered()), this, SLOT(showSettings())); |
223 connect(status, SIGNAL(triggered()), this, SLOT(showStatus())); | |
221 connect(help, SIGNAL(triggered()), this, SLOT(showHelp())); | 224 connect(help, SIGNAL(triggered()), this, SLOT(showHelp())); |
222 connect(about, SIGNAL(triggered()), this, SLOT(showAbout())); | 225 connect(about, SIGNAL(triggered()), this, SLOT(showAbout())); |
223 connect(quit, SIGNAL(triggered()), qApp, SLOT(quit())); | 226 connect(quit, SIGNAL(triggered()), qApp, SLOT(quit())); |
224 setMenuBar(mMenuBar); | 227 setMenuBar(mMenuBar); |
225 } | 228 } |
307 void MainWindow::showSettings() | 310 void MainWindow::showSettings() |
308 { | 311 { |
309 qDebug() << "show settingsdialog"; | 312 qDebug() << "show settingsdialog"; |
310 } | 313 } |
311 | 314 |
315 void MainWindow::showStatus() | |
316 { | |
317 qDebug() << "show settingsdialog"; | |
318 StatusDialog *status = new StatusDialog(this); | |
319 status->show(); | |
320 } | |
321 | |
312 void MainWindow::showHelp() | 322 void MainWindow::showHelp() |
313 { | 323 { |
314 qDebug() << "show helpdialog"; | 324 qDebug() << "show helpdialog"; |
315 HelpDialog *help = new HelpDialog(this); | 325 HelpDialog *help = new HelpDialog(this); |
316 help->show(); | 326 help->show(); |