subsurface/qt-ui/diveplanner.h
Tomaz Canabrava 88e7aa36be Created a cross that follows the mouse on the dive planner.
Created a cross that follows the mouse on the dive planner,
this will help the user to know where it is placing the stop.

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

25 lines
675 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();
private:
DivePlanner(QWidget* parent = 0);
QList<QGraphicsLineItem*> lines;
QList<QGraphicsEllipseItem*> handles;
QGraphicsLineItem *verticalLine;
QGraphicsLineItem *horizontalLine;
};
#endif