Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -re1ecb77ba0ff9619b7363f14e1ed3c3e110c4057 -r31b1e7a5d69f014398827e16286f28515cd60e35 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision e1ecb77ba0ff9619b7363f14e1ed3c3e110c4057) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 31b1e7a5d69f014398827e16286f28515cd60e35) @@ -17,6 +17,8 @@ GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } } + function vitalsRecorded() { _pulseAnimation.start() } + MouseArea { id: _mouseArea anchors.fill : parent // TODO: disable this later. this is only for diagnostic purpose. @@ -103,13 +105,34 @@ Row { id: _headerButtonRow height : parent.height - spacing : 30 + spacing : 25 anchors { verticalCenter: parent.verticalCenter right : parent.right rightMargin : _headerButtonRow.spacing } + IconButton { id : _vitalsButton + iconSize : Variables.headerIconDiameter + iconImageSource : "qrc:/images/iVitals" + extraSpace : _headerButtonRow.spacing + + onPressed : _treatmentAdjustmentVitals.open() + + SequentialAnimation { id: _pulseAnimation + loops : 2 + running : false + alwaysRunToEnd : true + onStarted : _vitalsButton.iconImageSource = "qrc:/images/iVitalsRed" + onStopped : _vitalsButton.iconImageSource = "qrc:/images/iVitals" + onFinished : _vitalsButton.iconImageSource = "qrc:/images/iVitals" + NumberAnimation { target: _vitalsButton; property: "scale"; to: 1.14; duration: 110; easing.type: Easing.OutCubic } // beat up + NumberAnimation { target: _vitalsButton; property: "opacity"; from: 1; to: 0; duration: 500; } // pulse down + NumberAnimation { target: _vitalsButton; property: "scale"; to: 1.0; duration: 180; easing.type: Easing.InCubic } // beat down + NumberAnimation { target: _vitalsButton; property: "opacity"; from: 0; to: 1; duration: 500; } // pulse up + } + } + IconButton { id : _prescriptionButton iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iPrescription" @@ -122,18 +145,10 @@ iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iWifi" extraSpace : _headerButtonRow.spacing + onPressed : _headerbarWifi.openDialog(_wifiButton) } - IconButton { id : _bluetoothButton - iconSize : Variables.headerIconDiameter - iconImageSource : "qrc:/images/iBluetooth" - extraSpace : _headerButtonRow.spacing - enabled : false - - onPressed : print("Bluetooth button pressed!") - } - IconButton { id : _cloudSyncButton iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iCloudSync"