aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.h')
-rw-r--r--qt-ui/configuredivecomputerdialog.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.h b/qt-ui/configuredivecomputerdialog.h
index 941feaa64..84c25406f 100644
--- a/qt-ui/configuredivecomputerdialog.h
+++ b/qt-ui/configuredivecomputerdialog.h
@@ -6,6 +6,27 @@
#include "ui_configuredivecomputerdialog.h"
#include "../libdivecomputer.h"
#include "configuredivecomputer.h"
+#include <QStyledItemDelegate>
+
+class GasTypeComboBoxItemDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ enum computer_type {
+ OSTC3,
+ OSTC,
+ };
+
+ GasTypeComboBoxItemDelegate(QObject *parent = 0, computer_type type = OSTC3);
+ ~GasTypeComboBoxItemDelegate();
+
+ 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:
+ computer_type type;
+};
class ConfigureDiveComputerDialog : public QDialog
{