ENH: add completer for the source and binary dir lineedits
Clinton: do I actually have to create separate models for each completer, and a separate completer for each widget, or could the models/completers be used for multiple widgets ? Alex
This commit is contained in:
parent
1d2b5ed440
commit
9520eff2bb
@ -25,6 +25,8 @@
|
|||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QCompleter>
|
||||||
|
#include <QDirModel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
@ -118,6 +120,18 @@ CMakeSetupDialog::CMakeSetupDialog()
|
|||||||
QStringList buildPaths = this->loadBuildPaths();
|
QStringList buildPaths = this->loadBuildPaths();
|
||||||
this->BinaryDirectory->addItems(buildPaths);
|
this->BinaryDirectory->addItems(buildPaths);
|
||||||
|
|
||||||
|
QCompleter* compBinaryDir = new QCompleter(this);
|
||||||
|
QDirModel* modelBinaryDir = new QDirModel(compBinaryDir);
|
||||||
|
modelBinaryDir->setFilter(QDir::NoDotAndDotDot | QDir::Dirs);
|
||||||
|
compBinaryDir->setModel(modelBinaryDir);
|
||||||
|
this->BinaryDirectory->setCompleter(compBinaryDir);
|
||||||
|
QCompleter* compSourceDir = new QCompleter(this);
|
||||||
|
QDirModel* modelSourceDir = new QDirModel(compSourceDir);
|
||||||
|
modelSourceDir->setFilter(QDir::NoDotAndDotDot | QDir::Dirs);
|
||||||
|
compSourceDir->setModel(modelSourceDir);
|
||||||
|
this->SourceDirectory->setCompleter(compSourceDir);
|
||||||
|
|
||||||
|
|
||||||
// start the cmake worker thread
|
// start the cmake worker thread
|
||||||
this->CMakeThread = new QCMakeThread(this);
|
this->CMakeThread = new QCMakeThread(this);
|
||||||
QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()),
|
QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user