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.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 79e3f2c7d..b70bb1ab9 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -15,7 +15,7 @@
#include <QCloseEvent>
#include <QApplication>
#include <QFontMetrics>
-
+#include <QTextBrowser>
#include "divelistview.h"
#include "starwidget.h"
@@ -35,7 +35,7 @@ MainWindow* mainWindow()
return instance;
}
-MainWindow::MainWindow() : ui(new Ui::MainWindow())
+MainWindow::MainWindow() : ui(new Ui::MainWindow()), helpView(0)
{
ui->setupUi(this);
setWindowIcon(QIcon(":subsurface-icon"));
@@ -264,7 +264,11 @@ void MainWindow::on_actionAboutSubsurface_triggered()
void MainWindow::on_actionUserManual_triggered()
{
- qDebug("actionUserManual");
+ if(!helpView){
+ helpView = new QTextBrowser();
+ }
+ helpView->setText(tr("HTML of Help menu here."));
+ helpView->show();
}
QString MainWindow::filter()
@@ -492,6 +496,11 @@ void MainWindow::writeSettings()
void MainWindow::closeEvent(QCloseEvent *event)
{
+ if (helpView && helpView->isVisible()){
+ helpView->close();
+ helpView->deleteLater();
+ }
+
if (unsaved_changes() && (askSaveChanges() == FALSE)) {
event->ignore();
return;