File indexing completed on 2024-05-12 04:37:32

0001 /*
0002     SPDX-FileCopyrightText: 2008, 2011 Sebastian Kügler <sebas@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDEVELOPSESSIONSRUNNER_H
0008 #define KDEVELOPSESSIONSRUNNER_H
0009 
0010 // KDevelopSessionsWatch
0011 #include <kdevelopsessionsobserver.h>
0012 // KF
0013 #include <KRunner/AbstractRunner>
0014 
0015 
0016 class KDevelopSessions : public Plasma::AbstractRunner
0017                        , public KDevelopSessionsObserver
0018 {
0019     Q_OBJECT
0020     Q_INTERFACES(KDevelopSessionsObserver)
0021 
0022 public:
0023     KDevelopSessions(QObject* parent, const KPluginMetaData& metaData, const QVariantList& args);
0024     ~KDevelopSessions() override;
0025 
0026 public:
0027     void match(Plasma::RunnerContext &context) override;
0028     void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override;
0029 
0030 protected:
0031     void init() override;
0032 
0033 public Q_SLOTS: // KDevelopSessionsObserver API
0034     void setSessionDataList(const QVector<KDevelopSessionData>& sessionDataList) override;
0035 
0036 private:
0037     // working copy of the list
0038     QVector<KDevelopSessionData> m_sessionDataList;
0039 };
0040 
0041 #endif