Files
qt-creator/share/qtcreator/qmldesigner/effectComposerQmlSources/ValueVec4.qml
Shrief Gabr 002bfbf80f EffectComposer: Add 'reset' button for values
Task-number: QDS-11719
Change-Id: Ia03366bf109427fbcfe5cc1d4f68ae97fa8dc256
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-03-22 09:55:30 +00:00

175 lines
4.5 KiB
QML

// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick
import QtQuick.Layouts
import HelperWidgets as HelperWidgets
import StudioControls as StudioControls
import StudioTheme as StudioTheme
import EffectComposerBackend
RowLayout {
width: parent.width
spacing: 0
HelperWidgets.DoubleSpinBox {
id: vX
// value: uniformValue binding can get overwritten by normal operation of the control
property double resetValue: uniformValue.x
onResetValueChanged: value = resetValue
Layout.fillWidth: true
Layout.minimumWidth: 30
Layout.maximumWidth: 60
spinBoxIndicatorVisible: false
inputHAlignment: Qt.AlignHCenter
minimumValue: uniformMinValue.x
maximumValue: uniformMaxValue.x
value: uniformValue.x
stepSize: .01
decimals: 2
onValueModified: uniformValue.x = value
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 2
Layout.maximumWidth: 10
}
Text {
text: qsTr("X")
color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize
Layout.alignment: Qt.AlignVCenter
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 10
Layout.maximumWidth: 20
}
HelperWidgets.DoubleSpinBox {
id: vY
// value: uniformValue binding can get overwritten by normal operation of the control
property double resetValue: uniformValue.y
onResetValueChanged: value = resetValue
Layout.fillWidth: true
Layout.minimumWidth: 30
Layout.maximumWidth: 60
spinBoxIndicatorVisible: false
inputHAlignment: Qt.AlignHCenter
minimumValue: uniformMinValue.y
maximumValue: uniformMaxValue.y
value: uniformValue.y
stepSize: .01
decimals: 2
onValueModified: uniformValue.y = value
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 2
Layout.maximumWidth: 10
}
Text {
text: qsTr("Y")
color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize
Layout.alignment: Qt.AlignVCenter
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 10
Layout.maximumWidth: 20
}
HelperWidgets.DoubleSpinBox {
id: vZ
// value: uniformValue binding can get overwritten by normal operation of the control
property double resetValue: uniformValue.z
onResetValueChanged: value = resetValue
Layout.fillWidth: true
Layout.minimumWidth: 30
Layout.maximumWidth: 60
spinBoxIndicatorVisible: false
inputHAlignment: Qt.AlignHCenter
minimumValue: uniformMinValue.z
maximumValue: uniformMaxValue.z
value: uniformValue.z
stepSize: .01
decimals: 2
onValueModified: uniformValue.z = value
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 2
Layout.maximumWidth: 10
}
Text {
text: qsTr("Z")
color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize
Layout.alignment: Qt.AlignVCenter
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 10
Layout.maximumWidth: 20
}
HelperWidgets.DoubleSpinBox {
id: vW
// value: uniformValue binding can get overwritten by normal operation of the control
property double resetValue: uniformValue.w
onResetValueChanged: value = resetValue
Layout.fillWidth: true
Layout.minimumWidth: 30
Layout.maximumWidth: 60
spinBoxIndicatorVisible: false
inputHAlignment: Qt.AlignHCenter
minimumValue: uniformMinValue.w
maximumValue: uniformMaxValue.w
value: uniformValue.w
stepSize: .01
decimals: 2
onValueModified: uniformValue.w = value
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 2
Layout.maximumWidth: 10
}
Text {
text: qsTr("W")
color: StudioTheme.Values.themeTextColor
font.pixelSize: StudioTheme.Values.baseFontSize
Layout.alignment: Qt.AlignVCenter
}
Item { // spacer
Layout.fillWidth: true
Layout.minimumWidth: 10
}
}