Index: sources/gui/qml/pages/rxmanager/RxManagerHeader.qml =================================================================== diff -u -rf5805685bfe1d7dcc22799e2fd6a07b8181cd349 -r47e53a72dae5a817465b3ef0be9f98a9dd16f60a --- sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (.../RxManagerHeader.qml) (revision f5805685bfe1d7dcc22799e2fd6a07b8181cd349) +++ sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (.../RxManagerHeader.qml) (revision 47e53a72dae5a817465b3ef0be9f98a9dd16f60a) @@ -20,9 +20,16 @@ import "qrc:/components" Item { id: _root + property bool onShow: true + property int rxProfileCount: vRxProfiles.rxProfiles.rowCount() + property var rxProfile : vRxProfiles.rxProfiles + onRxProfileCountChanged: print(rxProfileCount) + signal addClicked() + anchors { left : parent.left right : parent.right + topMargin : Variables.defaultMargin * 2 } Row { id: _headerRow @@ -32,20 +39,22 @@ spacing: Variables.defaultMargin * 2 Text { id : headerText - text : qsTr("Saved Prescriptions") + " (" + vRxProfiles.rxProfilesList.length + "/10)" + text : qsTr("Saved Prescriptions") + (" (%1/10)").arg(_root.rxProfileCount) color : Colors.textButton font.pointSize : Fonts.fontPixelButton * 1.4 verticalAlignment : Text.AlignVCenter } BaseComboBox { id: _sortdropdown + visible : _root.onShow model : [qsTr("Favorites"), qsTr("Last Modified"), qsTr("Last Used"), qsTr("Name")] height : 70 width : 300 onActivated: { switch (currentIndex) { case 0: print("TODO: Favorites selected " ) + _root.onShow = false break case 1: print("TODO: Last modified selected " ) @@ -64,6 +73,7 @@ TouchRect { id: _orderButton + visible : _root.onShow color : Colors.highlightMedProgressBar height: 70 width : 70 @@ -82,6 +92,7 @@ } } Row { id: _rxButtons + visible : _root.onShow anchors { right : parent.right } @@ -97,6 +108,9 @@ text.text : qsTr("Add Prescription") height: 70 width: 244 + onClicked :{ + addClicked() + } } } }