diff options
author | 2013-07-18 11:53:47 -0300 | |
---|---|---|
committer | 2013-07-18 11:53:47 -0300 | |
commit | edb1a7adb37639d50b2dc1672adde20d544211c1 (patch) | |
tree | 64c37379092c1acb8b457bffe35530ddf4930558 /qt-ui/modeldelegates.h | |
parent | 9b0a44196c1f619b37450ef77d00aedfdad106ae (diff) | |
download | subsurface-edb1a7adb37639d50b2dc1672adde20d544211c1.tar.gz |
Added the code to revert Weigths when user cancels edition
This is a follow up commit to the previous one that
enabled cancel for cylinders, everything in the commit
log for the cylinders also applyes here.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r-- | qt-ui/modeldelegates.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h index 4ddf53df3..9603d5dce 100644 --- a/qt-ui/modeldelegates.h +++ b/qt-ui/modeldelegates.h @@ -24,6 +24,7 @@ public: virtual bool eventFilter(QObject* object, QEvent* event); public slots: void testActivation(const QString& s); + virtual void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint) = 0; protected: QAbstractItemModel *model; }; @@ -44,6 +45,8 @@ public: explicit WSInfoDelegate(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; +public slots: + void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint); }; #endif |