Index: denali.qrc
===================================================================
diff -u -rf3a336a173b0fc1198a2e13d9da36d06dc911fcc -rb7928a4d8056d00c11bf36b29ade9afb0840134a
--- denali.qrc (.../denali.qrc) (revision f3a336a173b0fc1198a2e13d9da36d06dc911fcc)
+++ denali.qrc (.../denali.qrc) (revision b7928a4d8056d00c11bf36b29ade9afb0840134a)
@@ -56,6 +56,8 @@
resources/images/eject.png
resources/images/eye.png
resources/images/Omron-bp7000.png
+ resources/images/chevron-left.png
+ resources/images/chevron-right.png
sources/gui/qml/components/MainMenu.qml
@@ -114,7 +116,7 @@
sources/gui/qml/components/TimeEntry.qml
sources/gui/qml/components/Label.qml
sources/gui/qml/components/EntryDialog.qml
- sources/gui/qml/components/CircleButton.qml
+ sources/gui/qml/components/SliderArrows.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
Index: resources/images/chevron-left.png
===================================================================
diff -u
Binary files differ
Index: resources/images/chevron-right.png
===================================================================
diff -u
Binary files differ
Fisheye: Tag b7928a4d8056d00c11bf36b29ade9afb0840134a refers to a dead (removed) revision in file `sources/gui/qml/components/CircleButton.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: sources/gui/qml/components/SliderArrows.qml
===================================================================
diff -u
--- sources/gui/qml/components/SliderArrows.qml (revision 0)
+++ sources/gui/qml/components/SliderArrows.qml (revision b7928a4d8056d00c11bf36b29ade9afb0840134a)
@@ -0,0 +1,99 @@
+/*!
+ *
+ * Copyright (c) 2020-2023 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 SliderArrows.qml
+ * \author (last) Vy Duong
+ * \date (last) 13-Mar-2023
+ * \author (original) Vy Duong
+ * \date (original) 13-Mar-2023
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+// Qml imports
+import "qrc:/globals"
+import "qrc:/components"
+
+
+/*!
+ * \brief Denali project SliderArrows
+ */
+Row { id: _adjustValueButtonsContainer
+ signal incrementValue()
+ signal decrementValue()
+
+ width : 200
+ height : parent.height
+ anchors.leftMargin : Variables.sliderAdjustButtonSpacing
+ spacing : Variables.sliderAdjustButtonSpacing
+
+ TouchRect { id: _decrementValueButton
+ width: Variables.sliderAdjustButtonDiameter
+ height: Variables.sliderAdjustButtonDiameter
+ radius: Variables.sliderAdjustButtonDiameter
+
+ Image { id: _decrementArrowImage
+ anchors.centerIn: parent
+ height : Variables.iconsDiameter
+ width : Variables.iconsDiameter
+ source : "qrc:/images/iChevronLeft"
+ }
+
+ onPressed: decrementValue()
+//// commented out for future
+// onPressAndHold: {
+// _sliderAdjustValueTimer.isIncrementing = false
+// _sliderAdjustValueTimer.restart()
+// }
+// onReleased: _sliderAdjustValueTimer.stop()
+ }
+
+ TouchRect { id: _incrementValueButton
+ width: Variables.sliderAdjustButtonDiameter
+ height: Variables.sliderAdjustButtonDiameter
+ radius: Variables.sliderAdjustButtonDiameter
+
+ Image { id: _incrementArrowImage
+ anchors.centerIn: parent
+ height : Variables.iconsDiameter
+ width : Variables.iconsDiameter
+ source : "qrc:/images/iChevronRight"
+ }
+
+ onPressed: incrementValue()
+//// commented out for future
+// onPressAndHold: {
+// _sliderAdjustValueTimer.isIncrementing = true
+// _sliderAdjustValueTimer.restart()
+// }
+// onReleased: _sliderAdjustValueTimer.stop()
+ }
+
+//// commented out for future
+// Timer { id: _sliderAdjustValueTimer
+// property bool isIncrementing : true
+// interval: 250 //ms
+// running : false
+// repeat : true
+// onTriggered: {
+// if(isIncrementing)
+// incrementValue()
+// else
+// decrementValue()
+
+// // for optimizing purposes, stop timer when max or min value reached
+// if ((_root.value == maximum) || (_root.value == minimum)) {
+// _sliderAdjustValueTimer.stop()
+// }
+
+// //DEBUG console.log("timer triggered " + _root.value)
+// }
+// }
+}
Index: sources/gui/qml/components/SliderCreateTreatment.qml
===================================================================
diff -u -rf3a336a173b0fc1198a2e13d9da36d06dc911fcc -rb7928a4d8056d00c11bf36b29ade9afb0840134a
--- sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision f3a336a173b0fc1198a2e13d9da36d06dc911fcc)
+++ sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision b7928a4d8056d00c11bf36b29ade9afb0840134a)
@@ -42,8 +42,7 @@
property bool active : false
property bool valid : true
- property bool showAdjustButtons : true
- property real adjustButtonDiameter : Variables.sliderAdjustButtonDiameter
+ property alias showAdjustButtons : _sliderArrows.visible
signal pressed ()
signal released()
@@ -128,49 +127,17 @@
onProgressRectDragged : { ; ; setActiveValid( ) }
}
- Row { id: _adjustValueButtonsContainer
- width : 200
- height : parent.height
+ SliderArrows{ id:_sliderArrows
+ visible : true
anchors.verticalCenter : _slider.verticalCenter
anchors.left : _slider.right
- anchors.leftMargin : Variables.sliderAdjustButtonSpacing
- spacing : Variables.sliderAdjustButtonSpacing
- CircleButton { id: _decrementValueButton
- buttonSymbol: "<"
- onPressed: _slider.decrementValue(true)
- onPressAndHold: {
- _sliderAdjustValueTimer.isIncrementing = false
- _sliderAdjustValueTimer.restart()
- }
- onReleased: _sliderAdjustValueTimer.stop()
+ onIncrementValue: {
+ setActiveValid()
+ _slider.incrementValue(true)
}
- CircleButton { id: _incrementValueButton
- buttonSymbol: ">"
- onPressed: _slider.incrementValue(true)
- onPressAndHold: {
- _sliderAdjustValueTimer.isIncrementing = true
- _sliderAdjustValueTimer.restart()
- }
- onReleased: _sliderAdjustValueTimer.stop()
+ onDecrementValue: {
+ setActiveValid()
+ _slider.decrementValue(true)
}
}
- Timer { id: _sliderAdjustValueTimer
- property bool isIncrementing : true
- interval: 250 //ms
- running : false
- repeat : true
- onTriggered: {
- if(isIncrementing)
- _slider.incrementValue(true)
- else
- _slider.decrementValue(true)
-
- // for optimizing purposes, stop timer when max or min value reached
- if ((_root.value == maximum) || (_root.value == minimum)) {
- _sliderAdjustValueTimer.stop()
- }
-
- //DEBUG console.log("timer triggered " + _root.value)
- }
- }
}
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -rf3a336a173b0fc1198a2e13d9da36d06dc911fcc -rb7928a4d8056d00c11bf36b29ade9afb0840134a
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision f3a336a173b0fc1198a2e13d9da36d06dc911fcc)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision b7928a4d8056d00c11bf36b29ade9afb0840134a)
@@ -171,8 +171,7 @@
readonly property int sliderAdjustButtonSpacing : 20
readonly property int sliderAdjustButtonDiameter : 50
- readonly property int circleButtonDefaultDiameter : 50
- readonly property int circleButtonDefaultBorderWidth : 2
+ readonly property int circleButtonDefaultDiameter : 45
// ---------- < PRS > Related Section ----------