Index: sources/gui/qml/components/SliderCreateTreatment.qml =================================================================== diff -u -r82afc5332958148ccd96d32d2c6337ed6131a772 -r83b9d737cd495b34a7b42f5409962a9442f3b8f4 --- sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision 82afc5332958148ccd96d32d2c6337ed6131a772) +++ sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision 83b9d737cd495b34a7b42f5409962a9442f3b8f4) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 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 SliderCreateTreatment.qml - * \author (last) Vy - * \date (last) 07-Jun-2023 + * \author (last) Behrouz NematiPour + * \date (last) 26-Jan-2024 * \author (original) Peter Lucia * \date (original) 07-Jul-2020 * @@ -27,6 +27,8 @@ Rectangle { id: _root property Flickable flickable: null + property var toggleSwich : null // it is the treatment slider custom Switch bu it will be defined outside of this component and the var type would suffice. + property bool adjustable : true property alias label : _label.text property alias decimal : _slider.decimal @@ -54,6 +56,15 @@ anchors.horizontalCenter: parent.horizontalCenter + function clear() { + reset(defaultValue) + if ( toggleSwich ) { + toggleSwich.checked = false + toggleSwich.active = false + } + _root.active = false + } + function reset(vValue) { _slider.reset(vValue) }