Commit 4d6877d1 authored by yannick legoc's avatar yannick legoc

D2BSampleTable updated with enabled position property

parent 17b068d7
......@@ -62,6 +62,8 @@ SampleTable::SampleTable(const string& name) :
fixedPosition.init(this, SAVE, "fixed_position");
fixedPosition.setEnumeratedValues(fixedPositions);
enabledPosition.init(this, SAVE, "enabled_position");
positionNames.init(this, SAVE, "position_name");
// other properties
......@@ -89,6 +91,7 @@ SampleTable::SampleTable(const string& name) :
registerRefresher(positionName.setpoint, &SampleTable::refreshWantedPositionName, this);
registerRefresher(nPositions, &SampleTable::refreshNPositions, this);
registerRefresher(positionNames, &SampleTable::refreshPositionName, this);
registerRefresher(enabledPosition, &SampleTable::refreshEnabledPosition, this);
firstIndex = 1;
}
......@@ -136,6 +139,7 @@ void SampleTable::refreshMaxPositions(int32 value) {
rotationPosition.resize(value);
verticalPosition.resize(value);
fixedPosition.resize(value);
enabledPosition.resize(value);
positionNames.resize(value);
for (int32 i = 0; i < value; i++) {
......@@ -182,6 +186,10 @@ void SampleTable::refreshPositionName(int32 index, const std::string& value) {
updateRevision(positionNamesChanged);
}
void SampleTable::refreshEnabledPosition(int32 index, bool value) {
updateRevision(positionNamesChanged);
}
void SampleTable::selectEnvironment(int32 environment) {
if (environment == 0 || environment == 1 || environment == 2 || environment == 3) {
......
......@@ -73,6 +73,7 @@ public:
Property<int32> fixedPositionsSize;
DynamicProperty<std::string> fixedPositions;
DynamicProperty<std::string> fixedPosition;
DynamicProperty<bool> enabledPosition;
DynamicProperty<std::string> positionNames;
Property<float64> rotationTolerance;
......@@ -103,6 +104,7 @@ protected:
void refreshNPositions(int32 value);
void refreshSampleEnvironmentName(const std::string& value);
void refreshPositionName(int32 index, const std::string& value);
void refreshEnabledPosition(int32 index, bool value);
void updateAxisPosition();
void updateProgression();
......
......@@ -18,6 +18,9 @@ d2b_sample_table.verticalFixedPrefix=Fixed
d2b_sample_table.verticalFixedCheckedValue=true
d2b_sample_table.verticalFixedUncheckedValue=false
d2b_sample_table.enabledPrefix=Enabled
d2b_sample_table.enabled_positionCheckedValue=true
d2b_sample_table.enabled_positionUncheckedValue=false
# Sample Environment Selector
d2b_sample_table.sampleEnvironmentPrefix=Environment
......
......@@ -16,5 +16,6 @@
<dynamic_property name="vertical_position" size_property="n_positions" type="double"/>
<dynamic_property name="fixed_positions" size_property="fixed_positions_size" type="long"/>
<dynamic_property name="fixed_position" size_property="n_positions" type="string"/>
<dynamic_property name="enabled_position" size_property="n_positions" type="boolean"/>
</controller>
......@@ -8,13 +8,15 @@
<group title="d2b_sample_table.positionsTitle">
<text role="d2b_sample_table1" property="n_positions" prefix="d2b_sample_table.nPositionPrefix" key="nPositionsKey"/>
<newLine/>
<table_composite nbColumns="5">
<table_composite nbColumns="6">
<simple_label prefix="d2b_sample_table.positionIndexPrefix" font_size="9" font_style="BOLD" hAlignment="center"/>
<simple_label prefix="d2b_sample_table.positionNamePrefix" font_size="9" font_style="BOLD" hAlignment="center"/>
<simple_label prefix="d2b_sample_table.rotationPrefix" font_size="9" font_style="BOLD" hAlignment="center"/>
<simple_label prefix="d2b_sample_table.verticalPrefix" font_size="9" font_style="BOLD" hAlignment="center"/>
<simple_label prefix="d2b_sample_table.verticalFixedPrefix" font_size="9" font_style="BOLD" hAlignment="center"/>
<dynamic_composite role="d2b_sample_table1" properties="position_index,position_name,rotation_position,vertical_position,fixed_position">
<simple_label prefix="d2b_sample_table.enabledPrefix" font_size="9" font_style="BOLD" hAlignment="center"/>
<dynamic_composite role="d2b_sample_table1" properties="position_index,position_name,rotation_position,vertical_position,fixed_position,enabled_position">
<label role="d2b_sample_table1" property="position_index" hAlignment="right" font_style="BOLD"/>
<text role="d2b_sample_table1" property="position_name"/>
......@@ -26,6 +28,7 @@
-->
<combo role="d2b_sample_table1" property="fixed_position" valuesAndLabels="d2b_sample_table.rotation,d2b_sample_table.vertical,d2b_sample_table.not"/>
<check role="d2b_sample_table1" property="enabled_position" checkBoxValues="d2b_sample_table.enabled_position"/>
</dynamic_composite>
</table_composite>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment