diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2007-11-07 00:25:43 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2007-11-07 00:25:43 (GMT) |
commit | 1e91100599d88ba12dd7a91db17e47d8d9110914 (patch) | |
tree | 6f5e53337315dd750981bcdead388fffb6806efb /Source/QtDialog/QCMakeCacheView.cxx | |
parent | 433a9149108c88d4fb715331f97ee079fa16fe10 (diff) | |
download | CMake-1e91100599d88ba12dd7a91db17e47d8d9110914.zip CMake-1e91100599d88ba12dd7a91db17e47d8d9110914.tar.gz CMake-1e91100599d88ba12dd7a91db17e47d8d9110914.tar.bz2 |
ENH: Disable menu/buttons when doing configure.
Also disable generate until configure is done.
Save more settings (last 10 binary directories, exit after generate,
last generator)
Some UI tweaks for better layout.
Support drag & drop of CMakeLists.txt/CMakeCache.txt files.
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.cxx')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 630afb0..eca2b96 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -124,7 +124,7 @@ void QCMakeCacheView::setSearchFilter(const QString& s) } QCMakeCacheModel::QCMakeCacheModel(QObject* p) - : QAbstractTableModel(p), NewCount(0), IsDirty(false) + : QAbstractTableModel(p), NewCount(0), ModifiedValues(false) { } @@ -132,9 +132,9 @@ QCMakeCacheModel::~QCMakeCacheModel() { } -bool QCMakeCacheModel::isDirty() const +bool QCMakeCacheModel::modifiedValues() const { - return this->IsDirty; + return this->ModifiedValues; } static uint qHash(const QCMakeCacheProperty& p) @@ -164,8 +164,8 @@ void QCMakeCacheModel::setProperties(const QCMakeCachePropertyList& props) qSort(tmp); this->Properties += tmp; + this->ModifiedValues = NewCount != 0; this->reset(); - this->IsDirty = false; } QCMakeCachePropertyList QCMakeCacheModel::properties() const @@ -268,19 +268,19 @@ bool QCMakeCacheModel::setData (const QModelIndex& idx, const QVariant& value, i if(idx.column() == 0 && (role == Qt::DisplayRole || role == Qt::EditRole)) { this->Properties[idx.row()].Key = value.toString(); - this->IsDirty = true; + this->ModifiedValues = true; emit this->dataChanged(idx, idx); } else if(idx.column() == 1 && (role == Qt::DisplayRole || role == Qt::EditRole)) { this->Properties[idx.row()].Value = value.toString(); - this->IsDirty = true; + this->ModifiedValues = true; emit this->dataChanged(idx, idx); } else if(idx.column() == 1 && (role == Qt::CheckStateRole)) { this->Properties[idx.row()].Value = value.toInt() == Qt::Checked; - this->IsDirty = true; + this->ModifiedValues = true; emit this->dataChanged(idx, idx); } return false; |