summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r--qt-ui/diveplanner.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 4029a6875..f2073515d 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -5,14 +5,20 @@
#include <QGraphicsPathItem>
#include <QDialog>
-class Button : public QObject, public QGraphicsPixmapItem {
+class Button : public QObject, public QGraphicsRectItem {
Q_OBJECT
public:
explicit Button(QObject* parent = 0);
+ void setText(const QString& text);
+ void setPixmap(const QPixmap& pixmap);
+
protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
signals:
void clicked();
+private:
+ QGraphicsPixmapItem *icon;
+ QGraphicsSimpleTextItem *text;
};
class DiveHandler : public QGraphicsEllipseItem{
@@ -66,6 +72,8 @@ protected:
private slots:
void increaseTime();
void increaseDepth();
+ void okClicked();
+ void cancelClicked();
private:
@@ -86,7 +94,8 @@ private:
Button *plusDepth;
Button *lessTime;
Button *lessDepth;
-
+ Button *okBtn;
+ Button *cancelBtn;
QPointF lastValidPos;
};