- RowLayout {
- anchors.fill: parent
- spacing: 0
- Item {
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.preferredWidth: 295 - 76
- ColumnLayout {
- anchors.fill: parent
- anchors.margins: 40
- spacing: 0
- Text {
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: Qt.formatDate(now, 'dddd').toUpperCase()
- font.family: 'Roboto'
- font.pixelSize: 13
- color: 'white'
- verticalAlignment: Text.AlignVCenter
-// Rectangle {
-// anchors.fill: parent
-// anchors.margins: 5
-// color: 'red'
-// border.color: 'blue'
-// border.width: 1
-// z: -1
-// }
+ RowLayout {
+ anchors.fill: parent
+ spacing: 0
+ RowLayout {
+ id: icons
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ Layout.preferredWidth: 120
+ spacing: -10
+
+ Image {
+ id: bt_icon
+ Layout.preferredWidth: 50
+ Layout.preferredHeight: 50
+ source: connStatus ? './images/Status/HMI_Status_Bluetooth_On-01.png' : './images/Status/HMI_Status_Bluetooth_Inactive-01.png'
+ fillMode: Image.PreserveAspectFit
+ property string deviceName: "none"
+ property bool connStatus: false
+ Connections {
+ target: bluetooth
+ onConnectionEvent: {
+ console.log("onConnectionEvent", data.Status)
+ if (data.Status === "connected") {
+ bt_icon.connStatus = true
+ } else if (data.Status === "disconnected") {
+ bt_icon.connStatus = false
+ }
+ }
+ onDeviceUpdateEvent: {
+ console.log("onConnectionEvent", data.Paired)
+ if (data.Paired === "True" && data.Connected === "True") {
+ bt_icon.deviceName = data.name
+ bt_icon.connStatus = true
+ } else {
+ if(bt_icon.deviceName === data.Name)
+ {
+ bt_icon.connStatus = false
+ }
+ }
+ }
+ }