diff options
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index a49cdc460..d94ec8561 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -20,6 +20,7 @@ #include <QStringList> #include <QSettings> #include <QShortcut> +#include <QPrintDialog> #include <fcntl.h> #include "divelistview.h" #include "starwidget.h" @@ -419,6 +420,17 @@ void MainWindow::setPlanNotes(const char *notes) ui.divePlanOutput->setHtml(notes); } +void MainWindow::printPlan() +{ + QPrinter printer; + QPrintDialog *dialog = new QPrintDialog(&printer, this); + dialog->setWindowTitle(tr("Print runtime table")); + if (dialog->exec() != QDialog::Accepted) + return; + + ui.divePlanOutput->print(&printer); +} + void MainWindow::on_actionDivePlanner_triggered() { if(!plannerStateClean()) |