diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 11 | ||||
-rw-r--r-- | qt-ui/diveplanner.h | 14 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 3 |
3 files changed, 28 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp new file mode 100644 index 000000000..d8d1bfbfc --- /dev/null +++ b/qt-ui/diveplanner.cpp @@ -0,0 +1,11 @@ +#include "diveplanner.h" + +DivePlanner* DivePlanner::instance() +{ + static DivePlanner *self = new DivePlanner(); + return self; +} + +DivePlanner::DivePlanner(QWidget* parent): QGraphicsView(parent) +{ +} diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h new file mode 100644 index 000000000..9a7d0859f --- /dev/null +++ b/qt-ui/diveplanner.h @@ -0,0 +1,14 @@ +#ifndef DIVEPLANNER_H +#define DIVEPLANNER_H + +#include <QGraphicsView> +#include <QGraphicsPathItem> + +class DivePlanner : public QGraphicsView { + Q_OBJECT +public: + static DivePlanner *instance(); +private: + DivePlanner(QWidget* parent = 0); +}; +#endif diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 06e6b7734..75fb21a64 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -32,6 +32,7 @@ #include "subsurfacewebservices.h" #include "divecomputermanagementdialog.h" #include "simplewidgets.h" +#include "diveplanner.h" static MainWindow* instance = 0; @@ -178,6 +179,8 @@ void MainWindow::on_actionExportUDDF_triggered() void MainWindow::on_actionPrint_triggered() { + // hijacking the print action for a while. + DivePlanner::instance()->show(); qDebug("actionPrint"); } |