2014-11-09 01:16:30 +01:00
|
|
|
import QtQuick 2.0
|
2020-08-18 11:45:23 +02:00
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
2014-11-09 01:16:30 +01:00
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
ComponentBase {
|
2020-08-18 11:45:23 +02:00
|
|
|
id: root
|
|
|
|
title: "Plasma Components 2 BusyIndicator"
|
|
|
|
contentItem: ColumnLayout {
|
|
|
|
spacing: PlasmaCore.Units.gridUnit
|
2014-11-09 01:16:30 +01:00
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
wrapMode: Text.WordWrap
|
2020-08-23 04:32:22 +02:00
|
|
|
text: "The BusyIndicator should have a height of 16px and should have a 1:1 aspect ratio"
|
|
|
|
Layout.preferredWidth: Math.max(busyIndicatorLayout.width, root.implicitHeaderWidth)
|
|
|
|
}
|
|
|
|
PlasmaComponents.BusyIndicator {
|
|
|
|
Layout.preferredHeight: 16
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: "The BusyIndicator should use its implicit size."
|
|
|
|
Layout.preferredWidth: Math.max(busyIndicatorLayout.width, root.implicitHeaderWidth)
|
|
|
|
}
|
|
|
|
PlasmaComponents.BusyIndicator {}
|
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: "The BusyIndicator should maintain a 1:1 aspect ratio, pause when unchecked and resume when checked."
|
2014-11-09 01:16:30 +01:00
|
|
|
}
|
|
|
|
|
2020-08-18 11:45:23 +02:00
|
|
|
RowLayout {
|
|
|
|
spacing: PlasmaCore.Units.gridUnit
|
2014-11-09 01:16:30 +01:00
|
|
|
|
|
|
|
PlasmaComponents.BusyIndicator {
|
2020-08-23 04:32:22 +02:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2014-11-09 01:16:30 +01:00
|
|
|
running: runningButton.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.CheckBox {
|
|
|
|
id: runningButton
|
|
|
|
text: "Running"
|
2020-08-18 11:45:23 +02:00
|
|
|
checked: true
|
2014-11-09 01:16:30 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|