From 68f566cf7fddbe9e5eb08c4c07a76375148b682b Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 1 Sep 2020 22:15:39 +0200 Subject: [feat] svg map for gateway panel --- gui/qml/main.qml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) (limited to 'gui/qml/main.qml') 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) { -- cgit v1.2.3