summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp8
-rw-r--r--qt-ui/mainwindow.h3
-rw-r--r--qt-ui/usermanual.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index e1b9d3e4f..5b4e9b43d 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -38,6 +38,9 @@
#include "about.h"
#include "printdialog.h"
#include "divelogimportdialog.h"
+#ifndef NO_USERMANUAL
+#include "usermanual.h"
+#endif
MainWindow *MainWindow::m_Instance = NULL;
@@ -85,6 +88,9 @@ MainWindow::MainWindow() : QMainWindow(),
ui.layoutWidget->hide();
ui.menuView->removeAction(ui.actionViewGlobe);
#endif
+#ifdef NO_USERMANUAL
+ ui.menuHelp->removeAction(ui.actionUserManual);
+#endif
}
MainWindow::~MainWindow()
@@ -554,10 +560,12 @@ void MainWindow::on_actionAboutSubsurface_triggered()
void MainWindow::on_actionUserManual_triggered()
{
+#ifndef NO_USERMANUAL
if (!helpView) {
helpView = new UserManual();
}
helpView->show();
+#endif
}
QString MainWindow::filter()
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index e249398db..51e03c3b8 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -12,7 +12,6 @@
#include <QUrl>
#include "ui_mainwindow.h"
-#include "usermanual.h"
struct DiveList;
class QSortFilterProxyModel;
@@ -156,7 +155,7 @@ private:
Ui::MainWindow ui;
QAction *actionNextDive;
QAction *actionPreviousDive;
- UserManual *helpView;
+ QMainWindow *helpView;
QTreeView *yearlyStats;
QAbstractItemModel *yearlyStatsModel;
CurrentState state;
diff --git a/qt-ui/usermanual.h b/qt-ui/usermanual.h
index 280ca3896..7692a1143 100644
--- a/qt-ui/usermanual.h
+++ b/qt-ui/usermanual.h
@@ -29,5 +29,4 @@ private:
Ui::UserManual *ui;
void search(QString, QWebPage::FindFlags);
};
-
#endif // USERMANUAL_H