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 QueryRunnable queryrunnable.h <Baloo/QueryRunnable>
21 */
22class BALOO_CORE_EXPORT QueryRunnable : public QObject, public QRunnable
23{
24 Q_OBJECT
25public:
26 QueryRunnable(const Query& query, QObject* parent = nullptr);
27 ~QueryRunnable() override;
28 void run() override;
29
30 void stop();
31
32Q_SIGNALS:
33 void queryResult(Baloo::QueryRunnable* queryRunnable, const QString& filePath);
34 void finished(Baloo::QueryRunnable* queryRunnable);
35
36private:
37 class Private;
38 std::unique_ptr<Private> const d;
39};
40
41}
42
43#endif // QUERYRUNNABLE_H
44

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