Index: denali.pro =================================================================== diff -u -r88563177f10f20ced98750b2e40036201728131d -r066258b65a1c41afe3828c92d2606d2642505d72 --- denali.pro (.../denali.pro) (revision 88563177f10f20ced98750b2e40036201728131d) +++ denali.pro (.../denali.pro) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -20,12 +20,13 @@ # and use that MACRO for conditional build message($$QMAKESPEC) linux-g++ { - message(Linux.g++) - DEFINES += BUILD_FOR_GCC + message("Building for desktop") + DEFINES += BUILD_FOR_DESKTOP } + linux-oe-generic-g++ { - message(Linux.poky) - DEFINES += BUILD_FOR_POKY + message("Building for target") + DEFINES += BUILD_FOR_TARGET } # The following define makes your compiler emit warnings if you use Index: denali.pro.user =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r066258b65a1c41afe3828c92d2606d2642505d72 --- denali.pro.user (.../denali.pro.user) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ denali.pro.user (.../denali.pro.user) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r066258b65a1c41afe3828c92d2606d2642505d72 --- denali.qrc (.../denali.qrc) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ denali.qrc (.../denali.qrc) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -108,6 +108,7 @@ sources/gui/qml/compounds/StepNavigationTitleBar.qml sources/gui/qml/compounds/InstructionView.qml sources/gui/qml/compounds/CheckListView.qml + sources/gui/qml/compounds/TouchGrid.qml qtquickcontrols2.conf Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r73091a6f5717c0fc88e236c06c618ad361f30a3c -r066258b65a1c41afe3828c92d2606d2642505d72 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 73091a6f5717c0fc88e236c06c618ad361f30a3c) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -31,6 +31,7 @@ property bool isDefault : false property bool selectable : false property bool selected : false + readonly property alias isPressed : _mouseArea.pressed property color textColor : Colors.textButton property color borderColor : Colors.borderButton @@ -84,10 +85,9 @@ radius : Variables.touchRectRadius border.width: Variables.borderWidth - - Text { id: _text - anchors.centerIn: parent + anchors.verticalCenter : parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter color: enabled ? _root.textColor : Colors.textDisableButton font.pixelSize: Fonts.fontPixelButton } @@ -98,6 +98,5 @@ onClicked : _root.clicked() onPressed : _root.pressed() onReleased : _root.released() - } } Index: sources/gui/qml/compounds/TouchGrid.qml =================================================================== diff -u --- sources/gui/qml/compounds/TouchGrid.qml (revision 0) +++ sources/gui/qml/compounds/TouchGrid.qml (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -0,0 +1,80 @@ +/*! + * + * 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 TouchGrid.qml + * \author (last) Behrouz NematiPour + * \date (last) 14-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 14-Apr-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief TouchGrid is a list of touchRect components layed out in a Grid + */ +Item { id: _root + objectName: "_TouchGrid" + + property var itemsText : [] + property var itemsEnabled : [] + property int itemWidth : 350 + property int itemHeight : 50 + + readonly property int rowCount : 5 // rowCount should be readonly because it depends on the available space on the screen + readonly property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1 + readonly property int titleTopMargin: 110 + + signal itemClicked(int vIndex) + + Grid { id: _grid + flow: Grid.TopToBottom + anchors.centerIn: _root + columns : _root.colCount + rows : _root.rowCount + rowSpacing : 25 + columnSpacing : 100 + Repeater { + model : _root.itemsText + TouchRect { id: _touchItem + text.anchors.horizontalCenter: undefined + text.leftPadding: 15 + + text.text : modelData + border.width: 0 + height : _root.itemHeight + width : _root.itemWidth + radius : 5 + enabled : _root.itemsEnabled[index] !== undefined ? _root.itemsEnabled[index] : true + onClicked : _root.itemClicked(index) + + Image { + visible: _touchItem.enabled && ! _touchItem.isPressed + anchors.right: _touchItem.right + anchors.verticalCenter: _touchItem.verticalCenter + width : Variables.arrowWidth + height: Variables.arrowHeight + source: "qrc:/images/iArrowRight" + } + + Line { + visible: ! _touchItem.isPressed + color: _touchItem.enabled ? Colors.borderButtonHalfDarker : Colors.borderDisableButton + anchors.left : _touchItem.left + anchors.right : _touchItem.right + anchors.bottom : _touchItem.bottom + } + } + } + } +} Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r73091a6f5717c0fc88e236c06c618ad361f30a3c -r066258b65a1c41afe3828c92d2606d2642505d72 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 73091a6f5717c0fc88e236c06c618ad361f30a3c) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -59,6 +59,7 @@ readonly property color textInvalid : red readonly property color borderButton : "#4290EC" //K:D //"#438FEB" + readonly property color borderButtonHalfDarker : Qt.darker(borderButton, 1.50) readonly property color borderButtonUnselected : "#53667d" readonly property color borderDisableButton : "#607A91" readonly property color boderSeparatorLine : "#476982" Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r73091a6f5717c0fc88e236c06c618ad361f30a3c -r066258b65a1c41afe3828c92d2606d2642505d72 --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 73091a6f5717c0fc88e236c06c618ad361f30a3c) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -16,18 +16,61 @@ // Qt import QtQuick 2.12 -// Project -import Gui.Actions 0.1; - // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/compounds" /*! * \brief SettingsHome is the screen * which is the default screen in the "Settings" stack */ ScreenItem { id: _root + objectName: "_SettingsHome" + + property alias itemsText : _settingItems.itemsText + property alias itemsEnabled : _settingItems.itemsEnabled + + readonly property int rowCount : 5 // rowCount should be readonly because it depends on the available space on the screen + readonly property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1 + readonly property int titleTopMargin: 110 + + signal itemClicked(int vIndex) + + Text { id: _titleText + anchors { + top : _root.top + topMargin : titleTopMargin + horizontalCenter: parent.horizontalCenter + } + text : qsTr("Device Settings") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTitle + } + + TouchGrid { id: _settingItems + anchors.centerIn: _root + onItemClicked : _root.itemClicked(vIndex) + } + + // Test Codes + TouchRect { id : _clearAlarmCondition + objectName: "_clearAlarmCondition" + width : 300 + height : Variables.logoHeight + animated: true + anchors { + top : parent.top + right : _usbButton.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + text.text: qsTr("Clear Alarm Condition") + onClicked: { + vAlarmStatus.doClearCondition(); + } + } + USBButton { id: _usbButton anchors { top : parent.top @@ -64,31 +107,3 @@ } } -/* - TitleText { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter; - anchors.top: parent.top - anchors.topMargin: 150 - - width: parent.width - text: qsTr("Device Settings") - - } - - Diagnostics { - id: _diagnostics - onBackClicked: pop() - } - - Column { - anchors.centerIn: parent; - - // add each settings page here. - SettingsItem { id: _item_diagnostics - title : qsTr("Diagnostics") - onClicked: push(_diagnostics); - } - } -*/ - - Index: sources/gui/qml/pages/SettingsStack.qml =================================================================== diff -u -rbd01334f257c35b96b7b232beacbcd7fae60c852 -r066258b65a1c41afe3828c92d2606d2642505d72 --- sources/gui/qml/pages/SettingsStack.qml (.../SettingsStack.qml) (revision bd01334f257c35b96b7b232beacbcd7fae60c852) +++ sources/gui/qml/pages/SettingsStack.qml (.../SettingsStack.qml) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -28,9 +28,32 @@ * is selected from the main menu. */ StackItem { id : _root - SettingsHome { id : _settingsHome } + objectName: "_SettingsStack" + stackView.initialItem : _settingsHome + SettingsHome { id : _settingsHome + itemsText: [ + qsTr("Set Data And Time"), + qsTr("Wi-Fi"), + qsTr("Bluetooth"), + // qsTr("Option 4"), + // qsTr("Option 5"), + // qsTr("Option 6"), + // qsTr("Option 7"), + // qsTr("Option 8"), + // qsTr("Option 9"), + // qsTr("Option 0"), + ] + itemsEnabled: [ 1, 1, 1, 0,0,0,0,0,0] + onItemClicked: { + switch (vIndex) { + case 0: console.debug(vIndex); break + case 1: console.debug(vIndex); break + } + } + } + onVisibleChanged: { if (visible) { _mainMenu.hidden = false Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -r98581b325c24eb5ef0ce0ce475ad15320d659140 -r066258b65a1c41afe3828c92d2606d2642505d72 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 98581b325c24eb5ef0ce0ce475ad15320d659140) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -89,7 +89,6 @@ PostTreatmentBase { id: _disinfectionChemicalInstruction property int stackStepIndex : 3 header.confirmVisible : true - header.confirmText.text : qsTr("_TEST_") title.text : qsTr("Chemical Disinfection") instructionBased : true onConfirmClicked : _root.disinfectionChemicalTest() Index: sources/storage/StorageGlobals.cpp =================================================================== diff -u -r99a56ec30f1ca4f401e744766bde4f6fac291752 -r066258b65a1c41afe3828c92d2606d2642505d72 --- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 99a56ec30f1ca4f401e744766bde4f6fac291752) +++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 066258b65a1c41afe3828c92d2606d2642505d72) @@ -33,15 +33,15 @@ const char *USB_File_System = "vfat"; // SD-CARD -#ifdef BUILD_FOR_POKY +#ifdef BUILD_FOR_TARGET const char *SDCard_Base_Path_Name = "/media/sd-card/"; #else // should not be in the project application folder. [not tracking by git] const char *SDCard_Base_Path_Name = "/home/denali/Desktop/sd-card/"; #endif // Settings -#ifdef BUILD_FOR_POKY +#ifdef BUILD_FOR_TARGET const char *Settings_Path_Name = "/home/root/.config/"; #else // should be in the project application folder. [is tracking by git]