1/*
2 This file is part of the KDE Baloo Project
3 SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef QUERYRUNNABLE_H
9#define QUERYRUNNABLE_H
10
11#include "query.h"
12#include <QRunnable>
13#include <QObject>
14
15#include <memory>
16
17namespace Baloo {
18
19/*!
20 * \class Baloo::QueryRunnable
21 * \inheaderfile Baloo/QueryRunnable
22 * \inmodule Baloo
23 */
24class BALOO_CORE_EXPORT QueryRunnable : public QObject, public QRunnable
25{
26 Q_OBJECT
27public:
28 /*!
29 *
30 */
31 QueryRunnable(const Query& query, QObject* parent = nullptr);
32 ~QueryRunnable() override;
33 void run() override;
34
35 /*!
36 *
37 */
38 void stop();
39
40Q_SIGNALS:
41 /*!
42 *
43 */
44 void queryResult(Baloo::QueryRunnable* queryRunnable, const QString& filePath);
45
46 /*!
47 *
48 */
49 void finished(Baloo::QueryRunnable* queryRunnable);
50
51private:
52 class Private;
53 std::unique_ptr<Private> const d;
54};
55
56}
57
58#endif // QUERYRUNNABLE_H
59

source code of baloo/src/lib/queryrunnable.h