Changeset View
Changeset View
Standalone View
Standalone View
applets/systemloadviewer/package/contents/ui/SystemLoadViewer.qml
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | 103 | Layout.minimumWidth: { | |||
---|---|---|---|---|---|
119 | } | 119 | } | ||
120 | return wantedWidth | 120 | return wantedWidth | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | property bool labelsVisible | 123 | property bool labelsVisible | ||
124 | 124 | | |||
125 | Kio.KRun { id: kRun } | 125 | Kio.KRun { id: kRun } | ||
126 | 126 | | |||
127 | // We need to get the full path to KSysguard to be able to run it | | |||
128 | PlasmaCore.DataSource { | | |||
129 | id: apps | | |||
130 | engine: "apps" | | |||
131 | connectedSources: ["org.kde.ksysguard.desktop"] | | |||
132 | } | | |||
133 | | ||||
134 | PlasmaCore.DataSource { | 127 | PlasmaCore.DataSource { | ||
135 | id: dataSource | 128 | id: dataSource | ||
136 | engine: "systemmonitor" | 129 | engine: "systemmonitor" | ||
137 | 130 | | |||
138 | property string cpuSystem: "cpu/system/" | 131 | property string cpuSystem: "cpu/system/" | ||
139 | property string niceLoad: cpuSystem + "nice" | 132 | property string niceLoad: cpuSystem + "nice" | ||
140 | property string userLoad: cpuSystem + "user" | 133 | property string userLoad: cpuSystem + "user" | ||
141 | property string sysLoad: cpuSystem + "sys" | 134 | property string sysLoad: cpuSystem + "sys" | ||
▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Line(s) | 370 | PlasmaCore.ToolTipArea { | |||
381 | mainText: i18n("System load") | 374 | mainText: i18n("System load") | ||
382 | subText: toolTipSubText() | 375 | subText: toolTipSubText() | ||
383 | visible: !plasmoid.configuration.cpuAllActivated || dataSource.maxCpuIndex < 5 | 376 | visible: !plasmoid.configuration.cpuAllActivated || dataSource.maxCpuIndex < 5 | ||
384 | 377 | | |||
385 | MouseArea { | 378 | MouseArea { | ||
386 | anchors.fill: parent | 379 | anchors.fill: parent | ||
387 | hoverEnabled: true | 380 | hoverEnabled: true | ||
388 | onClicked: { | 381 | onClicked: { | ||
389 | kRun.openUrl(apps.data["org.kde.ksysguard.desktop"].entryPath) | 382 | kRun.openService("org.kde.ksysguard") | ||
390 | } | 383 | } | ||
391 | } | 384 | } | ||
392 | } | 385 | } | ||
393 | 386 | | |||
394 | PlasmaCore.ToolTipArea { | 387 | PlasmaCore.ToolTipArea { | ||
395 | anchors.fill: parent | 388 | anchors.fill: parent | ||
396 | active: true | 389 | active: true | ||
397 | visible: !stdToolTip.visible | 390 | visible: !stdToolTip.visible | ||
Show All 19 Lines | 395 | ColumnLayout { | |||
417 | } | 410 | } | ||
418 | } | 411 | } | ||
419 | } | 412 | } | ||
420 | 413 | | |||
421 | MouseArea { | 414 | MouseArea { | ||
422 | anchors.fill: parent | 415 | anchors.fill: parent | ||
423 | hoverEnabled: true | 416 | hoverEnabled: true | ||
424 | onClicked: { | 417 | onClicked: { | ||
425 | kRun.openUrl(apps.data["org.kde.ksysguard.desktop"].entryPath) | 418 | kRun.openService("org.kde.ksysguard") | ||
426 | } | 419 | } | ||
427 | } | 420 | } | ||
428 | } | 421 | } | ||
429 | 422 | | |||
430 | RowLayout { | 423 | RowLayout { | ||
431 | id: rowLayout | 424 | id: rowLayout | ||
432 | 425 | | |||
433 | anchors { | 426 | anchors { | ||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |