From 3661f291a4d88448c3339bdd3c2d3ad8c6090256 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 21 May 2014 15:52:24 -0300 Subject: Enable editing the 'Add dive' from the new profile. This is highly broken in many ways - but it's the right first step. I ported two of the most important methods from the old profile and now if you are in add dive mode, double clicking on the new profile will correctly add a handler on the planned dive. To see and move the handler around, however, you need to activate the old planner. Next step: add the handlers on the new profile. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui/profile/profilewidget2.h') diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h index a5d9eed27..1ba6e5723 100644 --- a/qt-ui/profile/profilewidget2.h +++ b/qt-ui/profile/profilewidget2.h @@ -68,6 +68,7 @@ public: virtual bool eventFilter(QObject *, QEvent *); void setupItem(AbstractProfilePolygonItem *item, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis, DivePlotDataModel *model, int vData, int hData, int zValue); void setPrintMode(bool mode, bool grayscale = false); + bool isPointOutOfBoundaries(const QPointF& point) const; State currentState; public @@ -75,6 +76,8 @@ slots: // Necessary to call from QAction's signals. void settingsChanged(); void setEmptyState(); void setProfileState(); + void setPlanState(); + void setAddState(); void changeGas(); void addBookmark(); void hideEvents(); @@ -88,6 +91,7 @@ protected: virtual void wheelEvent(QWheelEvent *event); virtual void mouseMoveEvent(QMouseEvent *event); virtual void contextMenuEvent(QContextMenuEvent *event); + virtual void mouseDoubleClickEvent(QMouseEvent *event); private: /*methods*/ void fixBackgroundPos(); -- cgit v1.2.3-70-g09d2