Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / khelpcenter / htmlsearch / htmlsearch.h
blobf93cb2b0263f36303c9767d9abb94faf7c88831b
1 #ifndef __HTMLSEARCH_H__
2 #define __HTMLSEARCH_H__
8 class QWidget;
11 class K3Process;
14 class ProgressDialog;
17 class HTMLSearch : public QObject
19 Q_OBJECT
21 public:
23 HTMLSearch();
25 bool generateIndex(const QString & lang, QWidget *parent=0);
27 QString search(const QString & lang, const QString & words, const QString & method="and", int matches=10,
28 const QString & format="builtin-long", const QString & sort="score");
31 protected Q_SLOTS:
33 void htdigStdout(K3Process *proc, char *buffer, int buflen);
34 void htdigExited(K3Process *proc);
35 void htmergeExited(K3Process *proc);
36 void htsearchStdout(K3Process *proc, char *buffer, int buflen);
37 void htsearchExited(K3Process *proc);
40 protected:
42 QString dataPath(const QString& lang);
44 bool saveFilesList(const QString& lang);
45 void scanDir(const QString& dir);
47 bool createConfig(const QString& lang);
50 private:
52 QStringList _files;
53 K3Process *_proc;
54 int _filesToDig, _filesDigged, _filesScanned;
55 volatile bool _htdigRunning, _htmergeRunning, _htsearchRunning;
56 QString _searchResult;
57 ProgressDialog *progress;
62 #endif