2023-07-04 19:57:59 +02:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2023-10-24 12:10:29 +02:00
|
|
|
|
2023-07-04 19:57:59 +02:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
2023-09-01 17:29:07 +02:00
|
|
|
import StudioControls as StudioControls
|
|
|
|
|
import StudioTheme as StudioTheme
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
Column {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
readonly property real horizontalSpacing: 10
|
2023-10-24 12:10:29 +02:00
|
|
|
readonly property real verticalSpacing: 12
|
2023-09-01 17:29:07 +02:00
|
|
|
readonly property real columnWidth: (root.width - root.horizontalSpacing) / 2
|
2023-07-04 19:57:59 +02:00
|
|
|
|
|
|
|
|
property var backend
|
|
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
width: parent.width
|
|
|
|
|
spacing: root.verticalSpacing
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
Row {
|
|
|
|
|
spacing: root.horizontalSpacing
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-15 17:33:00 +02:00
|
|
|
PopupLabel {
|
|
|
|
|
width: root.columnWidth
|
|
|
|
|
text: qsTr("From")
|
2023-09-21 14:48:21 +02:00
|
|
|
tooltip: qsTr("Sets the component and its property from which the value is copied.")
|
2023-09-15 17:33:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PopupLabel {
|
|
|
|
|
width: root.columnWidth
|
|
|
|
|
text: qsTr("To")
|
2023-09-21 14:48:21 +02:00
|
|
|
tooltip: qsTr("Sets the property of the selected component to which the copied value is assigned.")
|
2023-09-15 17:33:00 +02:00
|
|
|
}
|
2023-07-04 19:57:59 +02:00
|
|
|
}
|
|
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
Row {
|
|
|
|
|
spacing: root.horizontalSpacing
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
StudioControls.TopLevelComboBox {
|
|
|
|
|
id: sourceNode
|
|
|
|
|
style: StudioTheme.Values.connectionPopupControlStyle
|
|
|
|
|
width: root.columnWidth
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
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
|
|
|
|
|
}
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
PopupLabel {
|
|
|
|
|
width: root.columnWidth
|
|
|
|
|
text: backend.targetNode
|
2023-10-24 12:10:29 +02:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2023-09-01 17:29:07 +02:00
|
|
|
}
|
2023-07-04 19:57:59 +02:00
|
|
|
}
|
|
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
Row {
|
|
|
|
|
spacing: root.horizontalSpacing
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-01 17:29:07 +02:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-08 15:49:58 +02:00
|
|
|
StudioControls.TopLevelComboBox {
|
|
|
|
|
id: name
|
|
|
|
|
width: root.columnWidth
|
|
|
|
|
style: StudioTheme.Values.connectionPopupControlStyle
|
2023-07-04 19:57:59 +02:00
|
|
|
|
2023-09-08 15:49:58 +02:00
|
|
|
model: backend.property.model ?? []
|
|
|
|
|
|
|
|
|
|
onActivated: backend.property.activateIndex(name.currentIndex)
|
|
|
|
|
property int currentTypeIndex: backend.property.currentIndex ?? 0
|
|
|
|
|
onCurrentTypeIndexChanged: name.currentIndex = name.currentTypeIndex
|
|
|
|
|
}
|
2023-07-04 19:57:59 +02:00
|
|
|
}
|
|
|
|
|
}
|