Index: sources/device/DeviceController.cpp =================================================================== diff -u -rdeaef8b5bdfe9be7293e63fb6ac256a9ce3cd3f4 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision deaef8b5bdfe9be7293e63fb6ac256a9ce3cd3f4) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -1179,10 +1179,7 @@ */ void DeviceController::processWifiConnectResponse(int vExitCode, QProcess::ExitStatus vStatus, QProcess::ProcessChannel vChannel) { - Q_UNUSED(vStatus ) - Q_UNUSED(vChannel ) static MDeviceWifiConnectResponse model; - if ( vExitCode < 0 ) { emit didAttributeResponse(model.data()); switch (vChannel) { @@ -1196,3 +1193,61 @@ model._data.clear(); } } + +////////////////////////////////////////////////////////////////////////////////////////////////// DeviceFactoryReset +void DeviceController::onAttributeRequest(const DeviceFactoryResetRequestData &) +{ + factoryResetRequest(); +} + +/*! + * \brief DeviceController::factoryResetRequest + * \details Calls the factoryReset script + * \note This function is created to be able to call independently if needed in this class. + */ +void DeviceController::factoryResetRequest() +{ + // ----- check that script exists. + QString script; + if ( checkError( DeviceError::checkScript(script, Scripts_Factory_Reset), _deviceFactoryResetResponse, script) ) + return; + + // ----- check if the process is not running + if ( _processFactoryReset.state() != QProcess::NotRunning ) { + checkError(DeviceError::eDevice_Scripts_Error_IsRunning, _deviceFactoryResetResponse); + return; + } + + // ----- run the process + int timeout_ms = 10000; + TimedProcess *timedProcess = new TimedProcess(&_processFactoryReset, script, timeout_ms, {}); + timedProcess->start(); + + MDeviceFactoryResetResponse model; + model._data.mCompleted = false; + model._data.mAccepted = false; + model._data.mMessage = tr("Factory Reset started."); + emit didAttributeResponse(model.data()); +} + +/*! + * \brief DeviceController::processFactoryResetResponse + * \param vExitCode + * \param vStatus + */ +void DeviceController::processFactoryResetResponse(int vExitCode, QProcess::ExitStatus vStatus, QProcess::ProcessChannel vChannel) +{ + static MDeviceFactoryResetResponse model; + if ( vExitCode < 0 ) { + emit didAttributeResponse(model.data()); + switch (vChannel) { + case QProcess::StandardOutput : processFactoryResetReadyOut(model); break; + case QProcess::StandardError : processFactoryResetReadyErr(model); break; + } + } + else { + processFactoryResetComplete(model, vExitCode, vStatus); + emit didAttributeResponse(model.data()); + model._data.clear(); + } +} Index: sources/device/DeviceController.h =================================================================== diff -u -rdeaef8b5bdfe9be7293e63fb6ac256a9ce3cd3f4 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/device/DeviceController.h (.../DeviceController.h) (revision deaef8b5bdfe9be7293e63fb6ac256a9ce3cd3f4) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -462,6 +462,9 @@ void wifiInfoRequest(); void wifiConnectRequest(const DeviceWifiConnectRequestData &vData); + // ----- Factory Reset + void factoryResetRequest(); + SAFE_CALL_EX2(doAddWatch, const QString &, bool) }; } Index: sources/device/DeviceGlobals.h =================================================================== diff -u -ra2a273600d25e863214833ead3324a63fb4759f1 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/device/DeviceGlobals.h (.../DeviceGlobals.h) (revision a2a273600d25e863214833ead3324a63fb4759f1) +++ sources/device/DeviceGlobals.h (.../DeviceGlobals.h) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -102,35 +102,35 @@ * \param vExitCode - the returned exit code \ * \param vStatus - the status of the process \ */ \ - void process##vATTRIBUTEFLC##Response(int vExitCode, QProcess::ExitStatus vStatus, \ - QProcess::ProcessChannel vChannel ); \ - void process##vATTRIBUTEFLC##ReadyOut( M##Device##vATTRIBUTEFLC##Response &); \ - void process##vATTRIBUTEFLC##ReadyErr( M##Device##vATTRIBUTEFLC##Response &); \ - void process##vATTRIBUTEFLC##Complete( M##Device##vATTRIBUTEFLC##Response &, \ - int vExitCode, QProcess::ExitStatus vStatus); \ +void process##vATTRIBUTEFLC##Response(int vExitCode, QProcess::ExitStatus vStatus, \ + QProcess::ProcessChannel vChannel ); \ + void process##vATTRIBUTEFLC##ReadyOut( M##Device##vATTRIBUTEFLC##Response &); \ + void process##vATTRIBUTEFLC##ReadyErr( M##Device##vATTRIBUTEFLC##Response &); \ + void process##vATTRIBUTEFLC##Complete( M##Device##vATTRIBUTEFLC##Response &, \ + int vExitCode, QProcess::ExitStatus vStatus); \ #define DEVICE_DEV_DECLARATION( vATTRIBUTEFLC ) \ void DeviceController::process##vATTRIBUTEFLC##ReadyOut(M##Device##vATTRIBUTEFLC##Response &vModel) { \ vModel._data.mCompleted = false; \ vModel._data.mAccepted = false; \ vModel._data.mMessage = _process##vATTRIBUTEFLC.readAllStandardOutput(); \ - } \ +} \ void DeviceController::process##vATTRIBUTEFLC##ReadyErr(M##Device##vATTRIBUTEFLC##Response &vModel) { \ vModel._data.mCompleted = false; \ vModel._data.mAccepted = false; \ vModel._data.mMessage = "Err:" +_process##vATTRIBUTEFLC.readAllStandardError(); \ - } \ +} \ void DeviceController::process##vATTRIBUTEFLC##Complete(M##Device##vATTRIBUTEFLC##Response &vModel, \ int vExitCode, QProcess::ExitStatus vStatus) { \ vModel._data.mCompleted = true; \ vModel._data.mAccepted = false; \ if (vStatus) vExitCode = Device::DeviceError::eDevice_Scripts_Error_Status; /* CrashExit */ \ vModel.fromByteArray( vModel._data.mMessage.toLatin1(), &vExitCode ); \ - } \ +} \ #define DEVICE_DEV_INIT_CONNECTIONS( vATTRIBUTEFLC ) \ - /* App -> Dev //TODO: Add the error LOG connection */ \ +/* App -> Dev //TODO: Add the error LOG connection */ \ connect(&_ApplicationController , SIGNAL(didAttributeRequest(const Device##vATTRIBUTEFLC##RequestData &)), \ this , SLOT( onAttributeRequest(const Device##vATTRIBUTEFLC##RequestData &))); \ connect(&_process##vATTRIBUTEFLC, QOverload::of(&QProcess::finished), \ @@ -152,46 +152,46 @@ private Q_SLOTS : void onAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &vData) { \ /* this is a bridge only if it is required later can be removed and implemented */ \ emit didAttributeRequest(vData); /* Gui -> App */ \ - } \ +} \ Q_SIGNALS : void didAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &); \ private Q_SLOTS : void onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &vData) { \ /* this is a bridge only if it is required later can be removed and implemented */ \ emit didAttributeResponse(vData); /* Gui <- App */ \ - } \ +} \ private : #define DEVICE_APP_INIT_CONNECTIONS( vATTRIBUTEFLC ) \ - /* Gui -> App */ \ - connect(&_GuiController , SIGNAL(didAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &)), \ - this , SLOT( onAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &))); \ + /* Gui -> App */ \ + connect(&_GuiController , SIGNAL(didAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &)), \ + this , SLOT( onAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &))); \ /* App <- Dev */ \ connect(&_DeviceController , SIGNAL(didAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &)), \ this , SLOT( onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &))); /* ---------------------------- GUI */ #define DEVICE_GUI_BRIDGE_DEFINITION( vATTRIBUTEFLC ) \ - Q_SIGNALS : void didAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &); \ +Q_SIGNALS : void didAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &); \ public Q_SLOTS : void doAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &vData) { \ - /* this is a bridge only if it is required later can be removed and implemented */ \ - emit didAttributeRequest(vData); /* Gui -> App */ \ - } \ + /* this is a bridge only if it is required later can be removed and implemented */ \ + emit didAttributeRequest(vData); /* Gui -> App */ \ +} \ Q_SIGNALS : void didAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &); \ public Q_SLOTS : void onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &vData) { \ - /* this is a bridge only if it is required later can be removed and implemented */ \ - emit didAttributeResponse(vData); /* Gui <- App */ \ - } \ + /* this is a bridge only if it is required later can be removed and implemented */ \ + emit didAttributeResponse(vData); /* Gui <- App */ \ +} \ private : #define DEVICE_GUI_INIT_CONNECTIONS( vATTRIBUTEFLC ) \ - /* Gui <- App */ \ - connect(&_ApplicationController, SIGNAL(didAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &)), \ - this , SLOT( onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &))); + /* Gui <- App */ \ + connect(&_ApplicationController, SIGNAL(didAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &)), \ + this , SLOT( onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &))); /* ---------------------------- VIEW */ #define DEVICE_VIEW_INIT_CONNECTIONS( vATTRIBUTEFLC ) \ - /* to convert the value to the model and emit the signal to go to the controller (Qml -> View) */ \ +/* to convert the value to the model and emit the signal to go to the controller (Qml -> View) */ \ connect(this , SIGNAL(didAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &)), \ - &_GuiController , SLOT( doAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &))); \ + &_GuiController , SLOT( doAttributeRequest (const Device##vATTRIBUTEFLC##RequestData &))); \ /* View <- Gui */ \ connect(&_GuiController , SIGNAL(didAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &)), \ this , SLOT( onAttributeResponse(const Device##vATTRIBUTEFLC##ResponseData &))); @@ -201,18 +201,17 @@ /* ---------------------------- DEV */ // All the device attributes need to be listed here to be re-parented. #define DEVICE_DEV_PARENT_LIST \ - DEVICE_DEV_PARENT ( Brightness ) \ +DEVICE_DEV_PARENT ( Brightness ) \ DEVICE_DEV_PARENT ( USBMount ) \ DEVICE_DEV_PARENT ( WifiList ) \ DEVICE_DEV_PARENT ( WifiInfo ) \ DEVICE_DEV_PARENT ( WifiConnect ) \ - + DEVICE_DEV_PARENT ( FactoryReset ) \ /* DEVICE_DEV_PARENT ( BluetoothPairedReset ) \ DEVICE_DEV_PARENT ( BluetoothPairedQuery ) \ DEVICE_DEV_PARENT ( CryptSetup ) \ DEVICE_DEV_PARENT ( RootSSHAccess ) \ - DEVICE_DEV_PARENT ( FactoryReset ) \ DEVICE_DEV_PARENT ( Decommission ) \ */ @@ -223,12 +222,12 @@ DEVICE_DEV_INIT_CONNECTIONS ( WifiList ) \ DEVICE_DEV_INIT_CONNECTIONS ( WifiInfo ) \ DEVICE_DEV_INIT_CONNECTIONS ( WifiConnect ) \ + DEVICE_DEV_INIT_CONNECTIONS ( FactoryReset ) \ /* DEVICE_DEV_INIT_CONNECTIONS ( BluetoothPairedReset ) \ DEVICE_DEV_INIT_CONNECTIONS ( BluetoothPairedQuery ) \ DEVICE_DEV_INIT_CONNECTIONS ( CryptSetup ) \ DEVICE_DEV_INIT_CONNECTIONS ( RootSSHAccess ) \ - DEVICE_DEV_INIT_CONNECTIONS ( FactoryReset ) \ DEVICE_DEV_INIT_CONNECTIONS ( Decommission ) \ */ @@ -239,12 +238,13 @@ DEVICE_DEV_DEFINITION ( WifiList ) \ DEVICE_DEV_DEFINITION ( WifiInfo ) \ DEVICE_DEV_DEFINITION ( WifiConnect ) \ + DEVICE_DEV_DEFINITION ( FactoryReset ) \ + /* DEVICE_DEV_DEFINITION ( BluetoothPairedReset ) \ DEVICE_DEV_DEFINITION ( BluetoothPairedQuery ) \ DEVICE_DEV_DEFINITION ( CryptSetup ) \ DEVICE_DEV_DEFINITION ( RootSSHAccess ) \ - DEVICE_DEV_DEFINITION ( FactoryReset ) \ DEVICE_DEV_DEFINITION ( Decommission ) \ */ @@ -255,12 +255,13 @@ DEVICE_DEV_DECLARATION ( WifiList ) \ DEVICE_DEV_DECLARATION ( WifiInfo ) \ DEVICE_DEV_DECLARATION ( WifiConnect ) \ + DEVICE_DEV_DECLARATION ( FactoryReset ) \ + /* DEVICE_DEV_DECLARATION ( BluetoothPairedReset ) \ DEVICE_DEV_DECLARATION ( BluetoothPairedQuery ) \ DEVICE_DEV_DECLARATION ( CryptSetup ) \ DEVICE_DEV_DECLARATION ( RootSSHAccess ) \ - DEVICE_DEV_DECLARATION ( FactoryReset ) \ DEVICE_DEV_DECLARATION ( Decommission ) \ */ @@ -272,13 +273,14 @@ DEVICE_APP_INIT_CONNECTIONS ( WifiList ) \ DEVICE_APP_INIT_CONNECTIONS ( WifiInfo ) \ DEVICE_APP_INIT_CONNECTIONS ( WifiConnect ) \ + DEVICE_APP_INIT_CONNECTIONS ( FactoryReset ) \ + /* DEVICE_APP_INIT_CONNECTIONS ( BluetoothPairedReset ) \ DEVICE_APP_INIT_CONNECTIONS ( BluetoothPairedQuery ) \ DEVICE_APP_INIT_CONNECTIONS ( CryptSetup ) \ DEVICE_APP_INIT_CONNECTIONS ( RootSSHAccess ) \ DEVICE_APP_INIT_CONNECTIONS ( Decommission ) \ - DEVICE_APP_INIT_CONNECTIONS ( FactoryReset ) \ */ #define DEVICE_APP_BRIDGE_DEFINITION_LIST \ @@ -287,12 +289,13 @@ DEVICE_APP_BRIDGE_DEFINITION( WifiList ) \ DEVICE_APP_BRIDGE_DEFINITION( WifiInfo ) \ DEVICE_APP_BRIDGE_DEFINITION( WifiConnect ) \ + DEVICE_APP_BRIDGE_DEFINITION( FactoryReset ) \ + /* DEVICE_APP_BRIDGE_DEFINITION( BluetoothPairedReset ) \ DEVICE_APP_BRIDGE_DEFINITION( BluetoothPairedQuery ) \ DEVICE_APP_BRIDGE_DEFINITION( CryptSetup ) \ DEVICE_APP_BRIDGE_DEFINITION( RootSSHAccess ) \ - DEVICE_APP_BRIDGE_DEFINITION( FactoryReset ) \ DEVICE_APP_BRIDGE_DEFINITION( Decommission ) \ */ @@ -304,12 +307,13 @@ DEVICE_GUI_INIT_CONNECTIONS ( WifiList ) \ DEVICE_GUI_INIT_CONNECTIONS ( WifiInfo ) \ DEVICE_GUI_INIT_CONNECTIONS ( WifiConnect ) \ + DEVICE_GUI_INIT_CONNECTIONS ( FactoryReset ) \ + /* DEVICE_GUI_INIT_CONNECTIONS ( BluetoothPairedReset ) \ DEVICE_GUI_INIT_CONNECTIONS ( BluetoothPairedQuery ) \ DEVICE_GUI_INIT_CONNECTIONS ( CryptSetup ) \ DEVICE_GUI_INIT_CONNECTIONS ( RootSSHAccess ) \ - DEVICE_GUI_INIT_CONNECTIONS ( FactoryReset ) \ DEVICE_GUI_INIT_CONNECTIONS ( Decommission ) \ */ @@ -318,12 +322,13 @@ DEVICE_GUI_BRIDGE_DEFINITION( WifiList ) \ DEVICE_GUI_BRIDGE_DEFINITION( WifiInfo ) \ DEVICE_GUI_BRIDGE_DEFINITION( WifiConnect ) \ + DEVICE_GUI_BRIDGE_DEFINITION( FactoryReset ) \ + /* DEVICE_GUI_BRIDGE_DEFINITION( BluetoothPairedReset ) \ DEVICE_GUI_BRIDGE_DEFINITION( BluetoothPairedQuery ) \ DEVICE_GUI_BRIDGE_DEFINITION( CryptSetup ) \ DEVICE_GUI_BRIDGE_DEFINITION( RootSSHAccess ) \ - DEVICE_GUI_BRIDGE_DEFINITION( FactoryReset ) \ DEVICE_GUI_BRIDGE_DEFINITION( Decommission ) \ */ @@ -335,12 +340,13 @@ DEVICE_VIEW_INIT_CONNECTIONS( WifiList ) \ DEVICE_VIEW_INIT_CONNECTIONS( WifiInfo ) \ DEVICE_VIEW_INIT_CONNECTIONS( WifiConnect ) \ + DEVICE_VIEW_INIT_CONNECTIONS( FactoryReset ) \ + /* DEVICE_VIEW_INIT_CONNECTIONS( BluetoothPairedReset ) \ DEVICE_VIEW_INIT_CONNECTIONS( BluetoothPairedQuery ) \ DEVICE_VIEW_INIT_CONNECTIONS( CryptSetup ) \ DEVICE_VIEW_INIT_CONNECTIONS( RootSSHAccess ) \ - DEVICE_VIEW_INIT_CONNECTIONS( FactoryReset ) \ DEVICE_VIEW_INIT_CONNECTIONS( Decommission ) \ */ Index: sources/device/DeviceModels.h =================================================================== diff -u -r3f24acee28d26034c018241f9beb35fb4887c143 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/device/DeviceModels.h (.../DeviceModels.h) (revision 3f24acee28d26034c018241f9beb35fb4887c143) +++ sources/device/DeviceModels.h (.../DeviceModels.h) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -272,6 +272,7 @@ QVariantList parameters () const override { return { _data.mRootSSHAccess }; } QString infoText () const override { return QString("RootSSHAccess"); } Data data () const { return _data; } + bool fromByteArray(const QByteArray &vByteArray, int *vExitCode = nullptr) override; }; // ================================================= MDeviceFactoryReset Index: sources/device/DeviceView.cpp =================================================================== diff -u -redb8ee3edc41b1d324cd8a53e8e27a2a58289563 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision edb8ee3edc41b1d324cd8a53e8e27a2a58289563) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -204,18 +204,14 @@ // Nothing for now. } -void VDevice::factoryResetRequest(const QString &vCommand) { - Q_UNUSED(vCommand) - // DEBUG : qDebug() << "HERE Request" << vCommand; - +void VDevice::factoryResetRequest(const QString &) { factoryResetEnabled(false); DeviceFactoryResetRequestData data; emit didAttributeRequest(data); } void VDevice::onAttributeResponse(const DeviceFactoryResetResponseData &vData) { - // QDEBUG : qDebug() << "HERE Response " << Q_FUNC_INFO << " accepted: " << vData.mAccepted; // this has to be called to let Gui to set to old value that device controller provided. status(vData.mMessage); Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -r6bff7fae4c7b28a493b5824598c669fa8ab920b3 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 6bff7fae4c7b28a493b5824598c669fa8ab920b3) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -53,6 +53,8 @@ horizontalAlignment : Text.AlignHCenter verticalAlignment : Text.AlignVCenter font.pixelSize : 35 + font.weight : Font.DemiBold + } Item { id: _dateTimeItem @@ -61,20 +63,23 @@ top : parent.top left : parent.left bottom : parent.bottom - margins : 10 + margins : 5 } Column { id: _dateTimeColumn anchors.fill: parent + spacing : 5 Text { id: _timeText color : Colors.textMain width : parent.width height : parent.height * 3/5 horizontalAlignment : Text.AlignHCenter verticalAlignment : Text.AlignVCenter - text : vDateTime.time - font.pixelSize: 40 + text : vDateTime.time + font.pixelSize : 40 + font.weight : Font.DemiBold + } Text { id: _dateText @@ -84,7 +89,7 @@ horizontalAlignment : Text.AlignHCenter verticalAlignment : Text.AlignVCenter text : vDateTime.date - font.pixelSize: 25 + font.pixelSize: 22 } } } Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml =================================================================== diff -u -ree594afa3a2084c03395570954d723d04bbae215 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision ee594afa3a2084c03395570954d723d04bbae215) +++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -32,8 +32,8 @@ .arg(_calciumValueControl.value.toFixed(Variables.calciumPrecision)) .arg(Variables.unitTextCalcium) - width : 1000 - height : 600 + height : Variables.smallDialogHeight + width : Variables.smallDialogWidth padding : Variables.defaultMargin onVisibleChanged: visible ? vTreatmentRanges.doPopulateAcidConcentrate( vTreatmentCreate.acidConcentrateSet, vTreatmentCreate.acidConcentrate) : Index: sources/gui/qml/dialogs/ConfirmDialog.qml =================================================================== diff -u -rf8e37a0cbb537edceebee7a7c5f2676f497d1e26 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/dialogs/ConfirmDialog.qml (.../ConfirmDialog.qml) (revision f8e37a0cbb537edceebee7a7c5f2676f497d1e26) +++ sources/gui/qml/dialogs/ConfirmDialog.qml (.../ConfirmDialog.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -35,6 +35,9 @@ property alias cancelVisible : _cancelTouch.visible property bool autoClose : true + height : Variables.smallDialogHeight + width : Variables.smallDialogWidth + function footerUpdate() { _footer.update() } @@ -44,30 +47,38 @@ height : Variables.mainMenuHeight anchors.top : parent.top anchors.topMargin : Variables.minVGap2 // Since it doesnt have border, it looks too close to top border. - clip : true + clip : true + font.weight : Font.DemiBold } TitleText { id: _messageText - anchors.centerIn : parent + anchors.centerIn : parent + anchors.verticalCenterOffset: Variables.defaultMargin * -1 width : parent.width height : Variables.mainMenuHeight * 4 // title + reason + 2*Gap clip : true text : qsTr("Are you sure?") } Footer { id: _footer - childrenWidth: 350 + anchors.horizontalCenter : parent.horizontalCenter + + childrenWidth: Variables.defaultButtonWidth children: [ TouchRect { id : _cancelTouch - textString : qsTr("CANCEL") + textString : qsTr("Cancel") + height : Variables.defaultButtonHeight onPressed : { rejected() if ( autoClose ) close() } }, - TouchRect { id : _confirmTouch - textString : qsTr("CONFIRM") - onPressed : { + ConfirmButton { id : _confirmTouch + height : Variables.defaultButtonHeight + anchors.margins : 0 + anchors.top : undefined + anchors.right : undefined + onClicked: { accepted() if ( autoClose ) close() } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -211,6 +211,9 @@ readonly property int defaultButtonHeight : 60 readonly property int defaultButtonWidth : 244 + readonly property int smallDialogHeight : numPadHeight + readonly property int smallDialogWidth : 1000 + // ---------- < PRS > Related Section ---------- // blood flow rate readonly property int bloodFlowMin : 100 // PRS 30 Index: sources/gui/qml/pages/UserConfirmation.qml =================================================================== diff -u -r88a09dc4b26cfdd5fd111d20adfb9cb60697186c -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/pages/UserConfirmation.qml (.../UserConfirmation.qml) (revision 88a09dc4b26cfdd5fd111d20adfb9cb60697186c) +++ sources/gui/qml/pages/UserConfirmation.qml (.../UserConfirmation.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -162,8 +162,8 @@ color : Colors.textMain font.pixelSize : Fonts.fontPixelTitle anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter : parent.verticalCenter - anchors.verticalCenterOffset: Variables.defaultMargin * 5 * -1 + anchors.top : parent.top + anchors.topMargin : Variables.defaultMargin * 10 horizontalAlignment : Text.AlignHCenter verticalAlignment : Text.AlignVCenter } Index: sources/gui/qml/pages/settings/SettingsBase.qml =================================================================== diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/pages/settings/SettingsBase.qml (.../SettingsBase.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f) +++ sources/gui/qml/pages/settings/SettingsBase.qml (.../SettingsBase.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -85,7 +85,7 @@ Text { id: _titleText anchors { top : _root.top - topMargin : Variables.defaultMargin * 5 + topMargin : Variables.defaultMargin * 3 horizontalCenter: parent.horizontalCenter } horizontalAlignment : Text.AlignHCenter Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -redb8ee3edc41b1d324cd8a53e8e27a2a58289563 -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision edb8ee3edc41b1d324cd8a53e8e27a2a58289563) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -100,7 +100,7 @@ qsTr("Device Information" ), // Device Information qsTr("Volume And Brightness" ), // VolumeBrightness qsTr("Wi-Fi" ), // WiFi - qsTr("DG Cleaning" ), // DGCleaning + qsTr("Device Cleaning" ), // DGCleaning qsTr("DG Scheduling" ), // DGScheduling qsTr("Service" ), // servicePassword qsTr("Date and Time" ), // SetDateTime Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -198,7 +198,7 @@ UserConfirmation { id : _userConfirmation property string ssid : "" property string macAddress : "" - property string separator : "\n\n" + property string separator : "\n" readonly property string spaceSeparator : " " notificationText : vDevice.status message : qsTr("Do you want to disconnect from `%1`?").arg(ssid) Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml =================================================================== diff -u -rbfdee4cd41dfc4609cbd6045e64217731433f79d -re7adb742d7dd362b2deb795259694b223eea3bc0 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision bfdee4cd41dfc4609cbd6045e64217731433f79d) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) @@ -25,8 +25,8 @@ contentItem.objectName: "TreatmentAdjustmentVitals" titleText : qsTr("Vitals") titlePixelSize : Fonts.fontPixelSection - height : Variables.numPadHeight - width : 1000 + height : Variables.smallDialogHeight + width : Variables.smallDialogWidth x : numPad.isOpened ? Math.round((Variables.applicationWidth - width) / 2) - 200 : Math.round((Variables.applicationWidth - width) / 2) notification.textfontSize : 20