2020-10-11 15:50:13 +02:00
|
|
|
import QtQuick 2.0
|
|
|
|
import QtQuick.Controls 2.9
|
|
|
|
import QtQuick.Layouts 1.0
|
2020-10-13 01:58:14 +02:00
|
|
|
import QtQuick.Controls.Material 2.0
|
|
|
|
|
2020-10-11 15:50:13 +02:00
|
|
|
import de.itsblue.omobidisplayapp 1.0
|
|
|
|
import de.itsblue.bluetoothleuart 1.0
|
|
|
|
|
|
|
|
Page {
|
|
|
|
id: root
|
|
|
|
|
2020-10-13 01:58:14 +02:00
|
|
|
ColumnLayout {
|
|
|
|
anchors {
|
|
|
|
fill: parent
|
|
|
|
margins: parent.height * 0.01
|
|
|
|
topMargin: 0
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
Layout.preferredWidth: parent.width * 0.6
|
|
|
|
Layout.preferredHeight: parent.height * 0.1
|
|
|
|
Layout.alignment: Layout.Center
|
|
|
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
|
|
|
fontSizeMode: Text.Fit
|
|
|
|
font.pixelSize: 500
|
|
|
|
minimumPixelSize: 1
|
|
|
|
|
|
|
|
color: root.Material.foreground
|
|
|
|
|
|
|
|
text: "Omobi Display 1" //backend.bleController.currentDevice.name
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
Layout.alignment: Layout.Center
|
|
|
|
|
|
|
|
color: root.Material.foreground
|
|
|
|
|
|
|
|
text: qsTr("Brightness:")
|
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
from: 0
|
|
|
|
to: 10
|
|
|
|
stepSize: 1
|
|
|
|
|
|
|
|
value: backend.displayBrightness
|
|
|
|
|
|
|
|
onPressedChanged: {
|
|
|
|
if(!pressed)
|
|
|
|
backend.displayBrightness = value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DisplayTextModelListView {
|
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.alignment: Layout.Center
|
|
|
|
|
|
|
|
clip: true
|
|
|
|
}
|
2020-10-11 15:50:13 +02:00
|
|
|
}
|
2020-10-14 23:54:12 +02:00
|
|
|
|
|
|
|
Dialog {
|
|
|
|
id: loadingDialog
|
|
|
|
|
|
|
|
property bool shouldBeOpen: false
|
|
|
|
|
|
|
|
onShouldBeOpenChanged: {
|
|
|
|
if(shouldBeOpen)
|
|
|
|
open()
|
|
|
|
else
|
|
|
|
close()
|
|
|
|
}
|
|
|
|
|
|
|
|
parent: Overlay.overlay
|
|
|
|
|
|
|
|
x: (parent.width - width) / 2
|
|
|
|
y: (parent.height - height) / 2
|
|
|
|
|
|
|
|
closePolicy: Popup.NoAutoClose
|
|
|
|
modal: true
|
|
|
|
|
|
|
|
contentItem: ColumnLayout {
|
|
|
|
BusyIndicator {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
Layout.alignment: Layout.Center
|
|
|
|
text: qsTr("loading...")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
states: [
|
|
|
|
State {
|
|
|
|
name: OmobiDisplayBackend.Connected
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: OmobiDisplayBackend.Loading
|
|
|
|
|
|
|
|
PropertyChanges {
|
|
|
|
target: loadingDialog
|
|
|
|
shouldBeOpen: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-10-11 15:50:13 +02:00
|
|
|
}
|