autocomplete directories

svn path=/trunk/KDE/kdebase/apps/; revision=1134823
This commit is contained in:
Bernhard Beschow 2010-06-05 12:18:46 +00:00
parent a0a95f3e5d
commit 11e30e184b
2 changed files with 7 additions and 2 deletions

View file

@ -32,6 +32,8 @@
#include <kcalendarsystem.h>
#include <kglobal.h>
#include <kcombobox.h>
#include <kurlcombobox.h>
#include <kurlcompletion.h>
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@ -75,8 +77,10 @@ KfindTabWidget::KfindTabWidget(QWidget *parent)
namedL->setBuddy( nameBox );
namedL->setObjectName( "named" );
namedL->setToolTip( i18n("You can use wildcard matching and \";\" for separating multiple names") );
dirBox = new KComboBox(pages[0]);
dirBox = new KUrlComboBox(KUrlComboBox::Directories, pages[0]);
dirBox->setEditable( true );
dirBox->setCompletionObject(new KUrlCompletion(KUrlCompletion::DirCompletion));
dirBox->setAutoDeleteCompletionObject(true);
dirBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); // allow smaller than widest entry
QLabel * lookinL = new QLabel(i18n("Look &in:"), pages[0]);
lookinL->setBuddy( dirBox );

View file

@ -25,6 +25,7 @@
#include <ktabwidget.h>
#include <kmimetype.h>
class KUrlComboBox;
class QButtonGroup;
class QPushButton;
class QRadioButton;
@ -81,7 +82,7 @@ Q_SIGNALS:
protected:
public:
KComboBox *nameBox;
KComboBox *dirBox;
KUrlComboBox *dirBox;
// for first page
QCheckBox *subdirsCb;
QCheckBox *useLocateCb;