diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-02-27 14:59:41 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 10:48:47 -0800 |
commit | 250653a67f11517acd52fd0e933de03452d96031 (patch) | |
tree | 0167134a7fa5de1c78ac6507091901fb13836e72 /qt-ui/profile/ruleritem.h | |
parent | 52fe9101c8c69fee522385abf5d5e1037f60e59c (diff) | |
download | subsurface-250653a67f11517acd52fd0e933de03452d96031.tar.gz |
New profile: DiveRuler compiles / not working yet.
This patch removes the GC macros and change the calling to use the
DiveCartesianAxis.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/ruleritem.h')
-rw-r--r-- | qt-ui/profile/ruleritem.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/qt-ui/profile/ruleritem.h b/qt-ui/profile/ruleritem.h index 68d6c3180..29b79231d 100644 --- a/qt-ui/profile/ruleritem.h +++ b/qt-ui/profile/ruleritem.h @@ -4,6 +4,7 @@ #include <QObject> #include <QGraphicsEllipseItem> #include <QGraphicsObject> +#include "divecartesianaxis.h" struct plot_data; class RulerItem2; @@ -13,7 +14,7 @@ class RulerNodeItem2 : public QObject, public QGraphicsEllipseItem Q_OBJECT friend class RulerItem2; public: - explicit RulerNodeItem2(QGraphicsItem* parent); + explicit RulerNodeItem2(); void setRuler(RulerItem2 *r); void recalculate(); @@ -21,19 +22,21 @@ protected: QVariant itemChange(GraphicsItemChange change, const QVariant & value ); private: + struct plot_info *pInfo; struct plot_data *entry; RulerItem2* ruler; + DiveCartesianAxis *timeAxis; + DiveCartesianAxis *depthAxis; }; class RulerItem2 : public QGraphicsObject { Q_OBJECT public: - explicit RulerItem2(QGraphicsItem* parent, - RulerNodeItem2 *sourceMarker, - RulerNodeItem2 *destMarker); + explicit RulerItem2(); void recalculate(); + void setPlotInfo(struct plot_info *pInfo); RulerNodeItem2* sourceNode() const; RulerNodeItem2* destNode() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * widget = 0); @@ -41,10 +44,13 @@ public: QPainterPath shape() const; private: + struct plot_info *pInfo; QPointF startPoint, endPoint; RulerNodeItem2 *source, *dest; QString text; int height; int paint_direction; + DiveCartesianAxis *timeAxis; + DiveCartesianAxis *depthAxis; }; #endif
\ No newline at end of file |