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>
This commit is contained in:
Tomaz Canabrava 2013-06-20 12:33:26 -03:00
parent 88f0f60439
commit beadeffaf5
4 changed files with 30 additions and 0 deletions

View file

@ -50,6 +50,7 @@ HEADERS = \
qt-ui/simplewidgets.h \
qt-ui/subsurfacewebservices.h \
qt-ui/divecomputermanagementdialog.h \
qt-ui/diveplanner.h \
SOURCES = \
@ -85,6 +86,7 @@ SOURCES = \
qt-ui/simplewidgets.cpp \
qt-ui/subsurfacewebservices.cpp \
qt-ui/divecomputermanagementdialog.cpp \
qt-ui/diveplanner.cpp \
$(RESFILE)

11
qt-ui/diveplanner.cpp Normal file
View file

@ -0,0 +1,11 @@
#include "diveplanner.h"
DivePlanner* DivePlanner::instance()
{
static DivePlanner *self = new DivePlanner();
return self;
}
DivePlanner::DivePlanner(QWidget* parent): QGraphicsView(parent)
{
}

14
qt-ui/diveplanner.h Normal file
View file

@ -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

View file

@ -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");
}