Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -r34471900489397f483e052870ddc46059cef49fb -rbd476995001c165188e4c86010bf8b0505d2ca35 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 34471900489397f483e052870ddc46059cef49fb) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision bd476995001c165188e4c86010bf8b0505d2ca35) @@ -1,14 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. - * \copyright \n - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n - * IN PART OR IN WHOLE, \n - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n + * Copyright (c) 2020-2022 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 TreatmentAdjustmentBase.qml - * \date 2020/03/22 - * \author Behrouz NematiPour + * \author (last) Behrouz NematiPour + * \date (last) 18-Jun-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2020 * */ @@ -26,24 +27,35 @@ * For all adjustment screens in treatment */ ModalDialog { id: _root + contentItem.objectName: "TreatmentAdjustmentBase" //SquishQt testability property string titleText: "" + property bool closeVisible: true + property bool confirmVisible: true + property bool backVisible: false + property alias information: _information + signal closeClicked() signal confirmClicked() + signal backClicked() onVisibleChanged: { - notificationText = ""; + notificationText = "" } header: Rectangle { id : _headerRect - ConfirmButton { - anchors.left: parent.left + ConfirmButton { id : _confirmButton + visible: _root.confirmVisible onClicked : confirmClicked() } + BackButton { id : _backButton + visible: _root.backVisible + onClicked : backClicked() + } - TitleText { + TitleText { id : _titleText text: titleText font.pixelSize: Fonts.fontPixelButton color: Colors.textMain @@ -55,9 +67,22 @@ } } - CloseButton { - anchors.right: parent.right - onClicked : closeClicked() + CloseButton { id : _closeButton + visible: _root.closeVisible + anchors.left: parent.left + onClicked : { + closeClicked() + close() + } } } + + // this notification shall not be confused with the _notification in the parent ModalDailog + // this meant to be used specifically as current state notification like paused/off in UF + // it is also available in TreatmentAdjustmentFlow and TreatmentAdjustmentDuration but not used. + NotificationBarSmall { id: _information + visible : false + imageSource : "" + text : "" + } }