add more spacing
[personal-kdebase.git] / workspace / plasma / runners / services / servicerunner.h
blob8704422a3c68a19a71319ba240520cd18eaf902b
1 /*
2 * Copyright (C) 2006 Aaron Seigo <aseigo@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License version 2 as
6 * published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details
13 * You should have received a copy of the GNU Library General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef SERVICERUNNER_H
20 #define SERVICERUNNER_H
22 #include <QAction>
24 #include <KService>
26 #include <Plasma/AbstractRunner>
28 class QWidget;
30 /**
31 * This class looks for matches in the set of .desktop files installed by
32 * applications. This way the user can type exactly what they see in the
33 * appications menu and have it start the appropriate app. Essentially anything
34 * that KService knows about, this runner can launch
37 class ServiceRunner : public Plasma::AbstractRunner
39 Q_OBJECT
41 public:
42 ServiceRunner(QObject *parent, const QVariantList &args);
43 ~ServiceRunner();
45 void match(Plasma::RunnerContext &context);
46 void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &action);
48 protected:
49 void setupAction(const KService::Ptr &service, Plasma::QueryMatch &action);
52 K_EXPORT_PLASMA_RUNNER(services, ServiceRunner)
54 #endif