Index: denali.pro.user =================================================================== diff -u -ra64c31ec79b3af203691f70397cc31f5727f47f4 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- denali.pro.user (.../denali.pro.user) (revision a64c31ec79b3af203691f70397cc31f5727f47f4) +++ denali.pro.user (.../denali.pro.user) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- denali.qrc (.../denali.qrc) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ denali.qrc (.../denali.qrc) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -10,6 +10,7 @@ sources/gui/qml/pages/settings/SettingsStack.qml sources/gui/qml/pages/settings/SettingsHome.qml sources/gui/qml/pages/settings/SettingsDateTime.qml + sources/gui/qml/pages/settings/SettingsWiFi.qml sources/gui/qml/dialogs/PowerOff.qml @@ -106,6 +107,7 @@ sources/gui/qml/components/TimeCircle.qml sources/gui/qml/components/Footer.qml sources/gui/qml/components/TextEntry.qml + sources/gui/qml/components/ScrollBar.qml sources/gui/qml/compounds/PressureRangeSlider.qml Index: sources/gui/qml/components/Background.qml =================================================================== diff -u -rc15ce613e372838316d42c40a86953e6f0aa05d3 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/components/Background.qml (.../Background.qml) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) +++ sources/gui/qml/components/Background.qml (.../Background.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -22,4 +22,5 @@ Rectangle { id: _root anchors.fill: parent color: Colors.backgroundMain + radius: 5 } Index: sources/gui/qml/components/ConfirmTreatmentTable.qml =================================================================== diff -u -r7cc15ae5968205b241a08ca4646f283b8bf97b03 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/components/ConfirmTreatmentTable.qml (.../ConfirmTreatmentTable.qml) (revision 7cc15ae5968205b241a08ca4646f283b8bf97b03) +++ sources/gui/qml/components/ConfirmTreatmentTable.qml (.../ConfirmTreatmentTable.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -21,12 +21,10 @@ import "qrc:/globals" import "qrc:/components" -Rectangle { - id: _root +Item { id: _root objectName: "ConfirmTreatmentTable" width: Variables.createTreatmentTableWidth height: Variables.createTreatmentTableHeight - color: Colors.backgroundDialog Rectangle { id: _header Index: sources/gui/qml/components/ScrollBar.qml =================================================================== diff -u --- sources/gui/qml/components/ScrollBar.qml (revision 0) +++ sources/gui/qml/components/ScrollBar.qml (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -0,0 +1,48 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file ScrollBar.qml + * \author (last) Behrouz NematiPour + * \date (last) 05-May-2021 + * \author (original) Behrouz NematiPour + * \date (original) 05-May-2021 + * + */ + +// Qt +import QtQuick 2.12 + + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the ScrollBar Component + */ + +Background { id: _root + property Flickable flickable: undefined + property alias scrollColor : _scrollbar.color + property alias backColor : _root.color + property real scrollMargin : 0 + + clip: true + color : Colors.transparent + Rectangle { id: _scrollbar + anchors { + right : _root.right + rightMargin : _root.scrollMargin + } + width : 5 + radius : width + y : ( flickable instanceof Flickable) ? flickable.height * flickable.visibleArea.yPosition : 0 + height : ( flickable instanceof Flickable) ? flickable.height * flickable.visibleArea.heightRatio : 0 + color : "#80696969" // half transparent dimgray + } +} Index: sources/gui/qml/main.qml =================================================================== diff -u -re125bd5cf13750eaf241d518b9c846139afaa81c -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/main.qml (.../main.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) +++ sources/gui/qml/main.qml (.../main.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -111,6 +111,12 @@ VSettings { id: vSettings } VAdjustmentVersions { id: vAdjustmentVersions } VDateTime { id: vDateTime } + QtObject { id: vNetwork + property string status: "No Status" + property string ipAddress: "192.168.10.1" + property string gateway : "192.168.10.2" + + } // ---- States VHDOperationMode { id: vHDOperationMode } VPreTreatmentStates { id: vPreTreatmentStates } Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -r2216ac6ac7f77437a7c29ac8b4043be01bc4609e -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 2216ac6ac7f77437a7c29ac8b4043be01bc4609e) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -43,19 +43,10 @@ enabled : vPostTreatmentAdjustmentTreatmentLog.isIdle && _GuiView.usbReady } - Rectangle { id: _backgroud - clip: true + ScrollBar { anchors.fill: _flickable - color : Colors.backgroundDialog - radius : 5 - Rectangle { id: _scrollbar - anchors.right: parent.right - width : 5 - radius : width - y : _flickable.height * _flickable.visibleArea.yPosition - height : _flickable.height * _flickable.visibleArea.heightRatio - color : "#80696969" // half transparent dimgray - } + flickable : _flickable + backColor : Colors.backgroundDialog } Flickable { id: _flickable @@ -67,7 +58,7 @@ bottomMargin : Variables.notificationHeight + Variables.minVGap horizontalCenter: parent.horizontalCenter } - width : parent.width - Variables.minVGap * 2 // * 2 : for each side + width : parent.width - Variables.minVGap2 * 2 // * 2 : for each side contentWidth : width contentHeight: _parametersGrid.height @@ -95,3 +86,4 @@ } } } + Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml =================================================================== diff -u -rd30b025325e38d823282ff23e28d35adf3d1d907 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (.../PreTreatmentConfirm.qml) (revision d30b025325e38d823282ff23e28d35adf3d1d907) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (.../PreTreatmentConfirm.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -30,6 +30,14 @@ PreTreatmentBase { id: _root objectName: "_PreTreatmentConfirm" + ScrollBar { + backColor : Colors.backgroundDialog + flickable : _flickable + anchors.fill: _flickable + anchors.rightMargin : Variables.minVGap2 + anchors.leftMargin : Variables.minVGap2 + } + Flickable { id: _flickable objectName: "_PreTreatmentConfirmFlickable" anchors { @@ -44,17 +52,6 @@ contentHeight : _column.implicitHeight clip: true - ScrollBar.vertical: ScrollBar { id: _scrollBar - anchors.right: _flickable.right - anchors.rightMargin: 3 - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } - } - Column { id: _column spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r9327fae7b109203ca698d361b113a81d139a0cf9 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 9327fae7b109203ca698d361b113a81d139a0cf9) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -36,8 +36,15 @@ _flickable.interactive = isInteractive } + ScrollBar { + flickable : _flickable + anchors.fill: _flickable + anchors.rightMargin : Variables.minVGap + } + Flickable { id: _flickable objectName: "TreatmentCreateFlickable" + clip: true anchors { top : _root.title.bottom topMargin : Variables.minVGap @@ -48,20 +55,8 @@ width: parent.width contentWidth: parent.width contentHeight: _column.implicitHeight - clip: true flickDeceleration: Variables.createTreatmentFlickableDeceleration - ScrollBar.vertical: ScrollBar { id: _scrollBar - anchors.right: _flickable.right - anchors.rightMargin: 3 - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } - } - Column { id: _column spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -re8ffaa51e4eb9b55efebebc13899f79d9a5ca946 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision e8ffaa51e4eb9b55efebebc13899f79d9a5ca946) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -51,6 +51,10 @@ itemIndex : SettingsStack.SetDateTime } + SettingsWiFi { id: _settingsWiFi + itemIndex : SettingsStack.WiFi + } + SettingsHome { id : _settingsHome backVisible : false confirmVisible : false @@ -60,11 +64,13 @@ switch (vIndex) { case SettingsStack.SetDateTime: vDateTime.doInit() - push(_settingsDateTime) + push( _settingsDateTime ) _settingsDateTime.setFocus() break - - case 1: + case SettingsStack.WiFi: + push( _settingsWiFi ) + break + default: console.debug(vIndex) break } Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u --- sources/gui/qml/pages/settings/SettingsWiFi.qml (revision 0) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -0,0 +1,83 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file SettingsWiFi.qml + * \author (last) Peter Lucia + * \date (last) 23-Sept-2020 + * \author (original) Peter Lucia + * \date (original) 23-Sept-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +import Gui.Actions 0.1; + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief SettingsWiFi + * The settings screen to setup the WiFi connection + */ +SettingsBase { id: _root + + function setFocus() { + _hours.textInput.forceActiveFocus() + _keyboard.setVisible(true) + } + + property var ipValidator: RegExpValidator { + 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]))$/ + } + + property int labelWidth : 275 + property int inputWidth : 275 + property int spacing : 20 + + readonly property bool isValid : false + // _year .textInput.acceptableInput && + // _month .textInput.acceptableInput && + // _day .textInput.acceptableInput && + // _hours .textInput.acceptableInput && + // _minutes.textInput.acceptableInput + + confirmEnabled: isValid + + notificationText: vNetwork.status + onConfirmClicked: { + // vDateTime.doConfirm( + // _year .textInput.text , + // _month .textInput.text , + // _day .textInput.text , + // _hours .textInput.text , + // _minutes.textInput.text ) + } + + Column { id: _container + spacing: _root.spacing + anchors.horizontalCenter: parent.horizontalCenter + + TextEntry { id: _ipAddress + textInput.text : vNetwork.ipAddress + label.text : qsTr("IP Address") + width : inputWidth + validator : ipValidator + nextInput : _gateway + } + + TextEntry { id: _gateway + textInput.text : vNetwork.gateway + width : inputWidth + label.text : qsTr("Gateway") + validator : ipValidator + } + } +} Index: sources/view/settings/VDateTime.cpp =================================================================== diff -u -raad2e406efd1fc2589a19004eb86ca6277f41aea -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision aad2e406efd1fc2589a19004eb86ca6277f41aea) +++ sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -45,7 +45,7 @@ _acceptDG = NOT_SET; _acceptUI = NOT_SET; QDateTime _currentTime = QDateTime::currentDateTime(); - hour (_currentTime.toString("hh" )); + hour (_currentTime.toString("HH" )); minute(_currentTime.toString("mm" )); second(_currentTime.toString("ss" )); day (_currentTime.toString("dd" )); @@ -173,6 +173,7 @@ */ void VDateTime::dateTimeUI(const QString &vDateTime) { + if ( _process.state() != QProcess::NotRunning ) { return; } QString mScript = Storage::Scripts_Path_Name; mScript += Storage::Date_Time_Set_Sh; _process.start(mScript, QStringList() << vDateTime); Index: sources/view/settings/VDateTime.h =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -r577ab4647b2584d4e32b26797281ec1543d2e1aa --- sources/view/settings/VDateTime.h (.../VDateTime.h) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/view/settings/VDateTime.h (.../VDateTime.h) (revision 577ab4647b2584d4e32b26797281ec1543d2e1aa) @@ -44,7 +44,7 @@ public: enum DateTimeSetStatus { - NOT_SET = -1, + NOT_SET = -1, FAILED , // 0 == false == FAILED SUCCEED , // 1 == true == SUCCEED }; @@ -68,12 +68,12 @@ QString status(DateTimeSetStatus vStatus, quint8 vReason); void updateStatus(); - PROPERTY(QString, year , "0000") - PROPERTY(QString, month , "00" ) - PROPERTY(QString, day , "00" ) - PROPERTY(QString, hour , "00" ) - PROPERTY(QString, minute , "00" ) - PROPERTY(QString, second , "00" ) + TRIGGER (QString, year , "0000") + TRIGGER (QString, month , "00" ) + TRIGGER (QString, day , "00" ) + TRIGGER (QString, hour , "00" ) + TRIGGER (QString, minute , "00" ) + TRIGGER (QString, second , "00" ) PROPERTY(QString, status , "" ) VIEW_DEC_CLASS(VDateTime)