diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2007-11-07 15:09:02 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2007-11-07 15:09:02 (GMT) |
commit | 31d4280bf3c1c0b24cd586b17c8d34cdb2f09647 (patch) | |
tree | 32cae121731a2da75c3b63d2706f33c3b6e997a4 /Source/QtDialog/QCMakeCacheView.cxx | |
parent | 696a016444192e49557c4ad747362d925b778538 (diff) | |
download | CMake-31d4280bf3c1c0b24cd586b17c8d34cdb2f09647.zip CMake-31d4280bf3c1c0b24cd586b17c8d34cdb2f09647.tar.gz CMake-31d4280bf3c1c0b24cd586b17c8d34cdb2f09647.tar.bz2 |
BUG: Fix behavior of CMakeSetupDialog::set{Binary|Source}Directory
so they work right when called externally.
Disable the generate button when one hits configure again.
ENH: Some UI tweaks for spacing.
Allow viewing cache values while configure/generate (but not edit).
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.cxx')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index eca2b96..1937f24 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -124,7 +124,8 @@ void QCMakeCacheView::setSearchFilter(const QString& s) } QCMakeCacheModel::QCMakeCacheModel(QObject* p) - : QAbstractTableModel(p), NewCount(0), ModifiedValues(false) + : QAbstractTableModel(p), + NewCount(0), ModifiedValues(false), EditEnabled(true) { } @@ -173,6 +174,16 @@ QCMakeCachePropertyList QCMakeCacheModel::properties() const return this->Properties; } +void QCMakeCacheModel::setEditEnabled(bool e) +{ + this->EditEnabled = e; +} + +bool QCMakeCacheModel::editEnabled() const +{ + return this->EditEnabled; +} + int QCMakeCacheModel::columnCount (const QModelIndex& /*p*/ ) const { return 2; @@ -250,7 +261,7 @@ Qt::ItemFlags QCMakeCacheModel::flags (const QModelIndex& idx) const { Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable; // all column 1's are editable - if(idx.column() == 1) + if(idx.column() == 1 && this->EditEnabled) { f |= Qt::ItemIsEditable; // booleans are editable in place |