Changeset View
Changeset View
Standalone View
Standalone View
runners/katesessions/katesessions.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2008 Sebastian Kügler <sebas@kde.org> | 2 | * Copyright 2008 Sebastian Kügler <sebas@kde.org> | ||
3 | * Copyright 2017 Kai Uwe Broulik <kde@privat.broulik.de> | ||||
3 | * | 4 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU Library General Public License as | 6 | * it under the terms of the GNU Library General Public License as | ||
6 | * published by the Free Software Foundation; either version 2, or | 7 | * published by the Free Software Foundation; either version 2, or | ||
7 | * (at your option) any later version. | 8 | * (at your option) any later version. | ||
8 | * | 9 | * | ||
9 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details | 13 | * GNU General Public License for more details | ||
13 | * | 14 | * | ||
14 | * You should have received a copy of the GNU Library General Public | 15 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 16 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 17 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 19 | */ | ||
19 | 20 | | |||
20 | #ifndef KATESESSIONS_H | 21 | #ifndef KATESESSIONS_H | ||
21 | #define KATESESSIONS_H | 22 | #define KATESESSIONS_H | ||
22 | 23 | | |||
23 | #include <plasma/abstractrunner.h> | 24 | #include <krunner/abstractrunner.h> | ||
24 | 25 | | |||
25 | class KDirWatch; | 26 | class KDirWatch; | ||
26 | 27 | | |||
27 | class KateSessions : public Plasma::AbstractRunner { | 28 | class KateSessions : public Plasma::AbstractRunner { | ||
28 | Q_OBJECT | 29 | Q_OBJECT | ||
29 | 30 | | |||
30 | public: | 31 | public: | ||
31 | KateSessions( QObject *parent, const QVariantList& args ); | 32 | KateSessions( QObject *parent, const QVariantList& args ); | ||
32 | ~KateSessions(); | 33 | ~KateSessions(); | ||
33 | 34 | | |||
34 | void match(Plasma::RunnerContext &context); | 35 | void match(Plasma::RunnerContext &context) override; | ||
35 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match); | 36 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override; | ||
36 | 37 | | |||
37 | private Q_SLOTS: | 38 | private Q_SLOTS: | ||
38 | void loadSessions(); | 39 | void loadSessions(); | ||
39 | void slotPrepare(); | 40 | void slotPrepare(); | ||
40 | void slotTeardown(); | 41 | void slotTeardown(); | ||
41 | 42 | | |||
42 | private: | 43 | private: | ||
43 | KDirWatch* m_sessionWatch; | 44 | KDirWatch* m_sessionWatch; | ||
45 | QString m_sessionsFolderPath; | ||||
44 | QStringList m_sessions; | 46 | QStringList m_sessions; | ||
45 | }; | 47 | }; | ||
46 | 48 | | |||
47 | K_EXPORT_PLASMA_RUNNER(katesessions, KateSessions) | | |||
48 | | ||||
49 | #endif | 49 | #endif |