2 Copyright (c) 2000 Matthias Elter <elter@kde.org>
3 Copyright (c) 2004 Daniel Molkentin <molkentin@kde.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 along with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __searchwidget_h__
21 #define __searchwidget_h__
24 #include <Qt3Support/Q3PtrList>
30 class QListWidgetItem
;
32 class KeywordListEntry
35 KeywordListEntry(const QString
& name
, ConfigModule
* module
);
37 void addModule(ConfigModule
* module
);
39 QString
moduleName() { return _name
; }
40 Q3PtrList
<ConfigModule
> modules() { return _modules
; }
44 Q3PtrList
<ConfigModule
> _modules
;
48 class SearchWidget
: public QWidget
53 SearchWidget(QWidget
*parent
);
55 void populateKeywordList(ConfigModuleList
*list
);
58 void moduleSelected(ConfigModule
*);
61 void populateKeyListBox(const QString
& regexp
);
62 void populateResultListBox(const QString
& keyword
);
65 void slotSearchTextChanged(const QString
&);
66 void slotKeywordSelected(const QString
&);
67 void slotModuleSelected(QListWidgetItem
*item
);
68 void slotModuleClicked(QListWidgetItem
*item
);
71 KListWidget
*_keyList
, *_resultList
;
73 Q3PtrList
<KeywordListEntry
> _keywords
;