Changeset 371 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
- Timestamp:
- Mar 6, 2013, 3:19:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r367 r371 264 264 bool GWt_softwarePanel::areDataCoherent() 265 265 { 266 267 268 269 270 271 272 266 bool caMarche = true; 267 trivaluedBool tbResume = TBoolOk; 268 dtmanage_->initializeExecution(); 269 string diagnostic; 270 271 list<GWt_sectionToExecute*>::iterator itr; 272 for(itr = selectedSections_.begin(); itr != selectedSections_.end(); itr++) 273 273 { 274 string debString = (*itr)->debut->text().toUTF8(); 275 string finString = (*itr)->fin->text().toUTF8(); 274 string debString = (*itr)->debut->text().toUTF8(); 275 string finString = (*itr)->fin->text().toUTF8(); 276 277 int debut = dtmanage_->getNumeroFromElementLabel(debString); 278 int fin = dtmanage_->getNumeroFromElementLabel(finString); 279 nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() ); 280 dtmanage_->addSectionToExecute(debut,fin,prog); 276 281 277 int debut = dtmanage_->getNumeroFromElementLabel(debString); 278 int fin = dtmanage_->getNumeroFromElementLabel(finString); 279 nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() ); 280 dtmanage_->addSectionToExecute(debut,fin,prog); 281 282 // check sections 283 for (int i=debut-1; i<fin; i++) { 284 if (pspa_->getBeamLine()) { 285 if (pspa_->getBeamLine()->getAbstractElement(i)) { 286 trivaluedBool tb = pspa_->getBeamLine()->getAbstractElement(i)->setSoftware(prog.getString()); 287 if (tb == TBoolError ) { 288 diagnostic += pspa_->getBeamLine()->getAbstractElement(i)->getNomdElement().getElementName() + " is not allowed with "+ prog.getString()+"\n "; 289 caMarche = false; 290 tbResume = tb; 291 } else if ( tb == TBoolIgnore ) { 292 diagnostic += pspa_->getBeamLine()->getAbstractElement(i)->getNomdElement().getElementName() + " will be ignored by "+ prog.getString()+"\n "; 293 if ( tbResume != TBoolError ) tbResume = tb; 294 } else { 295 pspa_->getBeamLine()->update(i); 296 } 297 } 298 } 299 } 300 } 301 302 if ( tbResume == TBoolError ) { 303 GWt_dialog calculDialog("PSPA check execute : ERROR", diagnostic , GWt_dialog::Error,true,true); 304 calculDialog.exec(); 305 } else if (tbResume == TBoolIgnore ) { 306 GWt_dialog calculDialog("PSPA check execute : WARNING", diagnostic , GWt_dialog::Warning,false,true); 307 calculDialog.exec(); 308 } 309 /* 310 } else if ( essai == warning ) { 311 GWt_dialog calculDialog("PSPA check execute : warning ", diagnostic , GWt_dialog::Warning, false,true); 312 calculDialog.exec(); 313 */ 314 315 316 return caMarche; 282 // check sections 283 for (int i=debut-1; i<fin; i++) { 284 if (pspa_->getBeamLine()) { 285 if (pspa_->getBeamLine()->getAbstractElement(i)) { 286 trivaluedBool tb = pspa_->getBeamLine()->getAbstractElement(i)->setSoftware(prog.getString()); 287 if (tb == TBoolError ) { 288 diagnostic += pspa_->getBeamLine()->getAbstractElement(i)->getNomdElement().getElementName() + " is not allowed with "+ prog.getString()+"\n "; 289 caMarche = false; 290 tbResume = tb; 291 } else if ( tb == TBoolIgnore ) { 292 diagnostic += pspa_->getBeamLine()->getAbstractElement(i)->getNomdElement().getElementName() + " will be ignored by "+ prog.getString()+"\n "; 293 if ( tbResume != TBoolError ) tbResume = tb; 294 } else { 295 pspa_->getBeamLine()->update(i); 296 } 297 } 298 } 299 } 300 } 301 302 if ( tbResume == TBoolError ) { 303 GWt_dialog calculDialog("PSPA check execute : ERROR", diagnostic , GWt_dialog::Error,true,true); 304 calculDialog.exec(); 305 } else if (tbResume == TBoolIgnore ) { 306 GWt_dialog calculDialog("PSPA check execute : WARNING", diagnostic , GWt_dialog::Warning,false,true); 307 calculDialog.exec(); 308 } 309 310 /* 311 } else if ( essai == warning ) { 312 GWt_dialog calculDialog("PSPA check execute : warning ", diagnostic , GWt_dialog::Warning, false,true); 313 calculDialog.exec(); 314 */ 315 316 return caMarche; 317 317 } 318 318
Note: See TracChangeset
for help on using the changeset viewer.