Added the option of opening User Survey form explicitly

Earlier, there was no option for the user to explicitly open the User
Survey form. This has been corrected by placing an option in the "Help"
menu by which the user can explicity open the User Survey form.

Signed-off-by: Nikhil Bharadwaj Gosala <nikhil.gosala@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
nikhil 2014-12-17 09:29:41 +05:30 committed by Dirk Hohndel
parent b72c32da7d
commit 71dbcdc0d6
3 changed files with 34 additions and 1 deletions

View file

@ -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;