Changeset View
Changeset View
Standalone View
Standalone View
runners/bookmarks/browsers/chrome.h
Show All 17 Lines | |||||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | 21 | | |||
22 | #ifndef CHROME_H | 22 | #ifndef CHROME_H | ||
23 | #define CHROME_H | 23 | #define CHROME_H | ||
24 | 24 | | |||
25 | #include "browser.h" | 25 | #include "browser.h" | ||
26 | #include "findprofile.h" | | |||
27 | 26 | | |||
28 | #include <QList> | 27 | #include <QList> | ||
29 | | ||||
30 | #include <KDirWatch> | 28 | #include <KDirWatch> | ||
31 | 29 | | |||
32 | class QJsonObject; | | |||
33 | | ||||
34 | class ProfileBookmarks; | 30 | class ProfileBookmarks; | ||
35 | class Chrome : public QObject, public Browser | 31 | class Chrome : public QObject, public Browser | ||
36 | { | 32 | { | ||
37 | Q_OBJECT | 33 | Q_OBJECT | ||
38 | public: | 34 | public: | ||
39 | explicit Chrome(FindProfile *findProfile, QObject* parent = nullptr); | 35 | explicit Chrome(const QString &appName, QObject *parent = nullptr); | ||
40 | ~Chrome() override; | 36 | ~Chrome() override; | ||
41 | QList<BookmarkMatch> match(const QString &term, bool addEveryThing) override; | 37 | QList<BookmarkMatch> match(const QString &term, bool addEveryThing) override; | ||
42 | public Q_SLOTS: | 38 | public Q_SLOTS: | ||
43 | void prepare() override; | 39 | void prepare() override; | ||
44 | void teardown() override; | 40 | void teardown() override; | ||
45 | private: | 41 | private: | ||
46 | void parseFolder(const QJsonObject &entry, ProfileBookmarks *profile); | 42 | void parseFolder(const QJsonObject &entry, ProfileBookmarks *profile); | ||
47 | virtual QList<BookmarkMatch> match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks); | 43 | virtual QList<BookmarkMatch> match(const QString &term, bool addEveryThing, ProfileBookmarks *profileBookmarks); | ||
48 | QList<ProfileBookmarks*> m_profileBookmarks; | 44 | QList<ProfileBookmarks*> m_profileBookmarks; | ||
49 | KDirWatch* m_watcher = nullptr; | 45 | KDirWatch* m_watcher = nullptr; | ||
50 | bool m_dirty; | 46 | bool m_dirty; | ||
51 | 47 | | |||
52 | }; | 48 | }; | ||
53 | 49 | | |||
54 | #endif // CHROME_H | 50 | #endif // CHROME_H |