File indexing completed on 2024-05-19 15:09:22

0001 /*
0002     SPDX-FileCopyrightText: 2014 Antonis Tsiapaliokas <antonis.tsiapaliokas@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef KRUNPROXY_H
0008 #define KRUNPROXY_H
0009 
0010 #include <QObject>
0011 
0012 class KRunProxy : public QObject
0013 {
0014     Q_OBJECT
0015 
0016 public:
0017     explicit KRunProxy(QObject *parent = nullptr);
0018 
0019     /**
0020      * opens the url from the existing file
0021      */
0022     Q_INVOKABLE bool openUrl(const QString &fileUrl);
0023 
0024     /**
0025      * Runs the service (application)
0026      * @param serviceName the name of the desktop file without extension
0027      * @return true on success
0028      */
0029     Q_INVOKABLE bool openService(const QString &serviceName);
0030 };
0031 
0032 #endif