[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdeui
From: Cristian Tibirna <tibirna () kde ! org>
Date: 2004-05-31 12:55:54
Message-ID: 20040531125554.9884D126CE () office ! kde ! org
[Download RAW message or body]
CVS commit by tibirna:
searchline in the keys dialog, as discussed in http://lists.kde.org/?t=108441047100001&r=1&w=2
M +25 -3 kkeydialog.cpp 1.158
--- kdelibs/kdeui/kkeydialog.cpp #1.157:1.158
@@ -33,4 +33,5 @@
#include <qradiobutton.h>
#include <qregexp.h>
+#include <qtoolbutton.h>
#include <qwhatsthis.h>
@@ -44,4 +45,6 @@
#include <kglobal.h>
#include <kglobalaccel.h>
+#include <kiconloader.h>
+#include <klistviewsearchline.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -292,7 +295,20 @@ void KKeyChooser::initGUI( ActionType ty
QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
- QGridLayout *stackLayout = new QGridLayout(2, 2, 2);
- topLayout->addLayout( stackLayout, 10 );
- stackLayout->setRowStretch( 1, 10 ); // Only list will stretch
+ //
+ // ADD SEARCHLINE
+ //
+ QHBoxLayout* searchLayout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ topLayout->addLayout(searchLayout, 10);
+
+ QToolButton *clearSearch = new QToolButton(this);
+ clearSearch->setTextLabel(i18n("Clear Search"), true);
+ clearSearch->setIconSet(SmallIconSet("locationbar_erase"));
+ searchLayout->addWidget(clearSearch);
+ searchLayout->addWidget(new QLabel(i18n("&Search:"), this));
+ KListViewSearchLine* listViewSearch = new KListViewSearchLine(this);
+ searchLayout->addWidget(listViewSearch);
+
+ connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+
//
@@ -301,6 +317,11 @@ void KKeyChooser::initGUI( ActionType ty
// fill up the split list box with the action/key pairs.
//
+ QGridLayout *stackLayout = new QGridLayout(2, 2, 2);
+ topLayout->addLayout( stackLayout, 10 );
+ stackLayout->setRowStretch( 1, 10 ); // Only list will stretch
+
d->pList = new KListView( this );
d->pList->setFocus();
+ listViewSearch->setListView(d->pList); // Plug into search line
stackLayout->addMultiCellWidget( d->pList, 1, 1, 0, 1 );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic