Index: sources/gui/qml/components/RangeRect.qml =================================================================== diff -u -r732bc047743c99a157cf147f5313194867c1f5e3 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf --- sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 732bc047743c99a157cf147f5313194867c1f5e3) +++ sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf) @@ -14,7 +14,6 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Project // Qml imports @@ -24,14 +23,19 @@ * \brief Denali project RangeRect */ Rectangle { id: _root - signal clicked() + signal clicked(var vMouseEvent) + signal dragged(var vMouseEvent) property int minimum : 0 property int maximum : 0 property alias minText : _textMinimum property alias maxText : _textMaximum + property string unit : "" + + property real touchMargin: 0 + width : parent.width height : parent.height @@ -45,7 +49,7 @@ font.bold : true color : Colors.textProgressBar - text : minimum + text : minimum + unit anchors { left : parent.left @@ -61,7 +65,7 @@ font.bold : true color : Colors.textProgressBar - text : maximum + text : maximum + unit anchors { right : parent.right @@ -71,9 +75,15 @@ } MouseArea { id: _mouseArea + anchors.topMargin : -touchMargin + anchors.bottomMargin: -touchMargin anchors.fill: parent + onPositionChanged: { + _root.dragged(mouse) + } + onClicked: { - _root.clicked + _root.clicked(mouse) } } }