summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-06-04 23:34:09 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-04 14:45:54 -0700
commit40dd6f4c3931e58ca18754ecfe9c8da5f2c6f542 (patch)
tree8ffb4d591cda0edb86deaeeae95afda43d14c644 /qt-ui
parent714fdc7ced770c16126fadec2b0bf314e9b4a622 (diff)
downloadsubsurface-40dd6f4c3931e58ca18754ecfe9c8da5f2c6f542.tar.gz
Disclaimer included in the printed diveplan
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index ee0e6f090..99539a0a4 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -41,6 +41,7 @@
#include "about.h"
#include "worldmap-save.h"
#include "updatemanager.h"
+#include "planner.h"
#ifndef NO_PRINTING
#include "printdialog.h"
#endif
@@ -424,13 +425,18 @@ void MainWindow::setPlanNotes(const char *notes)
void MainWindow::printPlan()
{
+ QString diveplan = ui.divePlanOutput->toHtml();
+ QString withDisclaimer = diveplan + QString(disclaimer);
+
QPrinter printer;
QPrintDialog *dialog = new QPrintDialog(&printer, this);
dialog->setWindowTitle(tr("Print runtime table"));
if (dialog->exec() != QDialog::Accepted)
return;
+ ui.divePlanOutput->setHtml(withDisclaimer);
ui.divePlanOutput->print(&printer);
+ ui.divePlanOutput->setHtml(diveplan);
}
void MainWindow::on_actionDivePlanner_triggered()