Index: sources/gui/qml/dialogs/CalibrationDialog.qml =================================================================== diff -u -rbb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43 -rfd13750406289b7fd9d49c7827ad143fe246278f --- sources/gui/qml/dialogs/CalibrationDialog.qml (.../CalibrationDialog.qml) (revision bb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43) +++ sources/gui/qml/dialogs/CalibrationDialog.qml (.../CalibrationDialog.qml) (revision fd13750406289b7fd9d49c7827ad143fe246278f) @@ -127,10 +127,15 @@ } Grid { id: entryColumn - anchors.horizontalCenter: parent.horizontalCenter - columns : 2 - rowSpacing : Variables.defaultMargin * 5 - columnSpacing : Variables.defaultMargin * 5 + readonly property bool needExtraColumn : _repeater.count > 9 + anchors{ + horizontalCenter: parent.horizontalCenter + top : parent.top + topMargin : needExtraColumn ? 0 : Variables.defaultMargin + } + columns : needExtraColumn ? 4 : 3 + rowSpacing : needExtraColumn ? Variables.defaultMargin * 4 : Variables.defaultMargin * 5 + columnSpacing : needExtraColumn ? Variables.defaultMargin * 3 : Variables.defaultMargin * 5 Repeater { id: _repeater model: _root.entries @@ -148,7 +153,7 @@ horizontalCenter: parent.horizontalCenter } - height : Variables.contentHeight + height : 40 width : parent.width color : Colors.textMain Index: sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml =================================================================== diff -u -rbb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43 -rfd13750406289b7fd9d49c7827ad143fe246278f --- sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml (.../SettingsCalibrationSettings.qml) (revision bb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43) +++ sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml (.../SettingsCalibrationSettings.qml) (revision fd13750406289b7fd9d49c7827ad143fe246278f) @@ -8,7 +8,6 @@ import "qrc:/compounds" import "qrc:/dialogs" - SettingsBase { id: _root itemIndex : SettingsStack.CalibrationSettings confirmVisible : false @@ -38,7 +37,8 @@ qsTr("Acid Types" ) , qsTr("Bicarb Types" ) , qsTr("Accelerometer" ) , - qsTr("Blood Leak" ) + qsTr("Blood Leak" ) , + qsTr("Conductivity" ) ] onActivated: vCalibrationSettings.refreshList(currentIndex) @@ -50,13 +50,17 @@ leftPadding : Variables.defaultMargin * 2 text : _headerText.title color : Colors.white - font.pixelSize : Fonts.fontPixelTextRectTitle + font.pixelSize : Fonts.fontPixelDefaultButton font.weight : Font.Medium } contentItem: Item { id: _contentItem anchors.fill : parent readonly property int contentWith: _listView.width - Variables.defaultMargin //* 2 // added margin to have scroll bar show on right + readonly property bool largePayload : vCalibrationSettings.columnTitle.length > 9 + readonly property int titleWidth : contentWith * ( largePayload ? 0.17 : 0.3 ) + readonly property int componentWidth: contentWith * ( largePayload ? 0.07 : 0.1 ) + readonly property int payloadWidth : contentWith * ( largePayload ? 0.76 : 0.6 ) Rectangle { id: _header color : Colors.treatmentSectionHeader @@ -68,11 +72,11 @@ width : _contentItem.width height : Variables.institutionaltContainerHeight - HeaderText { title: qsTr("Description"); width: _contentItem.width * 0.3 } - HeaderText { title: qsTr("Component"); width: _contentItem.width * 0.1; leftPadding: 0 } + HeaderText { title: qsTr("Description"); width: _contentItem.titleWidth } + HeaderText { title: qsTr("Component"); width: _contentItem.componentWidth; leftPadding: 0 } Row { id: _headerComponentRow - width : _contentItem.width * 0.6 + width : _contentItem.payloadWidth height : Variables.institutionaltContainerHeight Repeater { id: _repeater @@ -121,15 +125,15 @@ width : _contentItem.contentWith radius : 8.5 color : Colors.panelBackgroundColor + clip : true border { width: 1 color: _mouseArea.pressed || _editButton.isPressed ? Colors.borderButton : Colors.panelBorderColor } MouseArea { id: _mouseArea anchors.fill : parent - anchors.rightMargin: _contentItem.width / 2 - onClicked : _root.openDialog(index) + onClicked : _root.openDialog(index) } IconButton { id : _editButton @@ -144,14 +148,15 @@ } Row { id: _delegateRow + width : _contentItem.width height : Variables.institutionaltContainerHeight - HeaderText { title: model.title; width: _contentItem.width * 0.3; font.weight: Font.Normal; leftPadding: Variables.defaultMargin * 3 } - HeaderText { title: model.component; width: _contentItem.width * 0.1 } + HeaderText { title: model.title; width: _contentItem.titleWidth; font.weight: Font.Normal; leftPadding: Variables.defaultMargin * 3 } + HeaderText { title: model.component; width: _contentItem.componentWidth } Row { id: _delegateComponentRow - width : _contentItem.width * 0.6 + width : _contentItem.payloadWidth height : Variables.institutionaltContainerHeight Repeater { id: _delegateRepeater @@ -162,12 +167,11 @@ title : isCalTime ? modelData : Number(modelData).toFixed(3) height : Variables.institutionaltContainerHeight - leftPadding : 0 + leftPadding : isCalTime && _contentItem.largePayload ? Variables.defaultMargin * -1 : 0 width : _delegateComponentRow.width / vCalibrationSettings.columnTitle.length verticalAlignment : Text.AlignVCenter - font.pixelSize : isCalTime ? Fonts.fontPixelDefaultButton : Fonts.fontPixelTextRectTitle + font.pixelSize : isCalTime && _contentItem.largePayload ? 16 : Fonts.fontPixelDefaultButton - } } } Index: sources/view/settings/VCalibrationSettings.cpp =================================================================== diff -u -rbb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43 -rfd13750406289b7fd9d49c7827ad143fe246278f --- sources/view/settings/VCalibrationSettings.cpp (.../VCalibrationSettings.cpp) (revision bb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43) +++ sources/view/settings/VCalibrationSettings.cpp (.../VCalibrationSettings.cpp) (revision fd13750406289b7fd9d49c7827ad143fe246278f) @@ -120,6 +120,16 @@ _calibrationList.appendRow( {{ eRole_Title, tr("Blood Leak")}, { eRole_Component, tr("")}, {eRole_Payload, initPayloadValues }}); break; } + case eConductivity : + { + QVariantList initPayloadValues = initList ( { tr("1"),tr("2"),tr("3"),tr("4"),tr("5"),tr("6"),tr("7"), tr("8"),tr("9"),tr("10"),tr("11"),tr("12"),tr("Cal Time") } ) ; + _calibrationList.appendRow( {{ eRole_Title, tr("Closed Loop Control of Dosing")}, { eRole_Component, tr("D17")}, {eRole_Payload, initPayloadValues }}); + _calibrationList.appendRow( {{ eRole_Title, tr("Closed Loop Control of Dosing")}, { eRole_Component, tr("D27")}, {eRole_Payload, initPayloadValues }}); + _calibrationList.appendRow( {{ eRole_Title, tr("Water, Bicarbonate, and Acid")}, { eRole_Component, tr("D29")}, {eRole_Payload, initPayloadValues }}); + _calibrationList.appendRow( {{ eRole_Title, tr("Self Test")}, { eRole_Component, tr("D43")}, {eRole_Payload, initPayloadValues }}); + _calibrationList.appendRow( {{ eRole_Title, tr("Water and Bicarb Collective")}, { eRole_Component, tr("D74")}, {eRole_Payload, initPayloadValues }}); + break; + } } } @@ -159,5 +169,7 @@ break; case eBloodLeak : break; + case eConductivity : + break; } } Index: sources/view/settings/VCalibrationSettings.h =================================================================== diff -u -rbb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43 -rfd13750406289b7fd9d49c7827ad143fe246278f --- sources/view/settings/VCalibrationSettings.h (.../VCalibrationSettings.h) (revision bb3bfd135aa8216edb4d8f83ef6e4ecf311b2b43) +++ sources/view/settings/VCalibrationSettings.h (.../VCalibrationSettings.h) (revision fd13750406289b7fd9d49c7827ad143fe246278f) @@ -39,7 +39,8 @@ eAcidTypes , eBicarbTypes , eAccelerometer , - eBloodLeak + eBloodLeak , + eConductivity } Records; // The property adjustment_Triggered has to be always true