2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
2023-01-04 08:52:22 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-10-09 12:44:04 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
2013-10-09 12:44:04 +02:00
|
|
|
import HelperWidgets 2.0
|
2021-06-21 16:48:19 +02:00
|
|
|
import StudioControls 1.0 as StudioControls
|
|
|
|
|
import StudioTheme 1.0 as StudioTheme
|
2013-10-09 12:44:04 +02:00
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
Section {
|
|
|
|
|
caption: qsTr("Grid")
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2013-10-09 12:44:04 +02:00
|
|
|
|
|
|
|
|
SectionLayout {
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Columns")
|
|
|
|
|
tooltip: qsTr("Sets the number of columns in the grid.")
|
|
|
|
|
}
|
2013-10-09 12:44:04 +02:00
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 12:44:04 +02:00
|
|
|
backendValue: backendValues.columns
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 2000
|
|
|
|
|
decimals: 0
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Rows")
|
|
|
|
|
tooltip: qsTr("Sets the number of rows in the grid.")
|
|
|
|
|
}
|
2013-10-09 12:44:04 +02:00
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 12:44:04 +02:00
|
|
|
backendValue: backendValues.rows
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 2000
|
|
|
|
|
decimals: 0
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Spacing")
|
|
|
|
|
tooltip: qsTr("Sets the space between grid items. The same space is applied for both rows and columns.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.spacing
|
|
|
|
|
minimumValue: -4000
|
|
|
|
|
maximumValue: 4000
|
|
|
|
|
decimals: 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Flow")
|
|
|
|
|
tooltip: qsTr("Sets in which direction items in the grid are placed.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2013-10-09 12:44:04 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-10-09 12:44:04 +02:00
|
|
|
backendValue: backendValues.flow
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["LeftToRight", "TopToBottom"]
|
2014-11-07 10:09:59 +01:00
|
|
|
scope: "Grid"
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Layout direction")
|
|
|
|
|
tooltip: qsTr("Sets in which direction items in the grid are placed.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2013-10-09 12:44:04 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-10-09 12:44:04 +02:00
|
|
|
backendValue: backendValues.layoutDirection
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["LeftToRight", "RightToLeft"]
|
2013-12-16 12:50:32 +01:00
|
|
|
scope: "Qt"
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Alignment H")
|
|
|
|
|
tooltip: qsTr("Sets the horizontal alignment of items in the grid.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
backendValue: backendValues.horizontalItemAlignment
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["AlignLeft", "AlignRight" ,"AlignHCenter"]
|
2020-04-24 13:22:55 +02:00
|
|
|
scope: "Grid"
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-08 17:26:19 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Alignment V")
|
|
|
|
|
tooltip: qsTr("Sets the vertical alignment of items in the grid.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
backendValue: backendValues.verticalItemAlignment
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["AlignTop", "AlignBottom" ,"AlignVCenter"]
|
2020-04-24 13:22:55 +02:00
|
|
|
scope: "Grid"
|
|
|
|
|
}
|
2013-10-09 12:44:04 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-21 11:41:55 +02:00
|
|
|
|
|
|
|
|
PaddingSection {
|
|
|
|
|
}
|
2013-10-09 12:44:04 +02:00
|
|
|
}
|