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 16:13:26 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
2013-10-09 16:13:26 +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 16:13:26 +02:00
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
Section {
|
2021-07-02 10:36:07 +02:00
|
|
|
caption: qsTr("Mouse Area")
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2013-10-09 16:13:26 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Enable")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets how the mouse can interact with the area.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.enabled.isAvailable
|
2013-10-09 16:13:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
text: qsTr("Area")
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 16:13:26 +02:00
|
|
|
backendValue: backendValues.enabled
|
2020-08-31 18:37:22 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2013-10-09 16:13:26 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
2013-10-09 16:13:26 +02:00
|
|
|
|
|
|
|
|
CheckBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
text: qsTr("Hover")
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2013-10-09 16:13:26 +02:00
|
|
|
backendValue: backendValues.hoverEnabled
|
2020-08-31 18:37:22 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2013-10-09 16:13:26 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-10-09 16:13:26 +02:00
|
|
|
}
|
2020-04-24 13:22:55 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Accepted buttons")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets which mouse buttons the area reacts to.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.acceptedButtons.isAvailable
|
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.acceptedButtons
|
|
|
|
|
model: ["LeftButton", "RightButton", "MiddleButton", "BackButton", "ForwardButton", "AllButtons"]
|
|
|
|
|
scope: "Qt"
|
2020-08-31 18:37:22 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Cursor shape")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets which mouse cursor to display on this area.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.cursorShape.isAvailable
|
2021-06-21 16:48:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
ComboBox {
|
|
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
|
|
|
|
backendValue: backendValues.cursorShape
|
|
|
|
|
model: ["ArrowCursor", "UpArrowCursor", "CrossCursor", "WaitCursor",
|
|
|
|
|
"IBeamCursor", "SizeVerCursor", "SizeHorCursor", "SizeBDiagCursor",
|
|
|
|
|
"SizeFDiagCursor", "SizeAllCursor", "BlankCursor", "SplitVCursor",
|
|
|
|
|
"SplitHCursor", "PointingHandCursor", "ForbiddenCursor", "WhatsThisCursor",
|
|
|
|
|
"BusyCursor", "OpenHandCursor", "ClosedHandCursor", "DragCopyCursor",
|
|
|
|
|
"DragMoveCursor", "DragLinkCursor"]
|
|
|
|
|
scope: "Qt"
|
|
|
|
|
enabled: backendValue.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Hold interval")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets the time before the pressAndHold signal is registered when you press the area.")
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
backendValue: backendValues.pressAndHoldInterval
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 2000
|
|
|
|
|
decimals: 0
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Scroll gesture")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Toggles if scroll gestures from non-mouse devices are supported.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.scrollGestureEnabled.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
text: qsTr("Enabled")
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
backendValue: backendValues.scrollGestureEnabled
|
2020-08-31 18:37:22 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Prevent stealing")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Toggles if mouse events can be stolen from this area.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.preventStealing.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
|
|
|
|
text: backendValues.preventStealing.valueToString
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.preventStealing
|
2020-08-31 18:37:22 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Propagate events")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Toggles if composed mouse events should be propagated to other mouse areas overlapping this area.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.propagateComposedEvents.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
|
|
|
|
text: backendValues.propagateComposedEvents.valueToString
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.propagateComposedEvents
|
2020-08-31 18:37:22 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Section {
|
2021-06-21 16:48:19 +02:00
|
|
|
caption: qsTr("Drag")
|
|
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2020-08-31 18:37:22 +02:00
|
|
|
visible: backendValues.drag_target.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
|
|
|
|
|
SectionLayout {
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Target")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets the component to have drag functionalities.")
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
ItemFilterComboBox {
|
|
|
|
|
typeFilter: "QtQuick.QtObject"
|
|
|
|
|
backendValue: backendValues.drag_target
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Axis")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets in which directions the dragging work.")
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
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
|
|
|
scope: "Drag"
|
|
|
|
|
model: ["XAxis", "YAxis", "XAndYAxis"]
|
|
|
|
|
backendValue: backendValues.drag_axis
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Threshold")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Sets a threshold after which the drag starts to work.")
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
backendValue: backendValues.drag_threshold
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 5000
|
|
|
|
|
decimals: 0
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Filter children")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Toggles if the dragging overrides descendant mouse areas.")
|
2021-06-21 16:48:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
|
|
|
|
text: backendValues.drag_filterChildren.valueToString
|
|
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.drag_filterChildren
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
|
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Smoothed")
|
2023-02-02 18:44:11 +01:00
|
|
|
tooltip: qsTr("Toggles if the move is smoothly animated.")
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
|
|
|
|
text: backendValues.drag_smoothed.valueToString
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.drag_smoothed
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2013-10-09 16:13:26 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|