Baloo

termgenerator.h
1/*
2 This file is part of the KDE Baloo project.
3 SPDX-FileCopyrightText: 2014-2015 Vishesh Handa <vhanda@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef BALOO_TERMGENERATOR_H
9#define BALOO_TERMGENERATOR_H
10
11#include <QByteArray>
12#include <QString>
13#include "engine_export.h"
14#include "document.h"
15
16namespace Baloo {
17
18class BALOO_ENGINE_EXPORT TermGenerator
19{
20public:
21 explicit TermGenerator(Document& doc);
22
23 void setDocument(Document& doc) {
24 m_doc = doc;
25 }
26
27 void indexText(const QString& text);
28 void indexText(const QString& text, const QByteArray& prefix);
29
30 void indexXattrText(const QString& text, const QByteArray& prefix);
31 void indexFileNameText(const QString& text);
32
33 void setPosition(int position);
34 int position() const;
35
36 static QByteArrayList termList(const QString& text);
37
38 // Trim all terms to this size
39 const static int maxTermSize = 25;
40private:
41 Document& m_doc;
42 int m_position;
43};
44}
45
46#endif // BALOO_TERMGENERATOR_H
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:53:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.