3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-14 11:15:54 +00:00
2022-03-05 22:41:29 +05:00

38 lines
1.0 KiB
C++

/*
SPDX-FileCopyrightText: 2006 Aaron Seigo <aseigo@kde.org>
SPDX-License-Identifier: LGPL-2.0-only
*/
#pragma once
#include <KService>
//#include <KRunner/AbstractRunner>
#include <krunner/abstractrunner.h>
/**
* This class looks for matches in the set of .desktop files installed by
* applications. This way the user can type exactly what they see in the
* applications menu and have it start the appropriate app. Essentially anything
* that KService knows about, this runner can launch
*/
class ServiceRunner : public Plasma::AbstractRunner
{
Q_OBJECT
public:
ServiceRunner(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~ServiceRunner() override;
void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override;
protected Q_SLOTS:
QMimeData *mimeDataForMatch(const Plasma::QueryMatch &match) override;
protected:
void setupMatch(const KService::Ptr &service, Plasma::QueryMatch &action);
};