summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-17 21:20:07 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-17 15:38:48 -0800
commit5945c18c8aeb5ae2c27c00f7409fddf8048b6ec0 (patch)
treed4e75185bc66a18d5ff93de909d2461c12146050 /qt-ui/diveplanner.h
parenta2d6bd5c1df74734ec43a58cda120587ef28a0bd (diff)
downloadsubsurface-5945c18c8aeb5ae2c27c00f7409fddf8048b6ec0.tar.gz
Removed the ugly icons on the visual profile editor
Removed the ugly icons on the visual profile editor and replaced them with the much better looking ones that Luisa designed. This was not a simple search and replace since Luisa's design was a bit more sophisticated. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r--qt-ui/diveplanner.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index bd9b254d1..a310cf045 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -82,10 +82,9 @@ private:
class Button : public QObject, public QGraphicsRectItem {
Q_OBJECT
public:
- explicit Button(QObject* parent = 0);
+ Button(QObject* parent = 0, QGraphicsItem *itemParent = 0);
void setText(const QString& text);
void setPixmap(const QPixmap& pixmap);
-
protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
signals:
@@ -95,6 +94,20 @@ private:
QGraphicsSimpleTextItem *text;
};
+
+class ExpanderGraphics : public QGraphicsRectItem {
+public:
+ ExpanderGraphics(QGraphicsItem *parent = 0);
+
+ QGraphicsPixmapItem *icon;
+ Button *increaseBtn;
+ Button *decreaseBtn;
+private:
+ QGraphicsPixmapItem *bg;
+ QGraphicsPixmapItem *leftWing;
+ QGraphicsPixmapItem *rightWing;
+};
+
class DiveHandler : public QObject, public QGraphicsEllipseItem{
Q_OBJECT
public:
@@ -206,10 +219,8 @@ private:
QGraphicsSimpleTextItem *depthString;
/* Buttons */
- Button *plusTime; // adds 10 minutes to the time ruler.
- Button *plusDepth; // adds 10 meters to the depth ruler.
- Button *lessTime; // remove 10 minutes to the time ruler.
- Button *lessDepth; // remove 10 meters to the depth ruler.
+ ExpanderGraphics *depthHandler;
+ ExpanderGraphics *timeHandler;
int minMinutes; // this holds the minimum duration of the dive.
int dpMaxTime; // this is the time of the dive calculated by the deco.