Changeset View
Changeset View
Standalone View
Standalone View
src/contentlist/ContentListerBase.h
Show All 18 Lines | |||||
19 | * | 19 | * | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef CONTENTLISTERBASE_H | 22 | #ifndef CONTENTLISTERBASE_H | ||
23 | #define CONTENTLISTERBASE_H | 23 | #define CONTENTLISTERBASE_H | ||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | 26 | | |||
27 | class ContentQuery; | ||||
28 | | ||||
27 | class ContentListerBase : public QObject | 29 | class ContentListerBase : public QObject | ||
28 | { | 30 | { | ||
29 | Q_OBJECT | 31 | Q_OBJECT | ||
30 | public: | 32 | public: | ||
31 | explicit ContentListerBase(QObject* parent = nullptr); | 33 | explicit ContentListerBase(QObject* parent = nullptr); | ||
32 | ~ContentListerBase() override; | 34 | ~ContentListerBase() override; | ||
33 | 35 | | |||
34 | virtual void addLocation(QString path); | 36 | Q_SLOT virtual void startSearch(const QList<ContentQuery*>& queries); | ||
35 | virtual void addMimetype(QString mimetype); | | |||
36 | virtual void setSearchString(const QString& searchString); | | |||
37 | virtual void setKnownFiles(QStringList knownFiles); | | |||
38 | Q_SLOT virtual void startSearch(); | | |||
39 | 37 | | |||
40 | Q_SIGNAL void fileFound(const QString& filePath, const QVariantHash& metadata); | 38 | Q_SIGNAL void fileFound(const QString& filePath, const QVariantMap& metadata); | ||
41 | Q_SIGNAL void searchCompleted(); | 39 | Q_SIGNAL void searchCompleted(); | ||
40 | | ||||
41 | static QVariantMap metaDataForFile(const QString& file); | ||||
42 | }; | 42 | }; | ||
43 | 43 | | |||
44 | #endif//CONTENTLISTERBASE_H | 44 | #endif//CONTENTLISTERBASE_H |