summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/CMakeSetupDialog.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-02-14 23:18:10 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-02-14 23:18:10 (GMT)
commitdf3169273a3333efe8ecb45da51e4c53b5d27fe9 (patch)
tree7972ad42f50bf836d9a8e71ebc7f1f70b8250ee7 /Source/QtDialog/CMakeSetupDialog.cxx
parent1c0595c73fe1fa88b67691794eef8ee10edfc257 (diff)
downloadCMake-df3169273a3333efe8ecb45da51e4c53b5d27fe9.zip
CMake-df3169273a3333efe8ecb45da51e4c53b5d27fe9.tar.gz
CMake-df3169273a3333efe8ecb45da51e4c53b5d27fe9.tar.bz2
ENH: Add shortcut to start search/filter.
A bit of cleanup. Disable tab navigation in cache variable list. Enable home/end keys. BUG: Ensure currently edited values are saved before doing configure.
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 090a137..5a280c9 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -32,6 +32,7 @@
#include <QDragEnterEvent>
#include <QMimeData>
#include <QUrl>
+#include <QShortcut>
#include "QCMake.h"
#include "QCMakeCacheView.h"
@@ -96,6 +97,7 @@ CMakeSetupDialog::CMakeSetupDialog()
this->GenerateAction = ToolsMenu->addAction(tr("&Generate"));
QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
this, SLOT(doGenerate()));
+
QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
QAction* a = HelpMenu->addAction(tr("About"));
@@ -105,6 +107,10 @@ CMakeSetupDialog::CMakeSetupDialog()
QObject::connect(a, SIGNAL(triggered(bool)),
this, SLOT(doHelp()));
+ QShortcut* filterShortcut = new QShortcut(QKeySequence::Find, this);
+ QObject::connect(filterShortcut, SIGNAL(activated()),
+ this, SLOT(startSearch()));
+
this->setAcceptDrops(true);
// get the saved binary directories
@@ -266,6 +272,7 @@ void CMakeSetupDialog::doConfigure()
this->enterState(Configuring);
this->Output->clear();
+ this->CacheValues->selectionModel()->clear();
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
"setProperties", Qt::QueuedConnection,
Q_ARG(QCMakeCachePropertyList,
@@ -829,3 +836,10 @@ void CMakeSetupDialog::addCacheEntry()
}
}
+void CMakeSetupDialog::startSearch()
+{
+ this->Search->setFocus(Qt::OtherFocusReason);
+ this->Search->selectAll();
+}
+
+