Commit 16565764 authored by Franck Cecillon's avatar Franck Cecillon

Add values for test

parent 3754ec47
......@@ -50,6 +50,10 @@ SampleForProposal::SampleForProposal(const string& name) : ExperimentController(
idCurrentSampleGen.init(this, SAVE, "idCurrentSampleGen");
proposalId.init(this, SAVE, "proposalId");
indiceCurrent.init(this, NOSAVE, "indiceCurrent");
SampleLabels.init(this, NOSAVE, "SampleLabels");
SampleValues.init(this, NOSAVE, "SampleValues");
// refSampleProposalID.init(this, SAVE, "refSampleProposalID");
// idCurrent.init(this, SAVE, "idCurrent");
......@@ -101,8 +105,7 @@ SampleForProposal::SampleForProposal(const string& name) : ExperimentController(
proposalId = 1;
m_a = 0;
// SampleRefLabels.resize(1);
// SampleRefValues.resize(1);
// for (int32 i = 0; i < 1 ; i++) {
// SampleRefLabels.update(i, " ( Id = None ) " );
// SampleRefValues.update(i, i );
......@@ -159,7 +162,7 @@ void SampleForProposal::refreshNbSamplesProperty(int32 value) throw (CannotSetVa
//throw CannotSetValue();
return;
}
cout << "refreshNbSamplesProperty " << value << endl;
id.resize(value);
sampleName.resize(value);
samplecomment.resize(value);
......@@ -175,7 +178,8 @@ void SampleForProposal::refreshNbSamplesProperty(int32 value) throw (CannotSetVa
// transition.resize(value);
idCurrentSampleGen.resize(value+1);
// if ( indiceCurrentDisplay() > value){
......@@ -183,7 +187,7 @@ void SampleForProposal::refreshNbSamplesProperty(int32 value) throw (CannotSetVa
// }
if (experimentData.isAssigned() ) {
//cout << "refreshNbSamplesProperty experimentData->proposalId().c_str() " << experimentData->proposalId() << endl;
cout << "refreshNbSamplesProperty experimentData->proposalId().c_str() " << experimentData->proposalId() << endl;
proposalId = lexical_cast<int32>(experimentData->proposalId().c_str());
int32 cal_id;
for (int32 ki = 0; ki < value; ki++) {
......@@ -199,6 +203,7 @@ void SampleForProposal::refreshNbSamplesProperty(int32 value) throw (CannotSetVa
}
void SampleForProposal::refreshsampleName(int32 index, const string& value ) {
cout << " refreshsampleName " << index << " index "<< value << endl;
updatelisteSampleRef(nbSamples());
}
......@@ -247,15 +252,39 @@ void SampleForProposal::updatelisteSampleRef(int32 new_nbSamples) {
SampleGenRefValues.update(i, i);
}
} else {
nbSamplesGen = 1;
nbSamplesGen = 3;
idCurrentSampleGen.resize(nbSamplesGen());
SampleGenRefValues.resize(nbSamplesGen());
SampleGenRefLabels.resize(nbSamplesGen());
for (int32 i = 0; i < nbSamplesGen(); i++) {
SampleGenRefLabels.update(0, " Fe203 ");
SampleGenRefValues.update(0, 0);
SampleGenRefLabels.update(1, " GaN ");
SampleGenRefValues.update(1, 1);
SampleGenRefLabels.update(2, " Al203 ");
SampleGenRefValues.update(2, 2);
/*for (int32 i = 0; i < nbSamplesGen(); i++) {
//cout << "updatelisteSampleRef02 i " << i << endl;
SampleGenRefLabels.update(i, " None ");
SampleGenRefValues.update(i, i);
}
}*/
SampleLabels.resize(nbSamplesGen());
SampleValues.resize(nbSamplesGen());
SampleLabels.update(0, " Id = 0 (Fe203- ferroelectric) " );
SampleValues.update(0, 0 );
SampleLabels.update(1, " Id = 1 (Fe203-nanocrystalline) " );
SampleValues.update(1, 1 );
SampleLabels.update(2, " Id = 2 (GaN-sapphire substrates)" );
SampleValues.update(2, 2 );
indiceCurrent.setEnumeratedValues(SampleValues);
indiceCurrent.setEnumeratedLabels(SampleLabels);
}
idCurrentSampleGen.setEnumeratedValues(SampleGenRefValues);
......
......@@ -129,6 +129,10 @@ public:
Property<int32> proposalId;
Property<int32> indiceCurrent;
DynamicProperty<std::string> SampleLabels; // Possible states
DynamicProperty<int32> SampleValues; // Possible state values
protected:
virtual void updateproposalId();
......
......@@ -12,14 +12,15 @@ sample_for_proposal.MainSample=Main sample
sample_for_proposal.sampleTable=Sample table description
sample_for_proposal.echALabel=NOP1
sample_for_proposal.echBLabel=NOP2
sample_for_proposal.echCLabel=NOP3
sample_for_proposal.echALabel=Fe203
sample_for_proposal.echBLabel=GaN
sample_for_proposal.echCLabel=Al203
sample_for_proposal.echAValue=0
sample_for_proposal.echBValue=1
sample_for_proposal.echCValue=2
sample_for_proposal.sampleTablePar1=Set Sample parameters
sample_for_proposal.setParaSample=ID sample
......
......@@ -34,6 +34,13 @@
<dynamic_property name="idCurrentSampleGen" size_property="nbSamples" type="int32">
</dynamic_property>
<property name="indiceCurrent" type="long">
</property>
<dynamic_property name="SampleValues" size_property="nbSamples" type="Long">
</dynamic_property>
<dynamic_property name="SampleLabels" size_property="nbSamples" type="String">
</dynamic_property>
<!--
<dynamic_property name="crossSection" size_property="nbSamples" type="float64" max_length="8">
......
......@@ -17,8 +17,9 @@
<label role="sample_for_proposal1" property="id" hAlignment="center"/>
<text role="sample_for_proposal1" property="sampleName" hAlignment="center"/>
<text role="sample_for_proposal1" property="samplecomment" hAlignment="right"/>
<combo role="sample_for_proposal1" property="idCurrentSampleGen" hAlignment="right" valuesAndLabels="sample_for_proposal.echA,sample_for_proposal.echB,sample_for_proposal.echC"/>
<!-- <combo role="sample_for_proposal1" property="idCurrentSampleGen" hAlignment="right" valuesAndLabels="sample_for_proposal.echA,sample_for_proposal.echB,sample_for_proposal.echC"/>
-->
<property_combo role="sample_for_proposal1" property="idCurrentSampleGen" Alignment="right"/>
</dynamic_composite>
</table_composite>
......
......@@ -2,7 +2,6 @@
<controller type="type_of_measure" role="type_of_measure1"/>
<number_of_lines nb_lines="3"/>
<property_combo role="type_of_measure1" property="typeOfMeasureIndex" prefix="type_of_measure.type_indexPrefix"/>
<newLine/>
<group title="type_of_measure.sampleBloc" border="false" >
<table_composite nbColumns="2" alignment="top_left">
......
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