diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 12:33:26 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 12:33:26 -0300 |
commit | beadeffaf51f59a5d587861121f371c14d5dcaff (patch) | |
tree | 7387aeb2387adbbaf2abdab3ae3e230ffe830995 /qt-ui | |
parent | 88f0f604392a354c18cba5d2959519b176b0d919 (diff) | |
download | subsurface-beadeffaf51f59a5d587861121f371c14d5dcaff.tar.gz |
Added the first scope of the visual dive planner.
Added the first files and skeleton code for the visual
dive planner. now I need to fill things. The code is
using the print action borrowed, this will need to move
to a better choice in the future.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
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"); } |