diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2009-07-17 18:38:36 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2009-07-17 18:38:36 (GMT) |
commit | 17acf0a310a8f10543c2be9fe902095a5a3c3c1d (patch) | |
tree | 4052fa5cd94ae8131c53db5c4e5ac358c581237d /Source/QtDialog/QCMakeCacheView.h | |
parent | 3250cb3d3b5b4ed60e620ff78cad7fa8fb24113f (diff) | |
download | CMake-17acf0a310a8f10543c2be9fe902095a5a3c3c1d.zip CMake-17acf0a310a8f10543c2be9fe902095a5a3c3c1d.tar.gz CMake-17acf0a310a8f10543c2be9fe902095a5a3c3c1d.tar.bz2 |
ENH: Add a "Show my changes" to the Tools menu.
Changes by the user are recorded and when requested, it shows
-D arguments for commandline or contents for a cache file.
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.h')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h index 77422ec..d5005d0 100644 --- a/Source/QtDialog/QCMakeCacheView.h +++ b/Source/QtDialog/QCMakeCacheView.h @@ -20,6 +20,7 @@ #include "QCMake.h" #include <QTreeView> +#include <QSet> #include <QStandardItemModel> #include <QItemDelegate> @@ -111,6 +112,10 @@ public: // return flags (overloaded to modify flag based on EditEnabled flag) Qt::ItemFlags flags (const QModelIndex& index) const; QModelIndex buddy(const QModelIndex& idx) const; + + // get the data in the model for this property + void getPropertyData(const QModelIndex& idx1, + QCMakeProperty& prop) const; protected: bool EditEnabled; @@ -120,9 +125,6 @@ protected: // set the data in the model for this property void setPropertyData(const QModelIndex& idx1, const QCMakeProperty& p, bool isNew); - // get the data in the model for this property - void getPropertyData(const QModelIndex& idx1, - QCMakeProperty& prop) const; // breaks up he property list into groups // where each group has the same prefix up to the first underscore @@ -147,10 +149,21 @@ public: bool editorEvent (QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index); bool eventFilter(QObject* object, QEvent* event); + void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const; + + QSet<QCMakeProperty> changes() const; + void clearChanges(); + protected slots: void setFileDialogFlag(bool); protected: bool FileDialogFlag; + // record a change to an item in the model. + // this simply saves the item in the set of changes + void recordChange(QAbstractItemModel* model, const QModelIndex& index); + + // properties changed by user via this delegate + QSet<QCMakeProperty> mChanges; }; #endif |