diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-17 14:03:37 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-17 14:03:37 +0000 |
commit | 0c3f13d128f366b036a77dfd2d195cbcac8547ba (patch) | |
tree | 02586f27258dfd9103796f7cc8236b9895e52322 /qt-ui/modeldelegates.h | |
parent | 1739042f3431e5b399db0cf49106c98478436a2f (diff) | |
download | subsurface-0c3f13d128f366b036a77dfd2d195cbcac8547ba.tar.gz |
Add the ability to modify the cylinder use in the UI
Thanks to Tomaz for writing a first draft of the delegate.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r-- | qt-ui/modeldelegates.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h index 94ffe0868..173151a4a 100644 --- a/qt-ui/modeldelegates.h +++ b/qt-ui/modeldelegates.h @@ -2,7 +2,7 @@ #define MODELDELEGATES_H #include <QStyledItemDelegate> -class QComboBox; +#include <QComboBox> class QPainter; class DiveListDelegate : public QStyledItemDelegate { @@ -59,6 +59,15 @@ slots: void revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint); }; +class TankUseDelegate : public QStyledItemDelegate { + Q_OBJECT +public: + explicit TankUseDelegate(QObject *parent = 0); + virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; + virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; + virtual void setEditorData(QWidget * editor, const QModelIndex & index) const; +}; + class WSInfoDelegate : public ComboBoxDelegate { Q_OBJECT public: |