forked from qt-creator/qt-creator
* Add QML Window based popover to StudioControls * Add color editor to StudioControls * Move color editor modules to StudioControls * Move IconIndicator to StudioControls * Move ToolTipArea to StudioControls * Add color backend to qmldesignerbase to allow control value binding * Use popover in connections editor * Add window manager to send focus changes to QML Windows * Update ColorEditor UX * Remove HelperWindow workaround for GradientPresetList (Qt 5 vs 6) * Fix eye dropper for QWindow Task-number: QDS-10926 Change-Id: Ia87b30543affde88faaef2ebdf120cb5d348c935 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
88 lines
2.9 KiB
QML
88 lines
2.9 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.Controls
|
|
import StudioControls as StudioControls
|
|
import StudioTheme as StudioTheme
|
|
|
|
Column {
|
|
id: root
|
|
|
|
readonly property real horizontalSpacing: 10
|
|
readonly property real verticalSpacing: 12
|
|
readonly property real columnWidth: (root.width - root.horizontalSpacing) / 2
|
|
|
|
property var backend
|
|
|
|
width: parent.width
|
|
spacing: root.verticalSpacing
|
|
|
|
Row {
|
|
spacing: root.horizontalSpacing
|
|
|
|
PopupLabel {
|
|
width: root.columnWidth
|
|
text: qsTr("From")
|
|
tooltip: qsTr("Sets the component and its property from which the value is copied.")
|
|
}
|
|
|
|
PopupLabel {
|
|
width: root.columnWidth
|
|
text: qsTr("To")
|
|
tooltip: qsTr("Sets the property of the selected component to which the copied value is assigned.")
|
|
}
|
|
}
|
|
|
|
Row {
|
|
spacing: root.horizontalSpacing
|
|
|
|
StudioControls.TopLevelComboBox {
|
|
id: sourceNode
|
|
style: StudioTheme.Values.connectionPopupControlStyle
|
|
width: root.columnWidth
|
|
|
|
model: backend.sourceNode.model ?? []
|
|
onModelChanged: sourceNode.currentIndex = sourceNode.currentTypeIndex
|
|
onActivated: backend.sourceNode.activateIndex(sourceNode.currentIndex)
|
|
property int currentTypeIndex: backend.sourceNode.currentIndex ?? 0
|
|
onCurrentTypeIndexChanged: sourceNode.currentIndex = sourceNode.currentTypeIndex
|
|
}
|
|
|
|
PopupLabel {
|
|
width: root.columnWidth
|
|
text: backend.targetNode
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|
|
|
|
Row {
|
|
spacing: root.horizontalSpacing
|
|
|
|
StudioControls.TopLevelComboBox {
|
|
id: sourceProperty
|
|
style: StudioTheme.Values.connectionPopupControlStyle
|
|
width: root.columnWidth
|
|
|
|
model: backend.sourceProperty.model ?? []
|
|
onModelChanged: sourceProperty.currentIndex = sourceProperty.currentTypeIndex
|
|
onActivated: backend.sourceProperty.activateIndex(
|
|
sourceProperty.currentIndex)
|
|
property int currentTypeIndex: backend.sourceProperty.currentIndex ?? 0
|
|
onCurrentTypeIndexChanged: sourceProperty.currentIndex = sourceProperty.currentTypeIndex
|
|
}
|
|
|
|
StudioControls.TopLevelComboBox {
|
|
id: name
|
|
width: root.columnWidth
|
|
style: StudioTheme.Values.connectionPopupControlStyle
|
|
|
|
model: backend.property.model ?? []
|
|
|
|
onActivated: backend.property.activateIndex(name.currentIndex)
|
|
property int currentTypeIndex: backend.property.currentIndex ?? 0
|
|
onCurrentTypeIndexChanged: name.currentIndex = name.currentTypeIndex
|
|
}
|
|
}
|
|
}
|