subsurface/qt-ui/diveplanner.h
Tomaz Canabrava 46483a096f Better defaults for placement of dive stops.
This patch makes it impossible to create a dive stop
outside of the scene - this, messing the complete
planning system.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-20 13:56:28 -03:00

27 lines
722 B
C++

#ifndef DIVEPLANNER_H
#define DIVEPLANNER_H
#include <QGraphicsView>
#include <QGraphicsPathItem>
class DivePlanner : public QGraphicsView {
Q_OBJECT
public:
static DivePlanner *instance();
protected:
virtual void mouseDoubleClickEvent(QMouseEvent* event);
virtual void showEvent(QShowEvent* event);
virtual void resizeEvent(QResizeEvent* event);
virtual void mouseMoveEvent(QMouseEvent* event);
void clear_generated_deco();
void create_deco_stop();
bool isPointOutOfBoundaries(QPointF point);
private:
DivePlanner(QWidget* parent = 0);
QList<QGraphicsLineItem*> lines;
QList<QGraphicsEllipseItem*> handles;
QGraphicsLineItem *verticalLine;
QGraphicsLineItem *horizontalLine;
};
#endif