mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
1739042f34
commit
0c3f13d128
5 changed files with 53 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue