summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-21 23:49:17 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-22 14:41:37 +0900
commitf24f0f3936bff6f61940a543755be03ad6323009 (patch)
treea95c5a72d2ab18954cd193cc120f2e1fbcf5d046 /qt-ui/diveplanner.h
parentf99ccc8ac2ba4ebcf2ae69e03ba9183ea71a0025 (diff)
downloadsubsurface-f24f0f3936bff6f61940a543755be03ad6323009.tar.gz
Good code cleanup on the old DivePlanner code.
All code that was removed already is working on the New Profile, The code that's behind #if 0 means that it still needs to be ported and because of some removal, it was not possible to keep it compiling (mostly the removal of the Ruler class, that is the Axis, on the new profile). The rest of the code that's untouched - most probably will keep that way. The DivePlannerPointsModel is correct and well done, no need to change that, only the Graphics part. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r--qt-ui/diveplanner.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index a61f9520d..24f01c6e5 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -150,45 +150,12 @@ slots:
void changeGas();
};
-class Ruler : public QGraphicsLineItem {
-public:
- Ruler();
- ~Ruler();
- void setMinimum(double minimum);
- void setMaximum(double maximum);
- void setTickInterval(double interval);
- void setOrientation(Qt::Orientation orientation);
- void setTickSize(qreal size);
- void updateTicks();
- double minimum() const;
- double maximum() const;
- qreal valueAt(const QPointF &p);
- qreal percentAt(const QPointF &p);
- qreal posAtValue(qreal value);
- void setColor(const QColor &color);
- void setTextColor(const QColor &color);
- int unitSystem;
-
-private:
- void eraseAll();
-
- Qt::Orientation orientation;
- QList<QGraphicsLineItem *> ticks;
- QList<QGraphicsSimpleTextItem *> labels;
- double min;
- double max;
- double interval;
- double tickSize;
- QColor textColor;
-};
-
class DivePlannerGraphics : public QGraphicsView {
Q_OBJECT
public:
DivePlannerGraphics(QWidget *parent = 0);
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void showEvent(QShowEvent *event);
virtual void resizeEvent(QResizeEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
@@ -212,8 +179,6 @@ slots:
void decreaseTime();
void decreaseDepth();
void drawProfile();
- void pointInserted(const QModelIndex &, int start, int end);
- void pointsRemoved(const QModelIndex &, int start, int end);
private:
void moveActiveHandler(const QPointF &MappedPos, const int pos);
@@ -240,11 +205,9 @@ private:
QGraphicsPolygonItem *diveBg;
/* This is the bottom ruler - the x axis, and it's associated text */
- Ruler *timeLine;
QGraphicsSimpleTextItem *timeString;
/* this is the left ruler, the y axis, and it's associated text. */
- Ruler *depthLine;
QGraphicsSimpleTextItem *depthString;
/* Buttons */