45 DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE )
57 :wxPanel(parent, -1, wxPoint(20,20), wxDefaultSize, wxTAB_TRAVERSAL)
59 _lastConceptUpdated = NULL;
60 _concepts =
new std::vector<wxConceptControl*>();
61 _resolutionOverALL = resolutionALL;
62 _configuration = configurationElem;
64 setVerticalMaxSelectedNums( groupConfig );
70 _outSizer =
new wxFlexGridSizer ( 1, 10, 10);
71 _orientation = theOrientation;
72 initializeResolutionSlider();
73 _actualInstant=
new std::map<std::string,int>();
75 wxFlexGridSizer * resolutionSizer =
new wxFlexGridSizer( 3,1,10,10 );
76 resolutionSizer->AddSpacer(10);
77 resolutionSizer->Add( _resolutionSlider, 1, wxEXPAND | wxGROW );
78 resolutionSizer->AddSpacer(10);
80 wxFlexGridSizer * sizer =
new wxFlexGridSizer( 1,2,10,10 );
81 sizer->Add( _outSizer, 1, wxEXPAND| wxGROW );
82 sizer->Add( resolutionSizer, 1, wxEXPAND | wxGROW );
89 :wxPanel(parent, id ,pos, size)
92 _concepts =
new std::vector<wxConceptControl*>();
99 _outSizer =
new wxFlexGridSizer ( 1, 10, 10);
103 wxFlexGridSizer * sizer =
new wxFlexGridSizer( 1,2,10,10 );
104 sizer->Add(
_outSizer, 1, wxEXPAND| wxGROW );
117 for(i=0; i< size ; i++)
119 delete (*_concepts)[i];
163 int minTmp = value - delta/2;
164 int maxTmp = value + delta/2;
181 for(
int i=0; i< (int)(
_concepts->size()); i++)
216 int groupID = *(
int*)event.GetClientData();
229 for(
int i=0; i<size; i++)
231 aConcept = (*_concepts)[i];
232 if( aConcept!= eventConcept )
248 std::vector<int> theInstant;
253 wxCommandEvent newevent(wxINSTANT_CHOOSER_CHANGE,GetId());
292 if( (
int)(choiceInstant.size()) == max )
297 (*_concepts)[i]->setActualValue( choiceInstant[i] );
313 choiceInstant.push_back( ((*
_concepts))[i]->getActualValue());
323 std::map<std::string,int>::iterator iteratorActualInstant;
325 std::string nameConcepti;
328 concepti=(*_concepts)[i];
329 nameConcepti=concepti->
getName();
330 iteratorActualInstant=_actualInstant->find(nameConcepti);
331 if(iteratorActualInstant!=_actualInstant->end())
333 int actualValue=iteratorActualInstant->second;
336 nameConcepti.clear();
351 concepti=(*_concepts)[i];
365 choiceInstantData.insert(std::pair < std::string, int> ((*
_concepts)[i]->getName(), (*
_concepts)[i]->getActualValue()));
407 _resolutionSlider =
new wxSlider(
this , -1,5,1,8,wxDefaultPosition, wxSize(25,45), wxSL_LEFT | wxSL_AUTOTICKS );
417 int minTmp = value - delta/2;
418 int maxTmp = value + delta/2;
427 theConceptToUpdate->
setRange( minTmp,maxTmp );
434 std::string::size_type numberIndex = groupMaxVertNums.find(
" ", 0);
435 std::string::size_type start = 0;
436 while( numberIndex != std::string::npos )
438 endSub = numberIndex;
439 std::string number = groupMaxVertNums.substr( 0, endSub );
440 groupMaxVertNums.erase( 0, endSub+1 );
441 int intReturn = atoi(number.c_str());
446 start += numberIndex;
447 numberIndex = groupMaxVertNums.find(
" ", endSub);
455 for ( i=0; i<size && !setted; i++ )
457 if( (*
_concepts)[i]->getName().compare( theConceptName ) == 0 )
459 (*_concepts)[i]->setActualValue( theValue );
470 for ( i=0; i<size && value==-1; i++ )
472 if( (*
_concepts)[i]->getName().compare( theConceptName ) == 0 )
474 value = (*_concepts)[i]->getActualValue( );
486 for ( i=0; i<size && value==-1; i++ )
488 if( (*
_concepts)[i]->getName().compare( theConceptName ) == 0 )
498 bool isChecked =
false;
502 for ( i=0; i<size && !isChecked; i++ )
504 if( (*
_concepts)[i]->getName().compare( theConceptName ) == 0 )
506 isChecked = (*_concepts)[i]->getIfChecked( atChecksPosition );
516 int max = conceptNameVect.size();
519 if( conceptNameVect[i].compare(
"Axe Depth") == 0 )
521 addConcept( conceptNameVect[i], 0, conceptSizeVect[i], 1);
523 addConcept( conceptNameVect[i], 1, conceptSizeVect[i], 1);