diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-03 15:56:37 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-30 10:36:49 -0700 |
commit | 1d6683f3e07d9a73af5fab702bc3a551ec7dabc9 (patch) | |
tree | 80a64ced06489bf0dca866b2097ca7048b1f0ab8 /desktop-widgets/profile/ruleritem.h | |
parent | 50ec7200e66637abefe685e1875f3d4de2101158 (diff) | |
download | subsurface-1d6683f3e07d9a73af5fab702bc3a551ec7dabc9.tar.gz |
Move Profile widget out of desktop-widgets
The reason for that is, even if profile widget is made with qpainter
and for that reason it should be a desktop widget, it's being used
on the mobile version because of a lack of QML plotting library that
is fast and reliable.
We discovered that it was faster just to encapsulate our Profile in
a QML class and call it directly.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/profile/ruleritem.h')
-rw-r--r-- | desktop-widgets/profile/ruleritem.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/desktop-widgets/profile/ruleritem.h b/desktop-widgets/profile/ruleritem.h deleted file mode 100644 index 4fad0451c..000000000 --- a/desktop-widgets/profile/ruleritem.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef RULERITEM_H -#define RULERITEM_H - -#include <QObject> -#include <QGraphicsEllipseItem> -#include <QGraphicsObject> -#include "divecartesianaxis.h" -#include "display.h" - -struct plot_data; -class RulerItem2; - -class RulerNodeItem2 : public QObject, public QGraphicsEllipseItem { - Q_OBJECT - friend class RulerItem2; - -public: - explicit RulerNodeItem2(); - void setRuler(RulerItem2 *r); - void setPlotInfo(struct plot_info &info); - void recalculate(); - -protected: - virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); -private: - struct plot_info pInfo; - struct plot_data *entry; - RulerItem2 *ruler; - DiveCartesianAxis *timeAxis; - DiveCartesianAxis *depthAxis; -}; - -class RulerItem2 : public QObject, public QGraphicsLineItem { - Q_OBJECT -public: - explicit RulerItem2(); - void recalculate(); - - void setPlotInfo(struct plot_info pInfo); - RulerNodeItem2 *sourceNode() const; - RulerNodeItem2 *destNode() const; - void setAxis(DiveCartesianAxis *time, DiveCartesianAxis *depth); - void setVisible(bool visible); - -public -slots: - void settingsChanged(); - -private: - struct plot_info pInfo; - QPointF startPoint, endPoint; - RulerNodeItem2 *source, *dest; - QString text; - DiveCartesianAxis *timeAxis; - DiveCartesianAxis *depthAxis; - QGraphicsRectItem *textItemBack; - QGraphicsSimpleTextItem *textItem; -}; -#endif |