diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 16:05:44 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 16:05:44 -0800 |
commit | f3232b1a6f7ae6ade64071f2166597cb7f04951a (patch) | |
tree | 06a3994c8c06e61133b4b0f0705258c61975d7ea /profile-widget/profilewidget2.h | |
parent | 662e2a0ff3856982e98281de309c5a06b789f4df (diff) | |
download | subsurface-f3232b1a6f7ae6ade64071f2166597cb7f04951a.tar.gz |
Profile: don't compile the desktop specific parts on mobile
When building subsurface-mobile we won't be using all these UI elements,
so let's not build them.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget/profilewidget2.h')
-rw-r--r-- | profile-widget/profilewidget2.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h index dcfc72c17..7b7030a7f 100644 --- a/profile-widget/profilewidget2.h +++ b/profile-widget/profilewidget2.h @@ -81,7 +81,9 @@ public: bool isAddOrPlanner(); double getFontPrintScale(); void setFontPrintScale(double scale); +#ifndef SUBSURFACE_MOBILE void clearHandlers(); +#endif void recalcCeiling(); void setToolTipVisibile(bool visible); State currentState; @@ -103,6 +105,10 @@ slots: // Necessary to call from QAction's signals. void setProfileState(); void setPlanState(); void setAddState(); + void plotPictures(); + void setReplot(bool state); + void replot(dive *d = 0); +#ifndef SUBSURFACE_MOBILE void changeGas(); void addSetpointChange(); void addBookmark(); @@ -114,9 +120,6 @@ slots: // Necessary to call from QAction's signals. void deleteCurrentDC(); void pointInserted(const QModelIndex &parent, int start, int end); void pointsRemoved(const QModelIndex &, int start, int end); - void plotPictures(); - void setReplot(bool state); - void replot(dive *d = 0); /* this is called for every move on the handlers. maybe we can speed up this a bit? */ void recreatePlannedDive(); @@ -131,13 +134,16 @@ slots: // Necessary to call from QAction's signals. void divePlannerHandlerClicked(); void divePlannerHandlerReleased(); +#endif protected: virtual ~ProfileWidget2(); virtual void resizeEvent(QResizeEvent *event); virtual void wheelEvent(QWheelEvent *event); virtual void mouseMoveEvent(QMouseEvent *event); +#ifndef SUBSURFACE_MOBILE virtual void contextMenuEvent(QContextMenuEvent *event); +#endif virtual void mouseDoubleClickEvent(QMouseEvent *event); virtual void mousePressEvent(QMouseEvent *event); virtual void mouseReleaseEvent(QMouseEvent *event); @@ -200,13 +206,16 @@ private: bool isGrayscale; bool printMode; - //specifics for ADD and PLAN - QList<DiveHandler *> handles; QList<QGraphicsSimpleTextItem *> gases; QList<DivePictureItem *> pictures; + + //specifics for ADD and PLAN +#ifndef SUBSURFACE_MOBILE + QList<DiveHandler *> handles; void repositionDiveHandlers(); int fixHandlerIndex(DiveHandler *activeHandler); friend class DiveHandler; +#endif QHash<Qt::Key, QAction *> actionsForKeys; bool shouldCalculateMaxTime; bool shouldCalculateMaxDepth; |