diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2007-11-03 14:30:52 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2007-11-03 14:30:52 (GMT) |
commit | 77ad85a6ab00959b972f5f2ad86382e2161b92b6 (patch) | |
tree | dffe50dd916306eefcefd39e0f7fb20dc375bc27 /Source/QtDialog/QCMake.cxx | |
parent | c139a096c7cb73a8184b69f20a837d97c00b5a96 (diff) | |
download | CMake-77ad85a6ab00959b972f5f2ad86382e2161b92b6.zip CMake-77ad85a6ab00959b972f5f2ad86382e2161b92b6.tar.gz CMake-77ad85a6ab00959b972f5f2ad86382e2161b92b6.tar.bz2 |
ENH: Add interrupt button near progress bar.
Implement help button.
Implement cancel button.
Add scrollable output window.
Replace ON/OFF & combobox editors with checkboxes.
Tab/backtab in cache table jumps between values (not names and values)
Add tooltips to show help strings.
Add application icon and qtmain for Windows.
BUG: Fix save of cache values on configure.
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index f75050c..a81d6af 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -118,9 +118,17 @@ void QCMake::setProperties(const QCMakeCachePropertyList& props) { if ( it.Find(prop.Key.toAscii().data()) ) { - it.SetValue(prop.Value.toAscii().data()); + if(prop.Value.type() == QVariant::Bool) + { + it.SetValue(prop.Value.toBool() ? "ON" : "OFF"); + } + else + { + it.SetValue(prop.Value.toString().toAscii().data()); + } } } + cachem->SaveCache(this->BinaryDirectory.toAscii().data()); } QCMakeCachePropertyList QCMake::properties() @@ -147,14 +155,7 @@ QCMakeCachePropertyList QCMake::properties() if(i.GetType() == cmCacheManager::BOOL) { prop.Type = QCMakeCacheProperty::BOOL; - if(cmSystemTools::IsOn(prop.Value.toAscii().data())) - { - prop.Value = QString("ON"); - } - else - { - prop.Value = QString("OFF"); - } + prop.Value = cmSystemTools::IsOn(i.GetValue()); } else if(i.GetType() == cmCacheManager::PATH) { @@ -183,7 +184,14 @@ void QCMake::interrupt() void QCMake::progressCallback(const char* msg, float percent, void* cd) { QCMake* self = reinterpret_cast<QCMake*>(cd); - emit self->progressChanged(msg, percent); + if(percent >= 0) + { + emit self->progressChanged(msg, percent); + } + else + { + emit self->outputMessage(msg); + } QCoreApplication::processEvents(); } |