|
|
|
|
@ -31,7 +31,10 @@ |
|
|
|
|
|
|
|
|
|
#include <KConfigLoader> |
|
|
|
|
#include <KDeclarative/QmlObjectSharedEngine> |
|
|
|
|
#include <KIO/ApplicationLauncherJob> |
|
|
|
|
#include <KLocalizedString> |
|
|
|
|
#include <KNotifications/KNotificationJobUiDelegate> |
|
|
|
|
#include <KService> |
|
|
|
|
|
|
|
|
|
SystemMonitor::SystemMonitor(QObject *parent, const QVariantList &args) |
|
|
|
|
: Plasma::Applet(parent, args) |
|
|
|
|
@ -91,6 +94,13 @@ void SystemMonitor::configChanged() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SystemMonitor::openSystemMonitor() |
|
|
|
|
{ |
|
|
|
|
auto job = new KIO::ApplicationLauncherJob(KService::serviceByDesktopName("org.kde.plasma-systemmonitor")); |
|
|
|
|
job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled)); |
|
|
|
|
job->start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
K_EXPORT_PLASMA_APPLET_WITH_JSON(systemmonitor, SystemMonitor, "metadata.json") |
|
|
|
|
|
|
|
|
|
#include "systemmonitor.moc" |
|
|
|
|
|