Skip to content

Commit 7315a89

Browse files
committed
Merge commit 'adf09281281a5175cf4009aa763ec3f41b1f5e19'
Conflicts: 3rdparty/BBIOConfig/qml/BBIOConfig.qml 3rdparty/BBIOConfig/qml/Pin.qml
2 parents 6aec5b6 + fd666c4 commit 7315a89

File tree

5 files changed

+36
-6
lines changed

5 files changed

+36
-6
lines changed

qml/BBIOConfig.qml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ Rectangle {
211211
currentColorMap: selector.currentColorMap
212212
loadedOverlays: overlaySelector.output
213213
previewType: legend.previewType
214-
previewEnabled: legend.previewEnabled
214+
previewOverlay: overlaySelector.hoveredItem
215+
previewEnabled: (legend.previewType != "") || (overlaySelector.hoveredItem != "")
215216
configMode: configModeSelector.currentIndex
216217
portNumber: 9
217218
displayUneditablePins: displayUneditablePinsCheck.checked
@@ -242,7 +243,12 @@ Rectangle {
242243
currentColorMap: selector.currentColorMap
243244
loadedOverlays: overlaySelector.output
244245
previewType: legend.previewType
246+
<<<<<<< HEAD
245247
previewEnabled: legend.previewEnabled
248+
=======
249+
previewOverlay: overlaySelector.hoveredItem
250+
previewEnabled: (legend.previewType != "") || (overlaySelector.hoveredItem != "")
251+
>>>>>>> adf09281281a5175cf4009aa763ec3f41b1f5e19
246252
configMode: configModeSelector.currentIndex
247253
portNumber: 8
248254
displayUneditablePins: displayUneditablePinsCheck.checked

qml/Legend.qml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ GroupBox {
2424
property var colorMap: [["GPIO", "red"], ["I2C", "blue"], ["UART", "green"]]
2525
property var pinList: []
2626
property string previewType: ""
27-
property bool previewEnabled: false
2827
property int pinSize: main.width*0.125
2928
property int pinSpacing: 2
3029

@@ -101,10 +100,9 @@ GroupBox {
101100

102101
function previewEntered(type) {
103102
main.previewType = type
104-
main.previewEnabled = true
105103
}
106104

107105
function previewExited() {
108-
main.previewEnabled = false
106+
main.previewType = ""
109107
}
110108
}

qml/OverlaySelector.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import QtQuick.Controls 1.0
2323
GroupBox {
2424
property var input: ["test", "test2", "test3"]
2525
property var output: []
26+
property string hoveredItem: ""
2627

2728
id: main
2829
width: 300
@@ -42,6 +43,7 @@ GroupBox {
4243
text: name
4344
checked: itemChecked
4445
onClicked: selectionChanged(index, checked)
46+
onHoveredChanged: hovered ? main.hoveredItem = text : main.hoveredItem = ""
4547
}
4648
}
4749

qml/Pin.qml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Item {
3131
property var loadedOverlays: ["cape-test", "cape-test2"] // currently loaded overlay
3232
property bool pinmuxActive: getPinmuxActive() // determines wheter the pinmux is active or not
3333
property string previewType: "" // type for preview mode
34+
property string previewOverlay: "" // overlay for preview mode
3435
property bool previewEnabled: false // enabled the preview mdoe
3536
property bool previewActive: getPreviewActive() // holds whether the preview is active or not
3637
property string gpioDirection: "unmodified" // type of the gpio pin (in or out)
@@ -109,7 +110,12 @@ Item {
109110
searchValue = main.gpioValue
110111
}
111112
else if (main.previewActive) {
112-
searchValue = main.previewType
113+
if (main.previewType != "")
114+
searchValue = main.previewType
115+
else if (overlayPreviewTimer.x) // previewing an overlay -> blinking
116+
return "white"
117+
else
118+
searchValue = main.defaultFunction
113119
}
114120
else if (main.pinmuxActive) {
115121
searchValue = main.type
@@ -130,6 +136,9 @@ Item {
130136

131137
function getPreviewActive() {
132138

139+
if (previewEnabled && (previewType == "") && (previewOverlay == overlay))
140+
return true
141+
133142
if ((!previewEnabled) || (previewType == ""))
134143
return false
135144

@@ -146,6 +155,19 @@ Item {
146155
width: 100
147156
height: 62
148157

158+
<<<<<<< HEAD
159+
=======
160+
Timer {
161+
property color previewColor: "white"
162+
property bool x: true
163+
id: overlayPreviewTimer
164+
interval: 400
165+
running: previewActive && (previewOverlay != "")
166+
repeat: true
167+
onTriggered: x = !x
168+
}
169+
170+
>>>>>>> adf09281281a5175cf4009aa763ec3f41b1f5e19
149171
ToolTip {
150172
anchors.left: rightSide?parent.right:undefined
151173
anchors.leftMargin: parent.width*0.8
@@ -156,7 +178,7 @@ Item {
156178
color: "white"
157179
border.color: "black"
158180

159-
visible: (comboBox.hovered || mouseArea.containsMouse) && !(previewEnabled && (previewType == ""))
181+
visible: (comboBox.hovered || comboBox2.hovered || comboBox3.hovered || mouseArea.containsMouse) && !(previewEnabled && (previewType == ""))
160182
z: 1000
161183

162184
Text {

qml/Port.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Rectangle {
2727
property var currentColorMap: [[["GPIO", "red"], ["I2C", "blue"], ["UART", "green"]]]
2828
property var loadedOverlays: []
2929
property string previewType: ""
30+
property string previewOverlay: ""
3031
property bool previewEnabled: false
3132
property int configMode: 0
3233
property int portNumber: 0
@@ -55,6 +56,7 @@ Rectangle {
5556
"functions": [],
5657
"loadedOverlays": Qt.binding(function(){return main.loadedOverlays}),
5758
"previewType": Qt.binding(function(){return main.previewType}),
59+
"previewOverlay": Qt.binding(function(){return main.previewOverlay}),
5860
"previewEnabled": Qt.binding(function(){return main.previewEnabled}),
5961
"configMode": Qt.binding(function(){return main.configMode}),
6062
"displayUneditablePins": Qt.binding(function(){return main.displayUneditablePins}),

0 commit comments

Comments
 (0)