summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.h')
-rw-r--r--qt-ui/configuredivecomputerdialog.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.h b/qt-ui/configuredivecomputerdialog.h
index 84c25406f..89efee622 100644
--- a/qt-ui/configuredivecomputerdialog.h
+++ b/qt-ui/configuredivecomputerdialog.h
@@ -8,6 +8,26 @@
#include "configuredivecomputer.h"
#include <QStyledItemDelegate>
+class GasSpinBoxItemDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ enum column_type {
+ PERCENT,
+ DEPTH,
+ };
+
+ GasSpinBoxItemDelegate(QObject *parent = 0, column_type type = PERCENT);
+ ~GasSpinBoxItemDelegate();
+
+ virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
+ virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
+private:
+ column_type type;
+};
+
class GasTypeComboBoxItemDelegate : public QStyledItemDelegate
{
Q_OBJECT