Index: denali.qrc =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- denali.qrc (.../denali.qrc) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ denali.qrc (.../denali.qrc) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -19,7 +19,8 @@ resources/images/Logo Diality.png resources/images/Power_symbol-128.png resources/images/splash.png - resources/images/ArrowRight.png + resources/images/ArrowRight.png + resources/images/ArrowLeft.png resources/images/logo d Dark Transparent.png resources/images/Close.png resources/images/alarm.png Index: resources/images/ArrowLeft.png =================================================================== diff -u Binary files differ Index: sources/gui/qml/components/SettingsItem.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/components/SettingsItem.qml (.../SettingsItem.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/components/SettingsItem.qml (.../SettingsItem.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -52,7 +52,7 @@ anchors.verticalCenter: parent.verticalCenter width : Variables.largeArrowWidth height: Variables.largeArrowHeight - source: "qrc:/images/iArrow" + source: "qrc:/images/iArrowRight" } Line { Index: sources/gui/qml/components/StepBullet.qml =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/components/StepBullet.qml (.../StepBullet.qml) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/gui/qml/components/StepBullet.qml (.../StepBullet.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -27,12 +27,14 @@ */ Item { id: _root readonly property color color : _circle.border.color - + property bool currentComplete : false + property bool hideLabels : false property bool vertical : false property string text : "" property bool complete : false property bool current : false property color colorComplete : Colors.borderButton + property color colorCurrent : currentComplete ? colorComplete : Colors.transparent property color colorInComplete : Colors.borderDisableButton property int fontSizeCurrent : 18 property int fontSizeNormal : 14 @@ -43,7 +45,7 @@ readonly property string stateNameHorizontal : "horizontal" // must not have translation } - height : 35 + height : _circle.height + (_text.visible ? _text.height : 0) width : _private.diameter state : _root.vertical ? _private.stateNameVertical : _private.stateNameHorizontal @@ -56,12 +58,13 @@ height : _private.diameter width : _private.diameter radius : _private.diameter - color : _root.current ? Colors.transparent : _root.complete ? _root.colorComplete : Colors.transparent - border.color: _root.current ? colorComplete : _root.complete ? _root.colorComplete : _root.colorInComplete + color : _root.current ? colorCurrent : _root.complete ? _root.colorComplete : Colors.transparent + border.color: _root.current ? colorComplete : _root.complete ? _root.colorComplete : _root.colorInComplete border.width: 2 } Text { id: _text + visible: ! _root.hideLabels anchors.top : _circle.bottom anchors.horizontalCenter: _circle.horizontalCenter anchors.topMargin : 5 Index: sources/gui/qml/components/StepIndicator.qml =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/components/StepIndicator.qml (.../StepIndicator.qml) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/gui/qml/components/StepIndicator.qml (.../StepIndicator.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -28,14 +28,16 @@ * all the steps' bullets and the line between them from the beginning up to the currentStepIndex will be activated/highlighted. */ Rectangle { id: _root + property bool currentComplete : false + property bool hideLabels : false property bool vertical : false property var stepNames : [] property int spacing : vertical ? 0 : 5 property int spacerLineLength : vertical ? 5 : 75 property int currentStepIndex : 0 - height : Variables.topBarMenuHeight + height : _gridSteps.height // Variables.topBarMenuHeight color : Colors.backgroundMain QtObject { id: _private @@ -68,10 +70,12 @@ anchors.centerIn: parent StepBullet { id: _headStepBullet - vertical: _root.vertical - text : _private.stepNamesFirst - complete: currentStepIndex > 0 - current : currentStepIndex == 0 + currentComplete : _root.currentComplete + hideLabels : _root.hideLabels + vertical : _root.vertical + text : _private.stepNamesFirst + complete : currentStepIndex > 0 + current : currentStepIndex == 0 } Repeater { id: _tailStepsRepeater model: _private.stepNamesRest @@ -88,10 +92,12 @@ color : _nextStepsBullet.color } StepBullet { id: _nextStepsBullet - vertical: _root.vertical - text : modelData - complete: currentStepIndex > 0 && index < currentStepIndex - 1 // first index is used for the head/first bullet - current : currentStepIndex > 0 && index == currentStepIndex - 1 // first index is used for the head/first bullet + currentComplete : _root.currentComplete + hideLabels : _root.hideLabels + vertical : _root.vertical + text : modelData + complete : currentStepIndex > 0 && index < currentStepIndex - 1 // first index is used for the head/first bullet + current : currentStepIndex > 0 && index == currentStepIndex - 1 // first index is used for the head/first bullet } } } Index: sources/gui/qml/components/TouchArea.qml =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -61,7 +61,7 @@ } width : Variables.arrowWidth height: Variables.arrowHeight - source: "qrc:/images/iArrow" + source: "qrc:/images/iArrowRight" } MouseArea { id: _mouseArea Index: sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -32,7 +32,7 @@ property alias header : _titleBar property alias title : _titleText - readonly property int titleTopMargin: 120 + readonly property int titleTopMargin: 110 signal backClicked() signal confirmClicked() Index: sources/gui/qml/pages/pretreatment/sample/PreTreatmentWaterSample.qml =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/pages/pretreatment/sample/PreTreatmentWaterSample.qml (.../PreTreatmentWaterSample.qml) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/gui/qml/pages/pretreatment/sample/PreTreatmentWaterSample.qml (.../PreTreatmentWaterSample.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -14,8 +14,8 @@ */ // Qt -import QtQuick 2.12 - +import QtQuick 2.12 +import QtQuick.Controls 2.12 // swipeview // Project // Qml imports import "qrc:/globals" @@ -31,6 +31,120 @@ signal samplePressed () signal sampleReleased() + Rectangle { id: _component + anchors.top: title.bottom + anchors.bottom: _buttonRow.top + // anchors.bottom: parent.bottom + // anchors.bottomMargin: Variables.notificationHeight + 15 + + // ---- + + readonly property int frameGap : 47 + readonly property int chevronWidth : 25 + readonly property int chevronHeight : 35 + readonly property int outerRadius : 10 + readonly property int outerHMargin : 30 + readonly property int outerVMargin : 15 + readonly property int innerRadius : 5 + readonly property int imageMargin : ( _component.frameGap - _component.chevronWidth ) / 2 + + signal leftClicked () + signal rightClicked() + + color : Colors.transparent + border.color : Colors.borderButton + radius : _component.outerRadius + anchors { + left : parent.left + right : parent.right + leftMargin : _component.outerHMargin + rightMargin : _component.outerHMargin + topMargin : _component.outerVMargin + bottomMargin : _component.outerVMargin + } + + Rectangle { id: _innerFrame + clip: true + color : Colors.transparent + border.color : Colors.line + anchors.fill : _component + anchors.margins : _component.frameGap + radius : _component.innerRadius + onWidthChanged : console.debug(" ----- ", width, height) + onHeightChanged : console.debug(" ----- ", width, height) + SwipeView { id: view + clip: true + currentIndex: 0 + anchors.fill: parent + Repeater { + model: indicator.stepNames + Loader { + active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem + sourceComponent: Image { + source: "qrc:/images/iLogoDiality" + Component.onCompleted: console.log("created:", index) + Component.onDestruction: console.log("destroyed:", index) + } + } + } + } + } + + StepIndicator { id: indicator + currentComplete : true + hideLabels : true + stepNames : ["A", "B", "C"] + currentStepIndex: view.currentIndex + anchors.top : _innerFrame.bottom + anchors.bottom : _component.bottom + anchors.horizontalCenter: _component.horizontalCenter + } + + Image { id: _leftImage + width : _component.chevronWidth + height : _component.chevronHeight + source : "qrc:/images/iArrowLeft" + anchors.left : _component.left + anchors.right : _innerFrame.left + anchors.verticalCenter: _component.verticalCenter + anchors.margins : _component.imageMargin + } + Image { id: _rightImage + width : _component.chevronWidth + height : _component.chevronHeight + source : "qrc:/images/iArrowRight" + anchors.right : _component.right + anchors.left : _innerFrame.right + anchors.verticalCenter: _component.verticalCenter + anchors.margins : _component.imageMargin + } + + MouseArea { id: _mouseAreaLeft + width : _component.frameGap + anchors.left : _component.left + anchors.top : _component.top + anchors.bottom : _component.bottom + onClicked : { + console.debug("leftClicked") + if (view.currentIndex > 0) + view.currentIndex-- + _component.leftClicked + } + } + MouseArea {id: _mouseAreaRight + width : _component.frameGap + anchors.right : _component.right + anchors.top : _component.top + anchors.bottom : _component.bottom + onClicked : { + console.debug("rightClicked") + if (view.currentIndex < view.count-1) + view.currentIndex++ + _component.rightClicked + } + } + } + Row { id: _buttonRow spacing : _root.width / 3 // 1 button + 2 space anchors.horizontalCenter: parent.horizontalCenter Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -r07e0c7bd409782cab96a4ae761ee3f819bdb8639 -rfa1b7c7d5ca98b991168bacc0bab1e9614ed39b6 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 07e0c7bd409782cab96a4ae761ee3f819bdb8639) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision fa1b7c7d5ca98b991168bacc0bab1e9614ed39b6) @@ -77,7 +77,7 @@ anchors.leftMargin: 10 width : Variables.arrowWidth height: Variables.arrowHeight - source: "qrc:/images/iArrow" + source: "qrc:/images/iArrowRight" } } }