changeset 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 be628d261617
children 3ebebd055d3a
files ui/mainwindow.cpp ui/mainwindow.h
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Thu Mar 27 09:06:35 2014 +0100
+++ b/ui/mainwindow.cpp	Thu Mar 27 09:07:24 2014 +0100
@@ -30,6 +30,7 @@
 #include "listupdatedialog.h"
 #include "helpdialog.h"
 #include "aboutdialog.h"
+#include "statusdialog.h"
 
 MainWindow::MainWindow() {
     createActions();
@@ -211,6 +212,7 @@
     mMenuBar->addMenu(mMenu);
     QAction *update = mMenu->addAction(tr("Force Update"));
     QAction *settings = mMenu->addAction(tr("Settings"));
+    QAction *status = mMenu->addAction(tr("Statusdialog"));
     mMenu->addSeparator();
     QAction *help = mMenu->addAction(tr("Help"));
     QAction *about = mMenu->addAction(tr("About"));
@@ -218,6 +220,7 @@
     QAction *quit = mMenu->addAction(tr("Quit"));
     connect(update, SIGNAL(triggered()), this, SLOT(checkUpdates()));
     connect(settings, SIGNAL(triggered()), this, SLOT(showSettings()));
+    connect(status, SIGNAL(triggered()), this, SLOT(showStatus()));
     connect(help, SIGNAL(triggered()), this, SLOT(showHelp()));
     connect(about, SIGNAL(triggered()), this, SLOT(showAbout()));
     connect(quit, SIGNAL(triggered()), qApp, SLOT(quit()));
@@ -309,6 +312,13 @@
     qDebug() << "show settingsdialog";
 }
 
+void MainWindow::showStatus()
+{
+    qDebug() << "show settingsdialog";
+    StatusDialog *status = new StatusDialog(this);
+    status->show();
+}
+
 void MainWindow::showHelp()
 {
     qDebug() << "show helpdialog";
--- a/ui/mainwindow.h	Thu Mar 27 09:06:35 2014 +0100
+++ b/ui/mainwindow.h	Thu Mar 27 09:07:24 2014 +0100
@@ -49,6 +49,7 @@
     /** @brief Trigger the appropiate action depending on the state */
     void messageClicked();
     void showSettings();
+    void showStatus();
     void showHelp();
     void showAbout();
     void showDetails(QListWidgetItem*);

http://wald.intevation.org/projects/trustbridge/