diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /khelpcenter/htmlsearch/htmlsearch.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khelpcenter/htmlsearch/htmlsearch.h')
-rw-r--r-- | khelpcenter/htmlsearch/htmlsearch.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/khelpcenter/htmlsearch/htmlsearch.h b/khelpcenter/htmlsearch/htmlsearch.h new file mode 100644 index 000000000..f5568218c --- /dev/null +++ b/khelpcenter/htmlsearch/htmlsearch.h @@ -0,0 +1,64 @@ +#ifndef __HTMLSEARCH_H__ +#define __HTMLSEARCH_H__ + + +#include <qstring.h> +#include <qstringlist.h> + + +class QWidget; +class QProgressDialog; + + +class KProcess; + + +class ProgressDialog; + + +class HTMLSearch : public QObject +{ + Q_OBJECT + +public: + + HTMLSearch(); + + bool generateIndex(QString lang, QWidget *parent=0); + + QString search(QString lang, QString words, QString method="and", int matches=10, + QString format="builtin-long", QString sort="score"); + + +protected slots: + + void htdigStdout(KProcess *proc, char *buffer, int buflen); + void htdigExited(KProcess *proc); + void htmergeExited(KProcess *proc); + void htsearchStdout(KProcess *proc, char *buffer, int buflen); + void htsearchExited(KProcess *proc); + + +protected: + + QString dataPath(const QString& lang); + + bool saveFilesList(const QString& lang); + void scanDir(const QString& dir); + + bool createConfig(const QString& lang); + + +private: + + QStringList _files; + KProcess *_proc; + int _filesToDig, _filesDigged, _filesScanned; + volatile bool _htdigRunning, _htmergeRunning, _htsearchRunning; + QString _searchResult; + ProgressDialog *progress; + +}; + + +#endif |