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