Changeset View
Changeset View
Standalone View
Standalone View
src/engine/termgenerator.h
Show All 15 Lines | |||||
16 | * License along with this library; if not, write to the Free Software | 16 | * License along with this library; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | * | 18 | * | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef BALOO_TERMGENERATOR_H | 21 | #ifndef BALOO_TERMGENERATOR_H | ||
22 | #define BALOO_TERMGENERATOR_H | 22 | #define BALOO_TERMGENERATOR_H | ||
23 | 23 | | |||
24 | #include <QByteArray> | ||||
24 | #include <QString> | 25 | #include <QString> | ||
25 | #include "engine_export.h" | 26 | #include "engine_export.h" | ||
26 | #include "document.h" | 27 | #include "document.h" | ||
27 | 28 | | |||
28 | namespace Baloo { | 29 | namespace Baloo { | ||
29 | 30 | | |||
30 | class BALOO_ENGINE_EXPORT TermGenerator | 31 | class BALOO_ENGINE_EXPORT TermGenerator | ||
31 | { | 32 | { | ||
Show All 9 Lines | 33 | public: | |||
41 | 42 | | |||
42 | void indexXattrText(const QString& text, const QByteArray& prefix); | 43 | void indexXattrText(const QString& text, const QByteArray& prefix); | ||
43 | void indexFileNameText(const QString& text); | 44 | void indexFileNameText(const QString& text); | ||
44 | void indexFileNameText(const QString& text, const QByteArray& prefix); | 45 | void indexFileNameText(const QString& text, const QByteArray& prefix); | ||
45 | 46 | | |||
46 | void setPosition(int position); | 47 | void setPosition(int position); | ||
47 | int position() const; | 48 | int position() const; | ||
48 | 49 | | |||
49 | static QStringList termList(const QString& text); | 50 | static QByteArrayList termList(const QString& text); | ||
50 | 51 | | |||
51 | // Trim all terms to this size | 52 | // Trim all terms to this size | ||
52 | const static int maxTermSize = 25; | 53 | const static int maxTermSize = 25; | ||
53 | private: | 54 | private: | ||
54 | Document& m_doc; | 55 | Document& m_doc; | ||
55 | int m_position; | 56 | int m_position; | ||
56 | }; | 57 | }; | ||
57 | } | 58 | } | ||
58 | 59 | | |||
59 | #endif // BALOO_TERMGENERATOR_H | 60 | #endif // BALOO_TERMGENERATOR_H |