summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-21 15:52:24 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-22 09:11:50 +0900
commit3661f291a4d88448c3339bdd3c2d3ad8c6090256 (patch)
tree11589481d1430d51548d095389dd63ca1daefbed /qt-ui/profile/profilewidget2.h
parentd73fdbc84b2b258f06fa8f2745f85545ef414624 (diff)
downloadsubsurface-3661f291a4d88448c3339bdd3c2d3ad8c6090256.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.h')
-rw-r--r--qt-ui/profile/profilewidget2.h4
1 files changed, 4 insertions, 0 deletions
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();