1 | /* This file is part of the KDE project |
2 | Copyright 2008 Dominik Haumann <dhaumann kde org> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. |
7 | |
8 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU Library General Public License |
14 | along with this library; see the file COPYING.LIB. If not, write to |
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
16 | Boston, MA 02110-1301, USA. |
17 | */ |
18 | |
19 | #ifndef KATE_BACKTRACEINDEXER_H |
20 | #define KATE_BACKTRACEINDEXER_H |
21 | |
22 | #include <QThread> |
23 | #include <QString> |
24 | #include <QStringList> |
25 | |
26 | class KateBtDatabase; |
27 | |
28 | class BtFileIndexer : public QThread |
29 | { |
30 | Q_OBJECT |
31 | public: |
32 | BtFileIndexer(KateBtDatabase* db); |
33 | virtual ~BtFileIndexer(); |
34 | void setSearchPaths(const QStringList& urls); |
35 | |
36 | void setFilter(const QStringList& filter); |
37 | |
38 | void cancel(); |
39 | |
40 | protected: |
41 | virtual void run(); |
42 | void indexFiles(const QString& url); |
43 | |
44 | private: |
45 | bool cancelAsap; |
46 | QStringList searchPaths; |
47 | QStringList filter; |
48 | |
49 | KateBtDatabase* db; |
50 | }; |
51 | |
52 | #endif |
53 | |
54 | // kate: space-indent on; indent-width 2; replace-tabs on; |
55 | |