mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Created a class DiveHandle to make drag drop work.
Create d a class DiveHandle to make drag drop works, it has a from and to Lines, and it will move them around. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
1fb023d3c6
commit
021a6a076e
2 changed files with 23 additions and 7 deletions
|
@ -4,6 +4,13 @@
|
|||
#include <QGraphicsView>
|
||||
#include <QGraphicsPathItem>
|
||||
|
||||
class DiveHandler : public QGraphicsEllipseItem{
|
||||
public:
|
||||
DiveHandler();
|
||||
|
||||
QGraphicsLineItem *from;
|
||||
QGraphicsLineItem *to;
|
||||
};
|
||||
class DivePlanner : public QGraphicsView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -16,11 +23,11 @@ protected:
|
|||
void clear_generated_deco();
|
||||
void create_deco_stop();
|
||||
bool isPointOutOfBoundaries(QPointF point);
|
||||
|
||||
|
||||
private:
|
||||
DivePlanner(QWidget* parent = 0);
|
||||
QList<QGraphicsLineItem*> lines;
|
||||
QList<QGraphicsEllipseItem*> handles;
|
||||
QList<DiveHandler *> handles;
|
||||
QGraphicsLineItem *verticalLine;
|
||||
QGraphicsLineItem *horizontalLine;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue