This repository has been archived by the owner on Feb 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AListDelegate.qml
93 lines (82 loc) · 2.82 KB
/
AListDelegate.qml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
RowLayout {
id: root
property var eeParameter
property var list
property bool isCurrent: list.currentIndex === index
Rectangle {
Layout.preferredWidth: (isCurrent || mouseArea.containsMouse) ? globStyle.size * 0.25 : 0
color: isCurrent ? enabled? globStyle.accent : globStyle.accentFaded : globStyle.foreground
Layout.fillHeight: true
Layout.fillWidth: false
Layout.rightMargin: globStyle.size * 0.25
Behavior on Layout.preferredWidth {
NumberAnimation { duration: 100 }
}
}
ColumnLayout {
id: colRoot
Layout.bottomMargin: globStyle.size * 0.25
Layout.rightMargin: isAndroid ? 0 : (globStyle.size * 0.2)
RowLayout {
Layout.preferredWidth: 65535
Layout.fillWidth: true
Layout.rightMargin: globStyle.size * 0.25
id: row
ColumnLayout {
id: colLabels
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.topMargin: globStyle.size * 0.25
Layout.bottomMargin: globStyle.size * 0.25
spacing: 0
ALabel {
text: eeParameter.name
size: 1.5
color: isCurrent ? enabled? globStyle.accent : globStyle.accentFaded : enabled?globStyle.foreground : globStyle.foregroundFaded
}
ALabel {
id: description
text: eeParameter.description
size: 1
color: enabled? globStyle.accent : globStyle.accentFaded
visible: list.currentIndex === index
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
width: colLabels.width
height: colLabels.height
Layout.fillHeight: false
Layout.fillWidth: true
hoverEnabled: true
onClicked: {
list.changeIndex(index)
}
}
AActionRow {
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
visible: isCurrent
onRestoreParameter: {
panel.restoreParameter()
}
onLoadParameter: {
panel.loadParameter()
}
onStoreParameter: {
panel.storeParameter()
}
}
}
AParameterPanel {
id: panel
load: isCurrent
visible: isCurrent
Layout.preferredWidth: 65535
Layout.fillWidth: true
eeParameter: root.eeParameter
}
}
}