diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 7 | ||||
-rw-r--r-- | qt-ui/printdialog.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 5b4e9b43d..86d612457 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -36,7 +36,9 @@ #include "simplewidgets.h" #include "diveplanner.h" #include "about.h" +#ifndef NO_PRINTING #include "printdialog.h" +#endif #include "divelogimportdialog.h" #ifndef NO_USERMANUAL #include "usermanual.h" @@ -91,6 +93,9 @@ MainWindow::MainWindow() : QMainWindow(), #ifdef NO_USERMANUAL ui.menuHelp->removeAction(ui.actionUserManual); #endif +#ifdef NO_PRINTING + ui.menuFile->removeAction(ui.actionPrint); +#endif } MainWindow::~MainWindow() @@ -274,9 +279,11 @@ void MainWindow::on_actionExportUDDF_triggered() void MainWindow::on_actionPrint_triggered() { +#ifndef NO_PRINTING PrintDialog dlg(this); dlg.exec(); +#endif } void MainWindow::disableDcShortcuts() diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h index 33cc25f03..32069a278 100644 --- a/qt-ui/printdialog.h +++ b/qt-ui/printdialog.h @@ -29,5 +29,4 @@ slots: void printClicked(); void onPaintRequested(QPrinter *); }; - #endif // PRINTDIALOG_H |