2023-03-10 16:16:15 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ.Components 0.1
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2023-03-10 16:16:15 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
|
|
|
|
component LabeledSlider: Row {
|
|
|
|
property alias text: label.text
|
|
|
|
property alias value: slider.value
|
|
|
|
property alias from: slider.from
|
|
|
|
property alias to: slider.to
|
|
|
|
|
|
|
|
Label {
|
|
|
|
id: label
|
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: slider
|
|
|
|
|
|
|
|
value: (from + to) / 2
|
|
|
|
from: 10
|
|
|
|
to: 500
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
StatusGroupBox {
|
|
|
|
id: group
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
title: titleTextEdit.text
|
2024-10-15 19:26:12 +00:00
|
|
|
icon: Theme.png("tokens/SNT")
|
2023-03-10 16:16:15 +00:00
|
|
|
iconSize: iconSizeSlider.value
|
|
|
|
|
2023-04-04 13:53:37 +00:00
|
|
|
label.enabled: labelEnabledCheckBox.checked
|
|
|
|
|
2023-03-10 16:16:15 +00:00
|
|
|
width: undefinedSizeCheckBox.checked ? undefined
|
|
|
|
: widthSlider.value
|
|
|
|
height: undefinedSizeCheckBox.checked ? undefined
|
|
|
|
: heightSlider.value
|
|
|
|
|
|
|
|
Button {
|
|
|
|
width: group.availableWidth
|
|
|
|
height: group.availableHeight
|
|
|
|
|
|
|
|
text: "Content button with some text"
|
|
|
|
|
|
|
|
implicitWidth: contentImplicitWidthSlider.value
|
|
|
|
implicitHeight: contentImplicitHeightSlider.value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
LabeledSlider {
|
|
|
|
id: widthSlider
|
|
|
|
|
|
|
|
enabled: !undefinedSizeCheckBox.checked
|
|
|
|
text: "width:"
|
|
|
|
}
|
|
|
|
|
|
|
|
LabeledSlider {
|
|
|
|
id: heightSlider
|
|
|
|
|
|
|
|
enabled: !undefinedSizeCheckBox.checked
|
|
|
|
text: "height:"
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: undefinedSizeCheckBox
|
|
|
|
text: "Undefined size"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
LabeledSlider {
|
|
|
|
id: contentImplicitWidthSlider
|
|
|
|
|
|
|
|
text: "content implicit width:"
|
|
|
|
}
|
|
|
|
|
|
|
|
LabeledSlider {
|
|
|
|
id: contentImplicitHeightSlider
|
|
|
|
|
|
|
|
text: "content implicit height:"
|
|
|
|
}
|
|
|
|
|
|
|
|
LabeledSlider {
|
|
|
|
id: iconSizeSlider
|
|
|
|
|
|
|
|
from: 10
|
|
|
|
to: 40
|
|
|
|
value: 18
|
|
|
|
text: "iconSize:"
|
|
|
|
}
|
|
|
|
|
2023-04-04 13:53:37 +00:00
|
|
|
RowLayout {
|
|
|
|
TextField {
|
|
|
|
id: titleTextEdit
|
|
|
|
|
|
|
|
text: "Some title goes here"
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: labelEnabledCheckBox
|
2023-03-10 16:16:15 +00:00
|
|
|
|
2023-04-04 13:53:37 +00:00
|
|
|
checked: true
|
|
|
|
text: "label enabled"
|
|
|
|
}
|
2023-03-10 16:16:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Components
|