Changeset 455 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
- Timestamp:
- Dec 16, 2013, 5:16:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r449 r455 17 17 #include "GWt_dialog.h" 18 18 #include "GWt_console.h" 19 #include "GWt_sector.h" 19 20 #include "GWt_globalParameters.h" 20 21 #include "GWt_sectionToExecute.h" … … 23 24 #define BAVARD 0 24 25 25 GWt_softwarePanel::GWt_softwarePanel(dataManager* dataManager, PspaApplication* pspa,WContainerWidget* parent)26 : WContainerWidget( parent)27 { 28 dtmanage_ = dataManager; 29 pspa_ = pspa; 26 GWt_softwarePanel::GWt_softwarePanel(dataManager* dataManager,GWt_sector* sect) 27 : WContainerWidget(), 28 dtmanage_(dataManager), 29 UIsector_(sect) 30 { 30 31 31 32 // bouton execute … … 51 52 void GWt_softwarePanel::addSectionToExecuteW() 52 53 { 54 cout << "***********************************" << endl; 55 cout << "* A réécrire *" << endl; 56 cout << "***********************************" << endl; 57 return; 53 58 #if BAVARD > 0 54 59 cout << "***********************************" << endl; … … 56 61 #endif 57 62 58 abstractElement* premierElement ;59 abstractElement* dernierElement ;63 abstractElement* premierElement = NULL; 64 abstractElement* dernierElement = NULL; 60 65 61 66 int premierIndex = 0; … … 63 68 64 69 cout << "sections_.size() = " << sections_.size() << endl; 65 70 /* 66 71 // if there is no section 67 72 if(sections_.size() == 0) { … … 87 92 88 93 dtmanage_->addSectionToExecute(premierElement,premierIndex,dernierElement,dernierIndex,nomDeLogiciel()); 89 94 */ 90 95 std::string premierElementLabel = ""; 91 96 std::string dernierElementLabel = ""; … … 109 114 fillComboWithSoftwares(softCombo); 110 115 111 GWt_sectionToExecute* newSection = new GWt_sectionToExecute(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(sections_.size()),this );116 GWt_sectionToExecute* newSection = new GWt_sectionToExecute(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(sections_.size()),this,UIsector_); 112 117 113 118 stringstream st; … … 165 170 // traitement de la premiere ligne 166 171 // on impose le depart du calcul au premier element 167 string premier = dtmanage_->getLabelFromElementNumero(1); 172 string premier = ""; 173 if (UIsector_->getSectorControler()) { 174 if (UIsector_->getSectorControler()->getSectionsToExecute().size() > 0) { 175 if (UIsector_->getSectorControler()->getSectionsToExecute()[0]->getElements().size() > 0) { 176 premier = UIsector_->getSectorControler()->getSectionsToExecute()[0]->getElements()[0]->getLabel(); 177 } 178 } 179 } 180 181 // FIXME : A réécrire 182 /* 168 183 if (sections_.size() > 0) { 169 184 sections_[0]->setFirstElementCurrentSelection(premier); … … 235 250 exec_go_->enable(); 236 251 } 237 252 */ 238 253 return true; 239 254 } … … 241 256 bool GWt_softwarePanel::areDataCoherent() 242 257 { 258 // FIXME 259 cout << "***********************************" << endl; 260 cout << "** To be move in controler **" << endl; 261 cout << "***********************************" << endl; 262 return true; 243 263 #if BAVARD > 0 244 264 cout << "***********************************" << endl; … … 247 267 248 268 bool caMarche = true; 249 269 /* 250 270 // initialize dataManager 251 271 dtmanage_->initializeExecution(); … … 299 319 sections_[a]->setWarnings(diagnosticWarnings); 300 320 }//a 301 321 */ 302 322 return caMarche; 303 323 } … … 319 339 320 340 // delete from dataManager 321 dtmanage_->clearSectionToExecute(sectionIndex);341 UIsector_->getSectorControler()->clearSectionToExecute(sectionIndex); 322 342 323 343 // delete from User Interface … … 352 372 // exec_go_->setDisabled(true); 353 373 calculDialog.hide(); 354 pspa_->faireDessin();374 UIsector_->getAccelerator()->faireDessin(); 355 375 } 356 376 357 377 void GWt_softwarePanel::fillComboWithElements(Wt::WComboBox* cBox) 358 378 { 359 if (cBox == NULL) return; 379 // FIXME 380 cout << "***********************************" << endl; 381 cout << "** To be move in controler **" << endl; 382 cout << "***********************************" << endl; 383 return; 384 385 /* if (cBox == NULL) return; 360 386 361 387 // get the last item selected … … 376 402 } 377 403 cBox->refresh(); 404 */ 378 405 } 379 406
Note: See TracChangeset
for help on using the changeset viewer.