Index: leahi.qrc
===================================================================
diff -u -r23f8a6036e22f80c3c5fd2834a2980bb62d2a34d -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- leahi.qrc (.../leahi.qrc) (revision 23f8a6036e22f80c3c5fd2834a2980bb62d2a34d)
+++ leahi.qrc (.../leahi.qrc) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -145,6 +145,7 @@
sources/gui/qml/components/ContentArea.qml
sources/gui/qml/components/LabelValue.qml
sources/gui/qml/components/ArrowButton.qml
+ sources/gui/qml/components/HeaderBar.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
Index: sources/gui/qml/components/HeaderBar.qml
===================================================================
diff -u
--- sources/gui/qml/components/HeaderBar.qml (revision 0)
+++ sources/gui/qml/components/HeaderBar.qml (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -0,0 +1,169 @@
+import QtQuick 2.12
+
+import "qrc:/globals"
+import "qrc:/components"
+import "qrc:/"
+
+Rectangle { id: _root
+
+ property alias menuHidden : _headerMenu.hidden
+ property alias headerMenuIndex : _headerMenu.currentIndex
+ property alias headerMenuTitles : _headerMenu.titles
+ property alias headerMenuVisibleItems : _headerMenu.visibleItems
+
+ width : Variables.applicationWidth
+ height : Variables.notificationHeight
+
+ gradient: Gradient { //TODO:@LEAHI: make this a component.
+ GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) }
+ GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) }
+ }
+
+ Item { id: _dateTimeItem
+ width : Variables.headerBarDateTimeWidth
+ anchors {
+ top : parent.top
+ left : parent.left
+ bottom : parent.bottom
+ margins : 10
+ }
+ Column {
+ spacing : 0
+ anchors.fill: parent
+ Text {
+ color : Colors.textMain
+ width : parent.width
+ height : parent.height * 3/5
+ horizontalAlignment : Text.AlignHCenter
+ verticalAlignment : Text.AlignVCenter
+ text : vDateTime.time
+ font.pixelSize: 40
+ }
+ Text {
+ color : Colors.textMain
+ width : parent.width
+ height : parent.height * 2/5
+ horizontalAlignment : Text.AlignHCenter
+ verticalAlignment : Text.AlignVCenter
+ text : vDateTime.date
+ font.pixelSize: 25
+ }
+ }
+ }
+
+ Text { id: _version // TEST : Application version should be moved into the information screen later.
+ color : Colors.textMain
+ anchors {
+ top : parent.top
+ left : parent.left
+ }
+ horizontalAlignment : Text.AlignHCenter
+ verticalAlignment : Text.AlignBottom
+
+ height : 15
+ width : _root.width / 4
+ text : Qt.application.version //DEBUG: + "[" + _GuiView.platform + "]"
+ font.pixelSize: 14
+ }
+
+ Text { id: _ipAddress // TEST : Wireless IP
+ color : Colors.textMain
+ anchors {
+ top : parent.top
+ left : _version.right
+ }
+ horizontalAlignment : Text.Alignleft
+ verticalAlignment : Text.AlignBottom
+
+
+ height : 15
+ width : _root.width / 5
+
+ text : "W: " + vDevice.ipAddress
+ font.pixelSize: 15
+ }
+
+ Text { id: _timeZone // TEST : Current timezone
+ color : Colors.textMain
+ anchors {
+ top : parent.top
+ left : _ipAddress.right
+ }
+ horizontalAlignment : Text.Alignleft
+ verticalAlignment : Text.AlignBottom
+
+
+ height : 15
+ width : _root.width / 5
+ text : vDateTime.timezone
+ font.pixelSize: 14
+ }
+
+ SDCProgressItem { id: _sdcProgressItem
+ // TODO: disable this later. this is only for diagnostic purpose.
+ onDoubleClicked : {
+ if ( _GuiView.dryDemoMode ) {
+ let dryDemoTempID = 99
+ let id = vConfirm.id
+ vConfirm.id = dryDemoTempID
+ vConfirm.doConfirm( true )
+ vConfirm.id = id
+ }
+ else {
+ _diagnosticsDialog.open()
+ }
+ }
+ }
+
+ MainMenu { id: _headerMenu
+ anchors {
+ top : parent.top
+ left : parent.left
+ leftMargin: Variables.defaultMargin
+ bottom : parent.bottom
+ }
+ height : parent.height
+ width : parent.width
+ position : MainMenu.Position.Top
+ hidden : true
+ visible : ! hidden
+ spacing : Variables.defaultMargin
+ partitionWidth : 80 * titles.length// Todo Important : max width should be the width for all bottons
+ titlePixelSize : 32
+ backgroundColor : Colors.transparent
+ }
+
+ Row { id: _headerButtonRow
+ height : parent.height
+ spacing : Variables.defaultMargin * 2
+ anchors {
+ verticalCenter: parent.verticalCenter
+ right : parent.right
+ rightMargin : Variables.defaultMargin * 2
+ }
+
+ IconButton { id : _prescriptionButton
+ iconSize : Variables.headerIconDiameter
+ iconImageSource : "qrc:/images/iPrescription"
+ extraSpace : Variables.defaultMargin * 2
+
+ onPressed: print("Prescription button pressed!")
+ }
+
+ IconButton { id : _settingsButton
+ iconSize : Variables.headerIconDiameter
+ iconImageSource : "qrc:/images/iSettings"
+ extraSpace : Variables.defaultMargin * 2
+
+ onPressed: print("Settings button pressed!")
+ }
+
+ IconButton { id : _wifiButton
+ iconSize : Variables.headerIconDiameter
+ iconImageSource : "qrc:/images/iWifi"
+ extraSpace : Variables.defaultMargin * 2
+
+ onPressed: print("Wifi button pressed!")
+ }
+ }
+}
Index: sources/gui/qml/components/IconButton.qml
===================================================================
diff -u -r4f7e0c9f1b844d4dfcd23c9d3bcd4d0200b1ae47 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/components/IconButton.qml (.../IconButton.qml) (revision 4f7e0c9f1b844d4dfcd23c9d3bcd4d0200b1ae47)
+++ sources/gui/qml/components/IconButton.qml (.../IconButton.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -22,12 +22,12 @@
TouchRect { id : _icon
property int iconSize : Variables.iconButtonSize
property string iconImageSource : ""
+ property int extraSpace : Variables.defaultMargin
- width : iconSize + 20
- height : iconSize + 20
+ width : iconSize + extraSpace
+ height : iconSize + extraSpace
radius : height
border.color: "transparent"
- color : "transparent"
Image { id : _iconImage
anchors.centerIn: parent
Index: sources/gui/qml/components/MainMenu.qml
===================================================================
diff -u -r50e38888132835a21357dfadff7a9bb1ccfdd334 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334)
+++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -38,9 +38,10 @@
property int rightTextGaps : 20
property bool hasLogo : false
property int currentIndex : 0
- property string currentTitle : titles[currentIndex]
+ property string currentTitle : titles[currentIndex] === undefined ? null : titles[currentIndex]
property bool disable : false
property int titlePixelSize : 40
+ property color backgroundColor : Colors.backgroundMainMenu
/*!
* \brief Emits when a menu item pressed
@@ -96,7 +97,7 @@
Rectangle { id: _backgroundRect
anchors.fill: parent
- color: Colors.backgroundMainMenu
+ color: _root.backgroundColor
gradient: Gradient {
GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) }
GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) }
Index: sources/gui/qml/components/ScreenItem.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/components/ScreenItem.qml (.../ScreenItem.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/components/ScreenItem.qml (.../ScreenItem.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -28,7 +28,7 @@
visible: false
width : Variables.applicationWidth
- height : Variables.applicationHeight
+ height : Variables.screenContentHeight
Rectangle { id: _backgroundRect
anchors.fill: parent
Index: sources/gui/qml/components/StackItem.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/components/StackItem.qml (.../StackItem.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/components/StackItem.qml (.../StackItem.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -30,7 +30,7 @@
visible: false
width : Variables.applicationWidth
- height: Variables.applicationHeight
+ height: Variables.screenContentHeight
/*!
* \brief prints out the list of the items in the stack by their index position in the stack.
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r23f8a6036e22f80c3c5fd2834a2980bb62d2a34d -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 23f8a6036e22f80c3c5fd2834a2980bb62d2a34d)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -27,6 +27,7 @@
readonly property int applicationWidth : 1920 //// ----- @LEAHIZED
readonly property int applicationHeight : 1080 //// ----- @LEAHIZED
+ readonly property int screenContentHeight : applicationHeight - notificationHeight
readonly property int buttonSpacing : 150
readonly property int dialogIconHeight : 50
readonly property int dialogIconWidth : 50
Index: sources/gui/qml/main.qml
===================================================================
diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/main.qml (.../main.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -263,14 +263,18 @@
Background {}
// ----- Follow the below Z order -----
- // 1 - Screens
- // 1 - 1
- SettingsStack { id: _settingsStack } // FIXME: BEHROUZ - anchors.top : _headerbar.bottom or add topMargin to all stacks
- // 1 - 2
- ManagerStack { id: _managerStack }
- // 1 - 3
- MainStack { id: _mainStack }
+ Item { id: _mainContent
+ anchors.top: _headerBar.bottom
+ // 1 - Screens
+ // 1 - 1
+ SettingsStack { id: _settingsStack }
+ // 1 - 2
+ ManagerStack { id: _managerStack }
+ // 1 - 3
+ MainStack { id: _mainStack }
+ }
+
// 3 - Footer
MainMenu { id: _mainMenu
function isTreatment () { _mainMenu.itemPressed(0) }
@@ -287,11 +291,11 @@
_mainStack .visible = true
}
- onItemPressed: {
+ onItemPressed: function (vIndex) {
if ( disable ) return
- _mainStack .visible = vIndex == 0
- _managerStack .visible = vIndex == 1
- _settingsStack.visible = vIndex == 2
+ _mainStack .visible = vIndex === 0
+ _managerStack .visible = vIndex === 1
+ _settingsStack.visible = vIndex === 2
}
}
@@ -300,154 +304,8 @@
}
// 9 - Others
- Rectangle { //TODO:@LEAHI: make this the statusbar/headerbar component.
+ HeaderBar { id: _headerBar
anchors.top: parent.top
- width : Variables.applicationWidth
- height : Variables.notificationHeight
- color : _mainStack.currentScreen.objectName === 'TreatmentStack' ? "transparent" : // FIXME: BEHROUZ - My workaround for showing the top main treatment menu with headerbar
- Colors.backgroundMainMenu
- gradient: Gradient { //TODO:@LEAHI: make this a component.
- GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) }
- GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) }
- }
-
- Item {
- width : Variables.headerBarDateTimeWidth
- anchors {
- top : parent.top
- left : parent.left
- bottom : parent.bottom
- margins : 10
- }
- Column {
- spacing : 0
- anchors.fill: parent
- Text {
- color : Colors.textMain
- width : parent.width
- height : parent.height * 3/5
- horizontalAlignment : Text.AlignHCenter
- verticalAlignment : Text.AlignVCenter
- text : vDateTime.time
- font.pixelSize: 40
- }
- Text {
- color : Colors.textMain
- width : parent.width
- height : parent.height * 2/5
- horizontalAlignment : Text.AlignHCenter
- verticalAlignment : Text.AlignVCenter
- text : vDateTime.date
- font.pixelSize: 25
- }
- }
- }
- Text { // TEST : Application version should be moved into the information screen later.
- color : Colors.textMain
- anchors {
- top : parent.top
- left : parent.left
- leftMargin : 100
-
- }
- horizontalAlignment : Text.AlignRight
- verticalAlignment : Text.AlignBottom
-
- height : 15
- text : Qt.application.version //DEBUG: + "[" + _GuiView.platform + "]"
- font.pixelSize: 14
- }
-
- Text { // TEST : Wireless IP
- color : Colors.textMain
- anchors {
- top : parent.top
- left : parent.left
- leftMargin : 325
- }
- horizontalAlignment : Text.Alignleft
- verticalAlignment : Text.AlignBottom
-
- height : 15
- text : "W:" // + vNetwork.wirelessIP // ===================== Device Controller: FIXME
- font.pixelSize: 15
- }
-
- Text { // TEST : Ethernet IP
- color : Colors.textMain
- anchors {
- top : parent.top
- left : parent.left
- leftMargin : 475
- }
- horizontalAlignment : Text.Alignleft
- verticalAlignment : Text.AlignBottom
-
- height : 15
- text : "E:" // + vNetwork.ethernetIP // ===================== Device Controller: FIXME
- font.pixelSize: 15
- }
-
- Text { // TEST : BluetoothStatus
- color : Colors.textMain
- anchors {
- top : parent.top
- left : parent.left
- leftMargin : 615
- }
- horizontalAlignment : Text.Alignleft
- verticalAlignment : Text.AlignBottom
-
- height : 15
- text : "B:" + vBluetooth.pairedAddr
- font.pixelSize: 14
- }
-
- Text { // TEST : The treatment vital dialog countdown time
- color : Colors.textMain
- anchors {
- top : parent.top
- left : parent.left
- leftMargin : 900
- }
- horizontalAlignment : Text.Alignleft
- verticalAlignment : Text.AlignBottom
-
- height : 15
- //DEBUG text : "Vital Timer: " + vTreatmentVitals.min_left + " : " + vTreatmentVitals.sec_left
- font.pixelSize: 14
- }
-
- Text { // TEST : Current timezone
- color : Colors.textMain
- anchors {
- top : parent.top
- left : parent.left
- leftMargin : 1220
- }
- horizontalAlignment : Text.Alignleft
- verticalAlignment : Text.AlignBottom
-
- height : 15
- text : vDateTime.timezone
- font.pixelSize: 14
- }
-
- SDCProgressItem { id: _sdcProgressItem
- // TODO: disable this later. this is only for diagnostic purpose.
- onDoubleClicked : {
- if ( _GuiView.dryDemoMode ) {
- let dryDemoTempID = 99
- let id = vConfirm.id
- vConfirm.id = dryDemoTempID
- vConfirm.doConfirm( true )
- vConfirm.id = id
- }
- else {
- _diagnosticsDialog.open()
- }
- }
- }
}
// keyboard should always be before AlarmItem to not to covet it.
Index: sources/gui/qml/pages/MainHome.qml
===================================================================
diff -u -r21bcf654a57e2b3a6d1a2fee1173c3dff81f8f99 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 21bcf654a57e2b3a6d1a2fee1173c3dff81f8f99)
+++ sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -39,7 +39,6 @@
source: "qrc:/images/iHomeBackground"
}
-
// 2 - Header
ImageLogoD { id: _headerLogo }
Index: sources/gui/qml/pages/MainStack.qml
===================================================================
diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8)
+++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -70,6 +70,7 @@
Behavior on opacity { OpacityAnimator { duration: 1000 } }
opacity : _postModeScreen.visible ? 1 : 0
anchors.centerIn: parent
+ anchors.verticalCenterOffset: -Variables.notificationHeight
source : "qrc:/images/iLogoDiality"
}
Index: sources/gui/qml/pages/TreatmentFlowBase.qml
===================================================================
diff -u -r2ad0fc5c1215088ee0e4ea7f9b2bc367c4ed2fd9 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 2ad0fc5c1215088ee0e4ea7f9b2bc367c4ed2fd9)
+++ sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -81,7 +81,6 @@
StepNavigationTitleBar { id: _titleBar
stepIndex : stackStepIndex // shall have a definition in the parent stack
anchors.top : _root.top
- anchors.topMargin: Variables.notificationHeight
anchors.horizontalCenter : parent.horizontalCenter
width : _root.width
confirmEnabled : instruction ? instruction.lastStep : true
@@ -94,7 +93,7 @@
visible: ! instructionBased
anchors {
top : _root.top
- topMargin : Variables.notificationHeight + titleTopMargin
+ topMargin : titleTopMargin
horizontalCenter: parent.horizontalCenter
}
text : qsTr("TreatmentFlowBase")
Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml
===================================================================
diff -u -rf2e4eba6e85c5d36537be782926f23cc9dc01037 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision f2e4eba6e85c5d36537be782926f23cc9dc01037)
+++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -160,7 +160,7 @@
}
USBButton { id: _usbEjectButton
- width : 155
+ width : 120
height : 50
anchors.right : _root.right
anchors.top : _root.top
Index: sources/gui/qml/pages/treatment/TreatmentHome.qml
===================================================================
diff -u -r23f8a6036e22f80c3c5fd2834a2980bb62d2a34d -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 23f8a6036e22f80c3c5fd2834a2980bb62d2a34d)
+++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -42,60 +42,10 @@
signal logVitalTime()
readonly property int cellWidth : (_root.width / 7) - 10 // = screen width / # columns
- readonly property int cellHeight: (_root.height / 2) - Variables.notificationHeight - (Variables.defaultMargin * 2) // = screen height / # rows - header bar - margin
+ readonly property int cellHeight: (Variables.screenContentHeight / 2) - Variables.notificationHeight // = screen height / # rows - headerbar
onLogVitalTime: _treatmentVitals.updateVitalTime()
- AutoHideInfo { id: _lockDialog
- objectName : "lockDialog"
-
- width: 600
- height: 400
- backgroundColor: "#091E31"
- fontSize: 35
- verticalOffset: Variables.defaultMargin * 5
-
- Rectangle { id: _mainCircle
- objectName: "lockDialogMainCircle"
- anchors {
- top: parent.top
- topMargin: Variables.defaultMargin * 2
- horizontalCenter: parent.horizontalCenter
- }
- height : 200
- width : height
- radius : height
- color : "transparent"
- border.color: _treatmentFlows.editEnabled ? "#6697D2" :
- "#A47E38"
- border.width: 2
-
- Image { id : _iconImage
- objectName: "lockDialogIcon"
-
- anchors.centerIn : parent
- height : 80
- width : 80
- fillMode: Image.PreserveAspectFit
- source : _treatmentFlows.editEnabled ? "qrc:/images/iUnlock" :
- "qrc:/images/iLock"
- }
-
- Rectangle { id: _innerCircle
- objectName: "lockDialogInnerCircle"
-
- anchors.centerIn: parent
- color : "transparent"
- border.color : _treatmentFlows.editEnabled ? "#8FC1FE" :
- "#CDAF78"
- border.width : 1
- height : parent.height - 20
- width : height
- radius : height
- }
- }
- }
-
Column { id: _column
objectName: "column"
@@ -104,7 +54,7 @@
anchors {
fill: parent
margins: Variables.defaultMargin
- topMargin : Variables.notificationHeight + 30
+ topMargin : 30
}
Row { id: _topRow
@@ -183,6 +133,7 @@
onEditClicked : sectionFlowClicked()
onLockClicked : {
+ _lockDialog.isLocked = editEnabled
_lockDialog.showDialog (
editEnabled ? qsTr("Treatment Parameters Unlocked") :
qsTr("Treatment Parameters Locked"),
@@ -196,7 +147,9 @@
onVisibleChanged: {
if (visible) {
_mainMenu.hidden = true
- _treatmentMenu.hidden = false
+ _headerBar.headerMenuTitles = [ qsTr("Treatment") , qsTr("Trends") , qsTr("Heparin") ]
+ _headerBar.headerMenuVisibleItems = [ true , false , false ]
+ _headerBar.menuHidden = false
}
}
}
Index: sources/gui/qml/pages/treatment/TreatmentStack.qml
===================================================================
diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5
--- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8)
+++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5)
@@ -21,6 +21,7 @@
import "qrc:/globals"
import "qrc:/components"
import "qrc:/compounds"
+import "qrc:/dialogs"
import "qrc:/pages/treatment/adjustments"
/*!
@@ -38,6 +39,10 @@
_treatmentAdjustmentPressuresLimits .close()
_treatmentAdjustmentDuration .close()
_treatmentUltrafiltrationItem .close()
+
+ if (! visible) {
+ _headerBar.menuHidden = true
+ }
}
stackView.initialItem : null
@@ -55,23 +60,15 @@
|| _treatmentAdjustmentPressuresLimits .visible
|| _treatmentAdjustmentDuration .visible
|| _treatmentUltrafiltrationItem .visible
- // Components
- MainMenu { id: _treatmentMenu
- position : MainMenu.Position.Top
- hidden : true
- titles : [ qsTr("Treatment") , qsTr("Trends") , qsTr("Heparin")]
- visibleItems : [ true , false , false ]
- spacing : Variables.defaultMargin
- leftPdding : Variables.headerBarDateTimeWidth + Variables.columnSpacing // 200 + 60
- partitionWidth : 80 * titles.length// Todo Important : max width should be the width for all bottons
- titlePixelSize : 32
- onCurrentIndexChanged: {
- if (currentIndex === 1) push(_treatmentTrends)
- if (currentIndex === 0) pop()
- }
+ property int headerBarIndex: _headerBar.headerMenuIndex
+
+ onHeaderBarIndexChanged: {
+ if ( _root.headerBarIndex === 1) push(_treatmentTrends)
+ if ( _root.headerBarIndex === 0) pop()
}
+ // Components
TreatmentBloodPrime { id: _treatmentBloodPrime }
TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem }
TreatmentHome { id: _treatmentHome }
@@ -168,6 +165,58 @@
}
}
+ // Treatment Lock Dialog
+ AutoHideInfo { id: _lockDialog
+ objectName : "lockDialog"
+ property bool isLocked: false
+
+ width: 600
+ height: 400
+ backgroundColor: "#091E31"
+ fontSize: 35
+ verticalOffset: Variables.defaultMargin * 5
+
+ Rectangle { id: _mainCircle
+ objectName: "lockDialogMainCircle"
+ anchors {
+ top: parent.top
+ topMargin: Variables.defaultMargin * 2
+ horizontalCenter: parent.horizontalCenter
+ }
+ height : 200
+ width : height
+ radius : height
+ color : "transparent"
+ border.color: _lockDialog.isLocked ? "#6697D2" :
+ "#A47E38"
+ border.width: 2
+
+ Image { id : _iconImage
+ objectName: "lockDialogIcon"
+
+ anchors.centerIn : parent
+ height : 80
+ width : 80
+ fillMode: Image.PreserveAspectFit
+ source : _lockDialog.isLocked ? "qrc:/images/iUnlock" :
+ "qrc:/images/iLock"
+ }
+
+ Rectangle { id: _innerCircle
+ objectName: "lockDialogInnerCircle"
+
+ anchors.centerIn: parent
+ color : "transparent"
+ border.color : _lockDialog.isLocked ? "#8FC1FE" :
+ "#CDAF78"
+ border.width : 1
+ height : parent.height - 20
+ width : height
+ radius : height
+ }
+ }
+ }
+
// ---------- Manages Responses ----------
Connections { target: vTreatmentAdjustmentDuration
function onAdjustmentTriggered ( vValue ) {
@@ -207,7 +256,7 @@
Connections { target: _treatmentBloodPrime
function onVisibleChanged ( vValue ) {
if (_treatmentBloodPrime.visible) {
- _treatmentMenu.hidden = true
+ _headerBar.menuHidden = true
}
}
}