summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index acf520dd6..4e1f8f2f9 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -55,6 +55,9 @@
#ifndef NO_USERMANUAL
#include "usermanual.h"
#endif
+#ifndef NO_USERSURVEY
+#include "usersurvey.h"
+#endif
#include <QNetworkProxy>
MainWindow *MainWindow::m_Instance = NULL;
@@ -118,6 +121,10 @@ MainWindow::MainWindow() : QMainWindow(),
#ifdef NO_USERMANUAL
ui.menuHelp->removeAction(ui.actionUserManual);
#endif
+#ifdef NO_USERSURVEY
+ ui.menuHelp->removeAction(ui.actionUserSurvey);
+#endif
+
#ifdef NO_PRINTING
ui.menuFile->removeAction(ui.actionPrint);
#endif
@@ -745,6 +752,16 @@ void MainWindow::on_actionUserManual_triggered()
#endif
}
+void MainWindow::on_actionUserSurvey_triggered()
+{
+#ifndef NO_USERSURVEY
+ if(!survey) {
+ survey = new UserSurvey();
+ }
+ survey->show();
+#endif
+}
+
QString MainWindow::filter()
{
QString f;
@@ -945,6 +962,15 @@ void MainWindow::closeEvent(QCloseEvent *event)
}
#endif
+
+#ifndef NO_USERSURVEY
+ if (survey && survey->isVisible()) {
+ survey->close();
+ survey->deleteLater();
+ }
+#endif
+
+
if (unsaved_changes() && (askSaveChanges() == false)) {
event->ignore();
return;