summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r--qt-ui/profilegraphics.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h
index a4d943233..c0326ccfa 100644
--- a/qt-ui/profilegraphics.h
+++ b/qt-ui/profilegraphics.h
@@ -5,6 +5,9 @@
#include <QGraphicsView>
#include <QGraphicsItem>
#include <QIcon>
+#include <QDoubleSpinBox>
+#include <QPushButton>
+#include <QGraphicsProxyWidget>
struct text_render_options;
struct graphics_context;
@@ -64,6 +67,20 @@ private:
QIcon icon;
};
+class GraphicsTextEditor : public QGraphicsTextItem{
+ Q_OBJECT
+public:
+ GraphicsTextEditor(QGraphicsItem* parent = 0);
+
+protected:
+ virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event);
+ virtual void keyReleaseEvent(QKeyEvent* event);
+
+signals:
+ void textChanged(const QString& text);
+ void editingFinished(const QString& text);
+};
+
class ProfileGraphicsView : public QGraphicsView
{
Q_OBJECT
@@ -120,6 +137,10 @@ private:
QGraphicsItem* depthMarkers;
QGraphicsItem* diveComputer;
+ // For 'Plan' mode.:
+ GraphicsTextEditor *depthEditor;
+ GraphicsTextEditor *timeEditor;
+
enum Mode mode;
};