blob: 7405f82a47b56912af1ff44459412f1e569b2511 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// 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 StudioControls 1.0 as StudioControls
import StudioTheme 1.0 as StudioTheme
import HelperWidgets 2.0 as HelperWidgets
PopupDialog {
id: root
property alias backend: form.backend
titleBar: Row {
spacing: 30 // TODO
anchors.fill: parent
Text {
color: StudioTheme.Values.themeTextColor
text: qsTr("Target")
font.pixelSize: StudioTheme.Values.myFontSize
anchors.verticalCenter: parent.verticalCenter
HelperWidgets.ToolTipArea {
anchors.fill: parent
tooltip: qsTr("Choose the target for the signal.")
}
}
StudioControls.TopLevelComboBox {
id: target
style: StudioTheme.Values.connectionPopupControlStyle
width: 180
anchors.verticalCenter: parent.verticalCenter
model: backend.signal.id.model ?? 0
onActivated: backend.signal.id.activateIndex(target.currentIndex)
property int currentTypeIndex: backend.signal.id.currentIndex ?? 0
onCurrentTypeIndexChanged: target.currentIndex = target.currentTypeIndex
}
}
ConnectionsDialogForm {
id: form
Connections {
target: root.backend
onPopupTargetRemoved: {
root.close()
}
}
}
}
|