File indexing completed on 2024-04-21 16:12:48

0001 /*
0002  *   SPDX-FileCopyrightText: 2008 Sebastian Kügler <sebas@kde.org>
0003  *   SPDX-FileCopyrightText: 2017 Kai Uwe Broulik <kde@privat.broulik.de>
0004  *   SPDX-FileCopyrightText: 2020 Alexander Lohnau <alexander.lohnau@gmx.de>
0005  *
0006  *   SPDX-License-Identifier: LGPL-2.0-or-later
0007  */
0008 
0009 #ifndef KATESESSIONS_H
0010 #define KATESESSIONS_H
0011 
0012 #include "profilesmodel.h"
0013 #include <KRunner/AbstractRunner>
0014 
0015 using namespace Plasma;
0016 
0017 class KateSessions : public AbstractRunner
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     explicit KateSessions(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
0023 
0024     void init() override;
0025     void match(RunnerContext &context) override;
0026     void run(const RunnerContext &context, const QueryMatch &match) override;
0027 
0028 private:
0029     const QLatin1String m_triggerWord = QLatin1String("kate");
0030     ProfilesModel *m_model = nullptr; // WARNING: must be on the correct thread. cannot live on stack!
0031 };
0032 
0033 #endif