File indexing completed on 2024-05-05 17:34:05

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