summaryrefslogtreecommitdiff
path: root/gui/qml/main.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-01 22:15:39 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-05-04 14:58:39 +0200
commit68f566cf7fddbe9e5eb08c4c07a76375148b682b (patch)
treeea8cbf00cce36a87e6c1e81ccd74ec8d8d19edf0 /gui/qml/main.qml
parentf2ccc80e606f804bf19d4869f892b29218f05dd6 (diff)
[feat] svg map for gateway panel
Diffstat (limited to 'gui/qml/main.qml')
-rw-r--r--gui/qml/main.qml51
1 files changed, 49 insertions, 2 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index aed08ea..98a4445 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -1,6 +1,7 @@
import QtQuick 2.9
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
import QtQuick.Extras 1.2
import Qt.labs.platform 1.1 as LabsPlatform
@@ -8,7 +9,9 @@ import Qt.labs.platform 1.1 as LabsPlatform
ApplicationWindow {
id: app
- visible: false
+ visible: true
+ width: 700
+ height: 700
flags: Qt.WindowsStaysOnTopHint | Qt.Popup
@@ -16,6 +19,48 @@ ApplicationWindow {
property var loginDone
property var allowEmptyPass
+ ColumnLayout{
+ anchors.centerIn: parent
+ width: parent.width
+ Layout.preferredHeight: parent.height
+ visible: true
+
+ Text{
+ id: mainStatus
+ text: "Status: off"
+ font.pixelSize: 22
+ Layout.preferredWidth: parent.width
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ Label {
+ text: "gateway selection:"
+ font.pixelSize: 20
+ }
+
+ ComboBox {
+ id: comboGw
+ editable: false
+ model: [ qsTr("Automatic"), qsTr("Paris"), qsTr("Amsterdam") ]
+ onAccepted: {
+ if (combo.find(currentText) === -1) {
+ currentIndex = combo.find(editText)
+ }
+ }
+ }
+
+ ColumnLayout{
+ width: parent.width
+
+ Image {
+ id: worldMap
+ source: "qrc:/assets/svg/world.svg"
+ fillMode: Image.PreserveAspectCrop
+ }
+ }
+ }
+
+
Connections {
target: jsonModel
onDataChanged: {
@@ -99,7 +144,9 @@ ApplicationWindow {
allowEmptyPass = shouldAllowEmptyPass()
/* TODO get appVisible flag from backend */
- app.visible = false
+ app.visible = true;
+ show();
+ hide();
}
function toHuman(st) {