Changeset View
Changeset View
Standalone View
Standalone View
app/plasma/runner/kdevelopsessions.h
| Show All 16 Lines | |||||
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 18 | */ | 18 | */ | ||
| 19 | 19 | | |||
| 20 | #ifndef KDEVELOPSESSIONSRUNNER_H | 20 | #ifndef KDEVELOPSESSIONSRUNNER_H | ||
| 21 | #define KDEVELOPSESSIONSRUNNER_H | 21 | #define KDEVELOPSESSIONSRUNNER_H | ||
| 22 | 22 | | |||
| 23 | #include <KRunner/AbstractRunner> | 23 | #include <KRunner/AbstractRunner> | ||
| 24 | 24 | | |||
| 25 | #include <QIcon> | | |||
| 26 | | ||||
| 27 | struct Session | 25 | struct Session | ||
| 28 | { | 26 | { | ||
| 29 | QString id; | 27 | QString id; | ||
| 30 | QString name; | 28 | QString name; | ||
| 31 | }; | 29 | }; | ||
| 32 | 30 | | |||
| 33 | Q_DECLARE_TYPEINFO(Session, Q_MOVABLE_TYPE); | 31 | Q_DECLARE_TYPEINFO(Session, Q_MOVABLE_TYPE); | ||
| 34 | 32 | | |||
| 35 | class KDevelopSessions : public Plasma::AbstractRunner { | 33 | class KDevelopSessions : public Plasma::AbstractRunner { | ||
| 36 | Q_OBJECT | 34 | Q_OBJECT | ||
| 37 | 35 | | |||
| 38 | public: | 36 | public: | ||
| 39 | KDevelopSessions( QObject *parent, const QVariantList& args ); | 37 | KDevelopSessions( QObject *parent, const QVariantList& args ); | ||
| 40 | ~KDevelopSessions() override; | 38 | ~KDevelopSessions() override; | ||
| 41 | 39 | | |||
| 42 | void match(Plasma::RunnerContext &context) override; | 40 | void match(Plasma::RunnerContext &context) override; | ||
| 43 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override; | 41 | void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override; | ||
| 44 | 42 | | |||
| 45 | private Q_SLOTS: | 43 | private Q_SLOTS: | ||
| 46 | void loadSessions(); | 44 | void loadSessions(); | ||
| 47 | 45 | | |||
| 48 | private: | 46 | private: | ||
| 49 | QIcon m_icon; | | |||
| 50 | QVector<Session> m_sessions; | 47 | QVector<Session> m_sessions; | ||
| 51 | }; | 48 | }; | ||
| 52 | 49 | | |||
| 53 | #endif | 50 | #endif | ||