kcm-openrc/openrc_kcm.h
Juraj Oravec c95cef0bbd
Port to TreeView with custom model
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
2025-05-30 22:58:09 +02:00

28 lines
780 B
C++

#ifndef OPENRC_KCM_H
#define OPENRC_KCM_H
#include <KQuickManagedConfigModule>
#include <QSettings>
#include "openrckcmsettings.h"
#include <KAboutData>
class OpenRCKCM : public KQuickManagedConfigModule {
Q_OBJECT
public:
OpenRCKCM(QObject *parent, const KPluginMetaData &metaData);
public:
Q_PROPERTY(QStringList allServiceTitles READ getAllServiceTitles CONSTANT)
Q_PROPERTY(QStringList allServices READ getAllServices CONSTANT)
Q_INVOKABLE void tryDisableService(QString serviceName);
Q_INVOKABLE void tryStopService(QString serviceName);
const QStringList getAllServiceTitles();
const QStringList getAllServices();
Q_INVOKABLE void tryRestartService(QString serviceName);
private:
QSettings settings;
};
#endif /* OPENRC_KCM_H */