diff options
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 091b9f80c..8dd8db3e3 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -50,11 +50,20 @@ public slots: void setLastStop6m(bool value); void createPlan(); void remove(const QModelIndex& index); + void cancelPlan(); + void createTemporaryPlan(); + void deleteTemporaryPlan(); + +signals: + void planCreated(); + void planCanceled(); private: explicit DivePlannerPointsModel(QObject* parent = 0); struct diveplan diveplan; QVector<divedatapoint> divepoints; + struct dive *tempDive; + void deleteTemporaryPlan(struct divedatapoint *dp); }; class Button : public QObject, public QGraphicsRectItem { @@ -95,16 +104,19 @@ public: qreal percentAt(const QPointF& p); qreal posAtValue(qreal value); void setColor(const QColor& color); + void setTextColor(const QColor& color); private: Qt::Orientation orientation; QList<QGraphicsLineItem*> ticks; + QList<QGraphicsSimpleTextItem*> labels; double min; double max; double interval; double posBegin; double posEnd; double tickSize; + QColor textColor; }; class DivePlannerGraphics : public QGraphicsView { @@ -119,7 +131,6 @@ protected: virtual void mousePressEvent(QMouseEvent* event); virtual void mouseReleaseEvent(QMouseEvent* event); bool isPointOutOfBoundaries(const QPointF& point); - void deleteTemporaryDivePlan(struct divedatapoint* dp); qreal fromPercent(qreal percent, Qt::Orientation orientation); private slots: void keyEscAction(); @@ -133,7 +144,6 @@ private slots: void decreaseTime(); void decreaseDepth();; void createDecoStops(); - void cancelPlan(); void prepareSelectGas(); void selectGas(const QModelIndex& index); void pointInserted(const QModelIndex&, int start, int end); |