Changeset 358 in PSPA for Interface_Web
- Timestamp:
- Mar 4, 2013, 5:57:49 PM (12 years ago)
- Location:
- Interface_Web/trunk/pspaWT/sources/userInterface
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h
r302 r358 39 39 private : 40 40 void disableSectionExecute(); 41 void checkSectionSelection(); 41 // void checkSectionSelection(); 42 void updateSectionSelection(); 42 43 void deleteSectionToExecuteW(); 43 44 string getSelection(); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r351 r358 43 43 44 44 // preparation du bouton push_ok 45 WPushButton* exec_ok = new WPushButton(" check/ok");46 exec_ok->clicked().connect(this, &GWt_softwarePanel:: checkSectionSelection);45 WPushButton* exec_ok = new WPushButton("ok"); 46 exec_ok->clicked().connect(this, &GWt_softwarePanel::updateSectionSelection); 47 47 48 48 // le panel … … 119 119 120 120 121 void GWt_softwarePanel::checkSectionSelection() 121 // void GWt_softwarePanel::checkSectionSelection() 122 // { 123 // if ( selectedSections_.empty() ) return; 124 125 // // traitement de la premiere ligne 126 // // on impose le depart du calcul au premier element 127 // string premier = dtmanage_->getLabelFromElementNumero(1); 128 // (*selectedSections_.begin())->debut->setText(premier); 129 130 // string currentString = (*selectedSections_.begin())->fin->text().toUTF8(); 131 // int current = dtmanage_->getNumeroFromElementLabel(currentString); 132 133 // // si la fin est mal definie on prend toute la config par defaut 134 // if ( current <= 0 || current > dtmanage_->getBeamLineSize() ) 135 // { 136 // current = dtmanage_->getBeamLineSize(); 137 // currentString = dtmanage_->getLabelFromElementNumero(current); 138 // (*selectedSections_.begin())->fin->setText(currentString); 139 // } 140 // current++; 141 // currentString = dtmanage_->getLabelFromElementNumero(current); 142 143 // // traitement des suivantes (on avance d'un cran dans la liste) 144 // list<GWt_sectionToExecute*>::iterator itr, itr0; 145 // itr0 = selectedSections_.begin(); 146 // itr0++; 147 // for (itr = itr0; itr != selectedSections_.end(); itr++) 148 // { 149 // // debut 150 // if ( current > dtmanage_->getBeamLineSize() ) 151 // { 152 // GWt_dialog warningDialog("PSPA :: verification des sections", " bad section definition !", GWt_dialog::Error,true,true); 153 // warningDialog.exec(); 154 // return; 155 // } 156 157 // (*itr)->debut->setText(currentString); 158 // // fin 159 // string finString = (*itr)->fin->text().toUTF8(); 160 161 // int numeroFin = dtmanage_->getNumeroFromElementLabel( finString); 162 163 // if ( numeroFin < current || numeroFin > dtmanage_->getBeamLineSize()) 164 // { 165 // GWt_dialog warningDialog("PSPA : Checking of sections", " bad section definition !", GWt_dialog::Error, true,true); 166 // warningDialog.exec(); 167 // return; 168 // } 169 170 // // preparation de la ligne suivante 171 // current = numeroFin +1; 172 // currentString = dtmanage_->getLabelFromElementNumero(current); 173 // } 174 175 // if (!areDataCoherent()) { 176 // GWt_dialog warningDialog("PSPA : verification des sections", " donnees incoherentes !", GWt_dialog::Error,true,true); 177 // warningDialog.exec(); 178 // } 179 // else 180 // { 181 // exec_go_->setDisabled(false); 182 183 // // All ok, then put colors on beamLine 184 // list<GWt_sectionToExecute*>::iterator itr2; 185 // for(itr2 = selectedSections_.begin();itr2 != selectedSections_.end(); itr2++) 186 // { 187 // string debString = (*itr2)->debut->text().toUTF8(); 188 // string finString = (*itr2)->fin->text().toUTF8(); 189 190 191 // int debut = dtmanage_->getNumeroFromElementLabel(debString); 192 // int fin = dtmanage_->getNumeroFromElementLabel(finString); 193 // /** 194 // for (int i=debut; i=<fin; i++) { 195 // getBeamLine()->getAbstractElement(i)->setBGColor( 196 197 // } 198 // nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() ); 199 // dtmanage_->addSectionToExecute(debut,fin,prog); 200 // */ 201 // } 202 // } 203 204 205 // } 206 207 void GWt_softwarePanel::updateSectionSelection() 122 208 { 123 209 if ( selectedSections_.empty() ) return; … … 172 258 currentString = dtmanage_->getLabelFromElementNumero(current); 173 259 } 174 175 if (!areDataCoherent()) { 176 GWt_dialog warningDialog("PSPA : verification des sections", " donnees incoherentes !", GWt_dialog::Error,true,true); 177 warningDialog.exec(); 178 } 179 else 180 { 181 exec_go_->setDisabled(false); 260 exec_go_->setDisabled(false); 261 182 262 183 263 // All ok, then put colors on beamLine … … 200 280 */ 201 281 } 202 }203 204 205 282 } 206 283 … … 273 350 void GWt_softwarePanel::executer() 274 351 { 352 if (!areDataCoherent()) { 353 // GWt_dialog warningDialog("PSPA : verification des sections", " donnees incoherentes !", GWt_dialog::Error,true,true); 354 // warningDialog.exec(); 355 exec_go_->setDisabled(true); 356 return; 357 } 358 275 359 GWt_console* console = NULL; 276 360 if (static_cast<GWt_console*> (wApp->findWidget ("console"))) {
Note: See TracChangeset
for help on using the changeset viewer.