Index: sources/gui/qml/pages/rxmanager/RxManagerHeader.qml =================================================================== diff -u -r046fda9079b58d933faf0d4942c87c18bfdaa471 -rb862e0cc8bfe322da4aa10ba5e56f9a386e6a00f --- sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (.../RxManagerHeader.qml) (revision 046fda9079b58d933faf0d4942c87c18bfdaa471) +++ sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (.../RxManagerHeader.qml) (revision b862e0cc8bfe322da4aa10ba5e56f9a386e6a00f) @@ -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() + } } } }