Index: denali.qrc =================================================================== diff -u -rc77365fa76422bc2150e58d483c446325b50f4b8 -r632f698e13711e6544a28c7a72d276d2bf5f000e --- denali.qrc (.../denali.qrc) (revision c77365fa76422bc2150e58d483c446325b50f4b8) +++ denali.qrc (.../denali.qrc) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) @@ -6,6 +6,7 @@ sources/gui/qml/pages/ManagerHome.qml sources/gui/qml/pages/SettingsBluetooth.qml sources/gui/qml/pages/SettingsWifi.qml + sources/gui/qml/pages/SettingsDateTimeSet.qml sources/gui/qml/dialogs/PowerOff.qml Index: sources/gui/qml/components/TextEntry.qml =================================================================== diff -u -re5a802bc26647388cfea4f1d46ae22570ec2dba3 -r632f698e13711e6544a28c7a72d276d2bf5f000e --- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision e5a802bc26647388cfea4f1d46ae22570ec2dba3) +++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) @@ -26,6 +26,7 @@ property alias label : _label property alias labelText : _label.text property alias validator : _input.validator + property alias labelVisible : _label.visible signal enterPressed() width: Variables.textInputWidth Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r13ac42cf8bdc5038dedd3302ba79dc387e5704b4 -r632f698e13711e6544a28c7a72d276d2bf5f000e --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 13ac42cf8bdc5038dedd3302ba79dc387e5704b4) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) @@ -144,6 +144,10 @@ readonly property int textInputHeight : 50 readonly property int textInputLineWidth : 100 + readonly property int settingsDateTimeSetMargin : settingsWIFIMargin + readonly property int settingsDateTimeSetSpacing : settingsWIFISpacing + readonly property int settingsDateTimeSetInputWidth : settingsWIFIInputWidth + // ---------- < PRS > Related Section ---------- // Min/Max readonly property int bloodFlowMin : 100 Index: sources/gui/qml/pages/SettingsDateTimeSet.qml =================================================================== diff -u --- sources/gui/qml/pages/SettingsDateTimeSet.qml (revision 0) +++ sources/gui/qml/pages/SettingsDateTimeSet.qml (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) @@ -0,0 +1,108 @@ +/*! + * + * 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 SettingsDateTimeSet.qml + * \author (last) Peter Lucia + * \date (last) 14-Mar-2021 + * \author (original) Peter Lucia + * \date (original) 14-Mar-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +import Gui.Actions 0.1; + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief SettingsDateTimeSet is used to adjust the + * date and time on the device + */ +ScreenItem { id: _root + + signal clickedBack() + + BackButton { id : _backButton + onClicked: { + vBluetooth.doSaveMyDevices() + _root.clickedBack() + } + } + + TitleText { id: _title + anchors { + top: parent.top + left: parent.left + topMargin: Variables.settingsDateTimeSetMargin + horizontalCenter: parent.horizontalCenter + } + text: qsTr("Set Date and Time") + } + + Rectangle { id: _rect + color: Colors.transparent + anchors { + top: _title.bottom + left: parent.left + leftMargin: Variables.settingsDateTimeSetMargin + right: parent.right + rightMargin: Variables.settingsDateTimeSetMargin + bottom: parent.bottom + bottomMargin: 2*Variables.mainMenuHeight + } + + TextEntry { id: _time + textInput.width: Variables.settingsDateTimeSetInputWidth + line.width: Variables.settingsDateTimeSetInputWidth + label.width: Variables.settingsDateTimeSetInputWidth + anchors { + top: parent.top + topMargin: Variables.settingsDateTimeSetMargin + horizontalCenter: parent.horizontalCenter + } + labelText: qsTr("Time (HH:MM) ") + textInput.text: "HH" + onEnterPressed: { + _keyboard.setVisible(false) + } + } + + TextEntry { id: _date + textInput.width: Variables.settingsDateTimeSetInputWidth + line.width: Variables.settingsDateTimeSetInputWidth + label.width: Variables.settingsDateTimeSetInputWidth + anchors { + top: _time.bottom + topMargin: Variables.settingsDateTimeSetMargin + horizontalCenter: parent.horizontalCenter + } + labelText: qsTr("Date (MM/DD/YYYY) ") + textInput.text: "MM" + onEnterPressed: { + _keyboard.setVisible(false) + } + } + + + TouchRect { id: _save + anchors { + bottom: parent.bottom + horizontalCenter: parent.horizontalCenter + } + backgroundColor: Colors.backgroundButtonSelect + textColor: Colors.textMain + text.text: qsTr("Save") + onClicked: console.debug("Clicked Save Date and Time") + } + } + +} Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r60db0ce19666f04ea58992a7670497d83f9bf7c4 -r632f698e13711e6544a28c7a72d276d2bf5f000e --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 60db0ce19666f04ea58992a7670497d83f9bf7c4) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) @@ -108,7 +108,11 @@ SettingsWifi { id: _wifi onClickedBack: pop() + } + SettingsDateTimeSet { + id: _dateTimeSet + onClickedBack: pop() } Column { @@ -127,6 +131,12 @@ vNetworkModel.doScan() } } + SettingsItem { id: _itemDateTimeSet + title : qsTr("Set Date and Time") + onClicked: { + push(_dateTimeSet); + } + } } }