Changeset View
Changeset View
Standalone View
Standalone View
applets/systemloadviewer/package/contents/ui/SystemLoadViewer.qml
Show First 20 Lines • Show All 438 Lines • ▼ Show 20 Line(s) | 438 | delegate: ColumnLayout { | |||
---|---|---|---|---|---|
439 | Layout.minimumWidth: cpusRow.minCpuWidth | 439 | Layout.minimumWidth: cpusRow.minCpuWidth | ||
440 | readonly property int cpuIndex: index | 440 | readonly property int cpuIndex: index | ||
441 | 441 | | |||
442 | PlasmaExtras.Heading { | 442 | PlasmaExtras.Heading { | ||
443 | id: cpuLabel | 443 | id: cpuLabel | ||
444 | level: main.headingLevel | 444 | level: main.headingLevel | ||
445 | text: i18n("CPU %1", cpuIndex) | 445 | text: i18n("CPU %1", cpuIndex) | ||
446 | visible: main.labelsVisible | 446 | visible: main.labelsVisible | ||
447 | horizontalAlignment: Text.AlignHCenter | ||||
448 | Layout.fillWidth: true | ||||
447 | } | 449 | } | ||
448 | ConditionallyLoadedMonitors { | 450 | ConditionallyLoadedMonitors { | ||
449 | colors: cpuColors | 451 | colors: cpuColors | ||
450 | readonly property string niceLoad: "cpu/cpu" + cpuIndex + "/nice" | 452 | readonly property string niceLoad: "cpu/cpu" + cpuIndex + "/nice" | ||
451 | readonly property string userLoad: "cpu/cpu" + cpuIndex + "/user" | 453 | readonly property string userLoad: "cpu/cpu" + cpuIndex + "/user" | ||
452 | readonly property string sysLoad: "cpu/cpu" + cpuIndex + "/sys" | 454 | readonly property string sysLoad: "cpu/cpu" + cpuIndex + "/sys" | ||
453 | readonly property string ioWait: "cpu/cpu" + cpuIndex + "/wait" | 455 | readonly property string ioWait: "cpu/cpu" + cpuIndex + "/wait" | ||
454 | readonly property var cpuLoadProportions: dataSource.data[ioWait] ? [ | 456 | readonly property var cpuLoadProportions: dataSource.data[ioWait] ? [ | ||
Show All 15 Lines | 468 | ColumnLayout { | |||
470 | Layout.minimumWidth: minWidth | 472 | Layout.minimumWidth: minWidth | ||
471 | Layout.preferredWidth: height | 473 | Layout.preferredWidth: height | ||
472 | 474 | | |||
473 | PlasmaExtras.Heading { | 475 | PlasmaExtras.Heading { | ||
474 | id: cpuLabel | 476 | id: cpuLabel | ||
475 | level: main.headingLevel | 477 | level: main.headingLevel | ||
476 | text: i18n("CPU") | 478 | text: i18n("CPU") | ||
477 | visible: main.labelsVisible | 479 | visible: main.labelsVisible | ||
480 | horizontalAlignment: Text.AlignHCenter | ||||
481 | Layout.fillWidth: true | ||||
478 | } | 482 | } | ||
479 | 483 | | |||
480 | ConditionallyLoadedMonitors { | 484 | ConditionallyLoadedMonitors { | ||
481 | colors: cpuColors | 485 | colors: cpuColors | ||
482 | proportions: dataSource.totalCpuLoadProportions | 486 | proportions: dataSource.totalCpuLoadProportions | ||
483 | } | 487 | } | ||
484 | } | 488 | } | ||
485 | 489 | | |||
486 | ColumnLayout { | 490 | ColumnLayout { | ||
487 | id: memColumn | 491 | id: memColumn | ||
488 | readonly property double minWidth: units.gridUnit * 0.7 | 492 | readonly property double minWidth: units.gridUnit * 0.7 | ||
489 | visible: plasmoid.configuration.memoryActivated | 493 | visible: plasmoid.configuration.memoryActivated | ||
490 | Layout.minimumWidth: minWidth | 494 | Layout.minimumWidth: minWidth | ||
491 | Layout.preferredWidth: height | 495 | Layout.preferredWidth: height | ||
492 | 496 | | |||
493 | PlasmaExtras.Heading { | 497 | PlasmaExtras.Heading { | ||
494 | id: memoryLabel | 498 | id: memoryLabel | ||
495 | level: main.headingLevel | 499 | level: main.headingLevel | ||
496 | text: i18n("Memory") | 500 | text: i18n("Memory") | ||
497 | visible: main.labelsVisible | 501 | visible: main.labelsVisible | ||
502 | horizontalAlignment: Text.AlignHCenter | ||||
503 | Layout.fillWidth: true | ||||
498 | } | 504 | } | ||
499 | 505 | | |||
500 | ConditionallyLoadedMonitors { | 506 | ConditionallyLoadedMonitors { | ||
501 | colors: memoryColors | 507 | colors: memoryColors | ||
502 | proportions: dataSource.memoryUsageProportions | 508 | proportions: dataSource.memoryUsageProportions | ||
503 | } | 509 | } | ||
504 | } | 510 | } | ||
505 | 511 | | |||
506 | ColumnLayout { | 512 | ColumnLayout { | ||
507 | id: swapColumn | 513 | id: swapColumn | ||
508 | readonly property double minWidth: memColumn.minWidth | 514 | readonly property double minWidth: memColumn.minWidth | ||
509 | visible: plasmoid.configuration.swapActivated | 515 | visible: plasmoid.configuration.swapActivated | ||
510 | Layout.minimumWidth: minWidth | 516 | Layout.minimumWidth: minWidth | ||
511 | Layout.preferredWidth: height | 517 | Layout.preferredWidth: height | ||
512 | 518 | | |||
513 | PlasmaExtras.Heading { | 519 | PlasmaExtras.Heading { | ||
514 | id: swapLabel | 520 | id: swapLabel | ||
515 | level: main.headingLevel | 521 | level: main.headingLevel | ||
516 | text: i18n("Swap") | 522 | text: i18n("Swap") | ||
517 | visible: main.labelsVisible | 523 | visible: main.labelsVisible | ||
524 | horizontalAlignment: Text.AlignHCenter | ||||
525 | Layout.fillWidth: true | ||||
518 | } | 526 | } | ||
519 | 527 | | |||
520 | ConditionallyLoadedMonitors { | 528 | ConditionallyLoadedMonitors { | ||
521 | colors: swapColors | 529 | colors: swapColors | ||
522 | proportions: [dataSource.swapUsageProportion] | 530 | proportions: [dataSource.swapUsageProportion] | ||
523 | } | 531 | } | ||
524 | } | 532 | } | ||
525 | 533 | | |||
526 | ColumnLayout { | 534 | ColumnLayout { | ||
527 | id: cacheColumn | 535 | id: cacheColumn | ||
528 | readonly property double minWidth: memColumn.minWidth | 536 | readonly property double minWidth: memColumn.minWidth | ||
529 | visible: plasmoid.configuration.cacheActivated | 537 | visible: plasmoid.configuration.cacheActivated | ||
530 | Layout.minimumWidth: minWidth | 538 | Layout.minimumWidth: minWidth | ||
531 | Layout.preferredWidth: height | 539 | Layout.preferredWidth: height | ||
532 | 540 | | |||
533 | PlasmaExtras.Heading { | 541 | PlasmaExtras.Heading { | ||
534 | id: cacheLabel | 542 | id: cacheLabel | ||
535 | level: main.headingLevel | 543 | level: main.headingLevel | ||
536 | text: i18n("Cache") | 544 | text: i18n("Cache") | ||
537 | visible: main.labelsVisible | 545 | visible: main.labelsVisible | ||
546 | horizontalAlignment: Text.AlignHCenter | ||||
547 | Layout.fillWidth: true | ||||
538 | } | 548 | } | ||
539 | 549 | | |||
540 | ConditionallyLoadedMonitors { | 550 | ConditionallyLoadedMonitors { | ||
541 | colors: cacheColors | 551 | colors: cacheColors | ||
542 | proportions: dataSource.cacheUsageProportions | 552 | proportions: dataSource.cacheUsageProportions | ||
543 | } | 553 | } | ||
544 | } | 554 | } | ||
545 | } // rowLayout | 555 | } // rowLayout | ||
546 | } // main | 556 | } // main |