Index: sources/gui/qml/pages/SettingsWifi.qml =================================================================== diff -u -re5a802bc26647388cfea4f1d46ae22570ec2dba3 -rea52cee2614f319804690a9b1d5091bed9676753 --- sources/gui/qml/pages/SettingsWifi.qml (.../SettingsWifi.qml) (revision e5a802bc26647388cfea4f1d46ae22570ec2dba3) +++ sources/gui/qml/pages/SettingsWifi.qml (.../SettingsWifi.qml) (revision ea52cee2614f319804690a9b1d5091bed9676753) @@ -15,6 +15,7 @@ // Qt import QtQuick 2.12 +import QtQuick.Controls 2.12 // for scrollbar // Project import Gui.Actions 0.1; @@ -41,50 +42,36 @@ regExp:/^(([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))$/ } - Rectangle { id: _rect - height: parent.height - (Variables.settingsWIFIMargin + 2*Variables.mainMenuHeight) - width: parent.width - Variables.settingsWIFIMargin - - color: Colors.transparent + TitleText { id: _title + anchors.horizontalCenter: parent.horizontalCenter anchors { top: parent.top - topMargin: Variables.settingsWIFIMargin left: parent.left - leftMargin: Variables.settingsWIFIMargin + topMargin: Variables.settingsWIFIMargin } + text: qsTr("Wifi Settings") + } - TitleText { id: _title - anchors.horizontalCenter: _rect.horizontalCenter - anchors.top: _rect.top - anchors.left: _rect.left - text: qsTr("Wifi Settings") + Rectangle { id: _rect + color: Colors.transparent + anchors { + top: _title.bottom + left: parent.left + leftMargin: Variables.settingsWIFIMargin + right: parent.right + rightMargin: Variables.settingsWIFIMargin + bottom: parent.bottom + bottomMargin: 2*Variables.mainMenuHeight } - Rectangle { id: _status - anchors { - top: _title.bottom - left: parent.left - } - - color: "transparent" - height: Variables.settingsWIFIButtonHeight - width: Variables.settingsWIFIButtonWidth - Text { id: _status_text - text: qsTr("Status: ") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTextRectExtra - wrapMode: Text.WordWrap - width: parent.width - } - } - TextEntry { id: _ip_address textInput.width: Variables.settingsWIFIInputWidth line.width: Variables.settingsWIFIInputWidth label.width: Variables.settingsWIFIInputWidth anchors { - top: _status.bottom + top: parent.top + topMargin: Variables.settingsWIFIMargin left: parent.left } validator: ipValidator @@ -149,13 +136,74 @@ left: _rect.left } - backgroundColor: Colors.backgroundButtonSelect + backgroundColor: vNetworkModel.scanInProgress ? Colors.backgroundButtonNormal : Colors.backgroundButtonSelect + textColor: vNetworkModel.scanInProgress ? "grey" : Colors.textMain height: Variables.settingsWIFIButtonHeight width: Variables.settingsWIFIButtonWidth text.text: qsTr("Scan") - animated: true - onClicked: vNetworkModel.doScan() + onClicked: { + if (!vNetworkModel.scanInProgress) + vNetworkModel.doScan() + } } - } + NotificationBarSmall { id: _notification + imageAutoSize: true + height : 25 + color: "transparent" + imageSource : "" + text : "STATUS PLACEHOLDER" + textColor: Colors.textMain + textfontSize: Fonts.fontPixelTextRectExtra + } + + ListView { id: _pairedDevices + model: vNetworkModel + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: parent.right + width: Variables.settingsWIFINetworksWidth + clip: true + spacing: 10 + + ScrollBar.vertical: ScrollBar { id: _scrollBarPairedDevices + anchors.right: parent.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + + delegate: TouchRect { + id: _network + anchors.right: parent.right + anchors.rightMargin: Variables.settingsWIFISpacing + height: Variables.settingsWIFINetworkHeight + width: Variables.settingsWIFINetworkWidth + color: Colors.backgroundMain + border.color: Colors.borderButton + border.width: 4 + radius: 20 + animated: true + + Text { + id: _ssid + anchors { + centerIn: parent + } + font.pixelSize: Fonts.fontPixelTextRectExtra + text: ssid + color: Colors.textMain + } + + onClicked: { + console.debug("Clicked " + ssid); + } + } + } + + } }