2 * searchwidget.h - part of the KDE Help Center
4 * Copyright (C) 1999 Matthias Elter (me@kde.org)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef __searchwidget_h__
22 #define __searchwidget_h__
25 #include <QtDBus/QtDBus>
27 #include "docmetainfo.h"
40 class SearchWidget
: public QWidget
43 Q_CLASSINFO("D-Bus Interface", "org.kde.khelpcenter.searchwidget")
46 Q_SCRIPTABLE Q_NOREPLY
void searchIndexUpdated(); // called from kcmhelpcenter
49 explicit SearchWidget ( SearchEngine
*, QWidget
*parent
= 0 );
56 Q3ListView
*listView() { return mScopeListView
; }
58 enum { ScopeDefault
, ScopeAll
, ScopeNone
, ScopeCustom
, ScopeNum
};
60 QString
scopeSelectionLabel( int ) const;
62 void readConfig( KConfig
* );
63 void writeConfig( KConfig
* );
65 int scopeCount() const;
67 SearchEngine
*engine() const { return mEngine
; }
70 void searchResult( const QString
&url
);
71 void scopeCountChanged( int );
72 void showIndexDialog();
75 void slotSwitchBoxes();
76 void scopeSelectionChanged( int );
77 void updateScopeList();
83 void scopeDoubleClicked( Q3ListViewItem
* );
84 void scopeClicked( Q3ListViewItem
* );
89 SearchEngine
*mEngine
;
91 QComboBox
*mMethodCombo
;
92 QComboBox
*mPagesCombo
;
93 QComboBox
*mScopeCombo
;
94 Q3ListView
*mScopeListView
;