Changeset 367 in PSPA
- Timestamp:
- Mar 5, 2013, 9:32:52 PM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT/sources/userInterface
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h
r358 r367 38 38 39 39 private : 40 void disableSectionExecute();40 // void disableSectionExecute(); 41 41 // void checkSectionSelection(); 42 voidupdateSectionSelection();42 bool updateSectionSelection(); 43 43 void deleteSectionToExecuteW(); 44 44 string getSelection(); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r366 r367 281 281 282 282 choixHistoDessin_ = new WComboBox(); 283 Wt::WRadioButton *button3= new WRadioButton(" histogram of");283 Wt::WRadioButton *button3= new WRadioButton(" histogram after element "); 284 284 group_->addButton(button3,3); 285 285 286 286 glayout->addWidget(button3,3,1); 287 glayout->addWidget(choix VariableHisto_,3,2);288 glayout->addWidget(new WText("after element"),3,3);289 glayout->addWidget(choix HistoDessin_,3,4);287 glayout->addWidget(choixHistoDessin_,3,2); 288 // glayout->addWidget(new WText(" of "),3,3); 289 glayout->addWidget(choixVariableHisto_,3,3); 290 290 ///////////////////////////////////////////////////////////////////// 291 291 -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r359 r367 30 30 exec_go_ = new WPushButton("execute!"); 31 31 // exec_go_->setMinimumSize(300,300); 32 exec_go_->setDisabled(true);32 // exec_go_->setDisabled(true); 33 33 exec_go_->clicked().connect(this, &GWt_softwarePanel::executer); 34 34 … … 42 42 43 43 // preparation du bouton push_ok 44 WPushButton* exec_ok = new WPushButton("ok");45 exec_ok->clicked().connect(this, &GWt_softwarePanel::updateSectionSelection);44 // WPushButton* exec_ok = new WPushButton("ok"); 45 // exec_ok->clicked().connect(this, &GWt_softwarePanel::updateSectionSelection); 46 46 47 47 // le panel … … 52 52 contenuSections_->addWidget(exec_add); 53 53 contenuSections_->addWidget(exec_delete); 54 contenuSections_->addWidget(exec_ok);54 // contenuSections_->addWidget(exec_ok); 55 55 contenuSections_->addWidget(exec_go_); 56 56 contenuSections_->addWidget(new WBreak()); … … 66 66 void GWt_softwarePanel::addSectionToExecuteW() 67 67 { 68 disableSectionExecute();68 // disableSectionExecute(); 69 69 70 70 string premierText, dernierText; … … 93 93 selectedSections_.back()->debut->setText(premierText); 94 94 selectedSections_.back()->fin = new WLineEdit(); 95 selectedSections_.back()->fin->changed().connect(this,&GWt_softwarePanel::disableSectionExecute);95 // selectedSections_.back()->fin->changed().connect(this,&GWt_softwarePanel::disableSectionExecute); 96 96 selectedSections_.back()->fin->setText(dernierText); 97 97 selectedSections_.back()->selection = new WComboBox(); … … 112 112 113 113 114 void GWt_softwarePanel::disableSectionExecute()115 {116 exec_go_->setDisabled(true);117 }114 // void GWt_softwarePanel::disableSectionExecute() 115 // { 116 // exec_go_->setDisabled(true); 117 // } 118 118 119 119 … … 204 204 // } 205 205 206 voidGWt_softwarePanel::updateSectionSelection()207 { 208 if ( selectedSections_.empty() ) return ;206 bool GWt_softwarePanel::updateSectionSelection() 207 { 208 if ( selectedSections_.empty() ) return false; 209 209 210 210 // traitement de la premiere ligne … … 237 237 GWt_dialog warningDialog("PSPA :: verification des sections", " bad section definition !", GWt_dialog::Error,true,true); 238 238 warningDialog.exec(); 239 return ;239 return false; 240 240 } 241 241 … … 250 250 GWt_dialog warningDialog("PSPA : Checking of sections", " bad section definition !", GWt_dialog::Error, true,true); 251 251 warningDialog.exec(); 252 return ;252 return false; 253 253 } 254 254 … … 257 257 currentString = dtmanage_->getLabelFromElementNumero(current); 258 258 } 259 exec_go_->setDisabled(false);260 259 // exec_go_->setDisabled(false); 260 return true; 261 261 } 262 262 … … 265 265 { 266 266 bool caMarche = true; 267 trivaluedBool tbResume = TBoolOk; 267 268 dtmanage_->initializeExecution(); 268 269 string diagnostic; … … 283 284 if (pspa_->getBeamLine()) { 284 285 if (pspa_->getBeamLine()->getAbstractElement(i)) { 285 if (!pspa_->getBeamLine()->getAbstractElement(i)->setSoftware(prog.getString())) { 286 diagnostic += pspa_->getBeamLine()->getAbstractElement(i)->getLabel()+ "could not be associate with "+ prog.getString()+" "; 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 "; 287 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; 288 294 } else { 289 295 pspa_->getBeamLine()->update(i); … … 294 300 } 295 301 296 // trivaluedBool essai = dtmanage_->checkExecute(diagnostic); 297 298 if ( caMarche == false ) { 302 if ( tbResume == TBoolError ) { 299 303 GWt_dialog calculDialog("PSPA check execute : ERROR", diagnostic , GWt_dialog::Error,true,true); 300 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 } 301 309 /* 302 310 } else if ( essai == warning ) { … … 304 312 calculDialog.exec(); 305 313 */ 306 }314 307 315 308 316 return caMarche; … … 312 320 { 313 321 if ( selectedSections_.empty() ) return; 314 disableSectionExecute();322 // disableSectionExecute(); 315 323 selectedSections_.back()->ligneDeWidget->clear(); 316 324 delete selectedSections_.back()->ligneDeWidget; … … 344 352 void GWt_softwarePanel::executer() 345 353 { 354 355 if ( !updateSectionSelection() ) return; 356 357 346 358 if (!areDataCoherent()) { 347 359 // GWt_dialog warningDialog("PSPA : verification des sections", " donnees incoherentes !", GWt_dialog::Error,true,true); 348 360 // warningDialog.exec(); 349 exec_go_->setDisabled(true);361 // exec_go_->setDisabled(true); 350 362 return; 351 363 } … … 369 381 } 370 382 371 exec_go_->setDisabled(true);383 // exec_go_->setDisabled(true); 372 384 calculDialog.hide(); 373 385 pspa_->faireDessin();
Note: See TracChangeset
for help on using the changeset viewer.