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 18:20:48 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick 2.15
|
2013-10-09 18:20:48 +02:00
|
|
|
import HelperWidgets 2.0
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
import StudioControls 1.0 as StudioControls
|
|
|
|
|
import StudioTheme 1.0 as StudioTheme
|
2013-10-09 18:20:48 +02:00
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
FlickableSection {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Section {
|
2021-06-21 16:48:19 +02:00
|
|
|
caption: qsTr("Grid View")
|
|
|
|
|
|
2013-10-09 18:20:48 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
2023-02-07 17:49:10 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Cell size")
|
|
|
|
|
tooltip: qsTr("Sets the dimensions of cells in the grid.")
|
|
|
|
|
}
|
2013-10-09 18:20:48 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
SecondColumnLayout {
|
2013-10-09 18:20:48 +02:00
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.contentWidth
|
2019-08-21 16:37:15 +02:00
|
|
|
minimumValue: 0
|
2021-06-21 16:48:19 +02:00
|
|
|
maximumValue: 10000
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
2013-10-09 18:20:48 +02:00
|
|
|
|
2021-07-13 18:36:25 +02:00
|
|
|
ControlLabel {
|
|
|
|
|
//: The width of the object
|
|
|
|
|
text: qsTr("W", "width")
|
2023-02-07 17:49:10 +01:00
|
|
|
tooltip: qsTr("Width")
|
2021-07-13 18:36:25 +02:00
|
|
|
}
|
2013-10-09 18:20:48 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
2019-08-21 16:37:15 +02:00
|
|
|
|
2013-10-09 18:20:48 +02:00
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.contentHeight
|
2019-08-21 16:37:15 +02:00
|
|
|
minimumValue: 0
|
2021-06-21 16:48:19 +02:00
|
|
|
maximumValue: 10000
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
|
|
|
|
|
|
2021-07-13 18:36:25 +02:00
|
|
|
ControlLabel {
|
|
|
|
|
//: The height of the object
|
|
|
|
|
text: qsTr("H", "height")
|
2023-02-07 17:49:10 +01:00
|
|
|
tooltip: qsTr("Height")
|
2021-07-13 18:36:25 +02:00
|
|
|
}
|
2021-08-11 12:39:11 +02:00
|
|
|
/*
|
|
|
|
|
TODO QDS-4836
|
2021-06-21 16:48:19 +02:00
|
|
|
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
|
|
|
|
|
|
|
|
|
LinkIndicator2D {}
|
2021-08-11 12:39:11 +02:00
|
|
|
*/
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-07 17:49:10 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Flow")
|
|
|
|
|
tooltip: qsTr("Sets the directions of the cells.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2013-10-09 18:20:48 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.flow
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["FlowLeftToRight", "FlowTopToBottom"]
|
|
|
|
|
scope: "GridView"
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-07 17:49:10 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Layout direction")
|
|
|
|
|
tooltip: qsTr("Sets in which direction items in the grid view are placed.")
|
|
|
|
|
}
|
2013-10-09 18:20:48 +02:00
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.layoutDirection
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["LeftToRight", "RightToLeft"]
|
|
|
|
|
scope: "Qt"
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2013-10-09 18:20:48 +02:00
|
|
|
text: qsTr("Snap mode")
|
2023-02-07 17:49:10 +01:00
|
|
|
tooltip: qsTr("Sets how the view scrolling will settle following a drag or flick.")
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.snapMode
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["NoSnap", "SnapToRow", "SnapOneRow"]
|
|
|
|
|
scope: "GridView"
|
2019-08-21 16:37:15 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Cache")
|
2023-02-07 17:49:10 +01:00
|
|
|
tooltip: qsTr("Sets in pixels how far the components are kept loaded outside the view's visible area.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.cacheBuffer.isAvailable
|
2021-06-21 16:48:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.cacheBuffer
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 1000
|
|
|
|
|
decimals: 0
|
|
|
|
|
enabled: backendValue.isAvailable
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Navigation wraps")
|
|
|
|
|
tooltip: qsTr("Whether the grid wraps key navigation.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.keyNavigationWraps.isAvailable
|
2021-06-21 16:48:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
|
|
|
|
text: backendValues.keyNavigationWraps.valueToString
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.keyNavigationWraps
|
|
|
|
|
enabled: backendValue.isAvailable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
|
|
|
|
}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Section {
|
2021-06-21 16:48:19 +02:00
|
|
|
caption: qsTr("Grid View Highlight")
|
|
|
|
|
|
2013-10-09 18:20:48 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2013-10-09 18:20:48 +02:00
|
|
|
text: qsTr("Range")
|
2023-02-22 13:04:51 +01:00
|
|
|
tooltip: qsTr("Sets the highlight range mode.")
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.highlightRangeMode
|
2021-06-21 16:48:19 +02:00
|
|
|
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
|
|
|
|
scope: "GridView"
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2013-10-09 18:20:48 +02:00
|
|
|
text: qsTr("Move duration")
|
2023-02-22 13:04:51 +01:00
|
|
|
tooltip: qsTr("Sets the animation duration of the highlight delegate.")
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.highlightMoveDuration
|
2019-08-21 16:37:15 +02:00
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 1000
|
2013-10-09 18:20:48 +02:00
|
|
|
decimals: 0
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2013-10-09 18:20:48 +02:00
|
|
|
text: qsTr("Preferred begin")
|
2023-02-22 13:04:51 +01:00
|
|
|
tooltip: qsTr("Sets the preferred highlight beginning. It must be smaller than\n"
|
|
|
|
|
+ "the <b>Preferred end</b>. Note that the user has to add a\n"
|
|
|
|
|
+ "highlight component.")
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.preferredHighlightBegin
|
2019-08-21 16:37:15 +02:00
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 1000
|
2013-10-09 18:20:48 +02:00
|
|
|
decimals: 0
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2013-10-09 18:20:48 +02:00
|
|
|
text: qsTr("Preferred end")
|
2023-02-22 13:04:51 +01:00
|
|
|
tooltip: qsTr("Sets the preferred highlight end. It must be larger than\n"
|
|
|
|
|
+ "the <b>Preferred begin</b>. Note that the user has to add\n"
|
|
|
|
|
+ "a highlight component.")
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
backendValue: backendValues.preferredHighlightEnd
|
2019-08-21 16:37:15 +02:00
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 1000
|
2013-10-09 18:20:48 +02:00
|
|
|
decimals: 0
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2013-10-09 18:20:48 +02:00
|
|
|
text: qsTr("Follows current")
|
2023-02-22 13:04:51 +01:00
|
|
|
tooltip: qsTr("Toggles if the view manages the highlight.")
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
|
|
|
|
CheckBox {
|
2019-08-21 16:37:15 +02:00
|
|
|
text: backendValues.highlightFollowsCurrentItem.valueToString
|
2021-06-21 16:48:19 +02:00
|
|
|
backendValue: backendValues.highlightFollowsCurrentItem
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
|
|
|
|
}
|
2013-10-09 18:20:48 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|