00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __searchwidget_h__
00022 #define __searchwidget_h__
00023
00024 #include <tqwidget.h>
00025
00026 #include <dcopobject.h>
00027
00028 #include "docmetainfo.h"
00029
00030 class TQCheckBox;
00031 class TQListView;
00032 class TQListViewItem;
00033 class TQComboBox;
00034
00035 class KLanguageCombo;
00036 class KConfig;
00037
00038 class KCMHelpCenter;
00039
00040 namespace KHC {
00041
00042 class ScopeItem;
00043 class SearchEngine;
00044
00045 class SearchWidget : public TQWidget, public DCOPObject
00046 {
00047 Q_OBJECT
00048 K_DCOP
00049
00050 k_dcop:
00051 ASYNC searchIndexUpdated();
00052
00053 public:
00054 SearchWidget ( SearchEngine *, TQWidget *parent = 0 );
00055 ~SearchWidget();
00056
00057 TQString method();
00058 int pages();
00059 TQString scope();
00060
00061 TQListView *listView() { return mScopeListView; }
00062
00063 enum { ScopeDefault, ScopeAll, ScopeNone, ScopeCustom, ScopeNum };
00064
00065 TQString scopeSelectionLabel( int ) const;
00066
00067 void readConfig( KConfig * );
00068 void writeConfig( KConfig * );
00069
00070 int scopeCount() const;
00071
00072 SearchEngine *engine() const { return mEngine; }
00073
00074 signals:
00075 void searchResult( const TQString &url );
00076 void scopeCountChanged( int );
00077 void showIndexDialog();
00078
00079 public slots:
00080 void slotSwitchBoxes();
00081 void scopeSelectionChanged( int );
00082 void updateScopeList();
00083
00084 protected:
00085 void checkScope();
00086
00087 protected slots:
00088 void scopeDoubleClicked( TQListViewItem * );
00089 void scopeClicked( TQListViewItem * );
00090
00091 private:
00092 void loadLanguages();
00093
00094 SearchEngine *mEngine;
00095
00096 TQComboBox *mMethodCombo;
00097 TQComboBox *mPagesCombo;
00098 TQComboBox *mScopeCombo;
00099 TQListView *mScopeListView;
00100
00101 int mScopeCount;
00102 };
00103
00104 }
00105
00106 #endif
00107