diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-23 18:40:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-23 21:36:33 -0700 |
commit | 01a3bd2cc6dcc035607cce61285ed9cc8d807b9b (patch) | |
tree | b263322c484290a41af33fa74521f03349cf9cca /qt-ui/modeldelegates.h | |
parent | ecbcd4db4721c9e4a6b4253a5f45f43fa9e80fc7 (diff) | |
download | subsurface-01a3bd2cc6dcc035607cce61285ed9cc8d807b9b.tar.gz |
Add weightsystem delegate to enable editing of weightsystem
This is very much analogous to the way cylinders are implemented.
That means that just like with cylinders, if the user enters a new type
and hits 'tab' before hitting 'enter', Subsurface will crash.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r-- | qt-ui/modeldelegates.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h index eb78d12b6..79fbe297b 100644 --- a/qt-ui/modeldelegates.h +++ b/qt-ui/modeldelegates.h @@ -22,4 +22,13 @@ public: virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; }; +class WSInfoDelegate : public QStyledItemDelegate{ + Q_OBJECT +public: + explicit WSInfoDelegate(QObject* parent = 0); + 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; +}; + #endif |