Changeset 495 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
- Timestamp:
- Mar 12, 2014, 11:15:56 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r493 r495 23 23 #define BAVARD 1 24 24 25 GWt_softwarePanel Bis::GWt_softwarePanelBis(dataManager* dataManager,GWt_machine* mach)25 GWt_softwarePanel::GWt_softwarePanel(dataManager* dataManager,GWt_machine* mach) 26 26 : WContainerWidget(), 27 27 dtmanage_(dataManager), … … 36 36 contenuSections_->addWidget(new WBreak()); 37 37 contenuSections_->addWidget(new WBreak()); 38 cout << " GWt_softwarePanel Bis::GWt_softwarePanelBisDISPLAY SOFTWARE PANEL " << endl;38 cout << " GWt_softwarePanel::GWt_softwarePanel DISPLAY SOFTWARE PANEL " << endl; 39 39 displayFromControler(); 40 40 … … 42 42 } 43 43 44 GWt_softwarePanel Bis::~GWt_softwarePanelBis() {45 } 46 47 void GWt_softwarePanel Bis::displayFromControler()44 GWt_softwarePanel::~GWt_softwarePanel() { 45 } 46 47 void GWt_softwarePanel::displayFromControler() 48 48 { 49 cout << " GWt_softwarePanel Bis::displayFromControler() " << endl<<endl;49 cout << " GWt_softwarePanel::displayFromControler() " << endl<<endl; 50 50 51 51 // Clear all … … 55 55 // Get all sectionsToExecute from this machine 56 56 if (!UImachine_->getMachineControler()) { 57 cout << " GWt_softwarePanel Bis::displayFromControler() PAS DE MACHINE " << endl;57 cout << " GWt_softwarePanel::displayFromControler() PAS DE MACHINE " << endl; 58 58 return; 59 59 } else { 60 cout << " GWt_softwarePanel Bis::displayFromControler() MACHINE TROUVEE " << endl;60 cout << " GWt_softwarePanel::displayFromControler() MACHINE TROUVEE " << endl; 61 61 } 62 62 63 63 if (UImachine_->getMachineControler()->getComputingBlocks().size() == 0) { 64 64 // FIXME : Add a message to tell the user to add first an element 65 cout << " GWt_softwarePanel Bis::displayFromControler() PAS DE BLOCK " << endl;65 cout << " GWt_softwarePanel::displayFromControler() PAS DE BLOCK " << endl; 66 66 } else { 67 cout << " GWt_softwarePanel Bis::displayFromControler() NOMBRE DE BLOCK " << UImachine_->getMachineControler()->getComputingBlocks().size() << endl;67 cout << " GWt_softwarePanel::displayFromControler() NOMBRE DE BLOCK " << UImachine_->getMachineControler()->getComputingBlocks().size() << endl; 68 68 69 69 unsigned int firstElemeOfComputingBlockIndex = 0; 70 70 71 71 for (unsigned int a=0; a<UImachine_->getMachineControler()->getComputingBlocks().size(); a++) { 72 cout << " GWt_softwarePanel Bis::displayFromControler() BLOC No " << a+1 << endl;72 cout << " GWt_softwarePanel::displayFromControler() BLOC No " << a+1 << endl; 73 73 abstractElement* premierElement = NULL; 74 74 abstractElement* dernierElement = NULL; … … 85 85 if (premierElement) premierElementLabel = premierElement->getLabel(); 86 86 if (dernierElement) dernierElementLabel = dernierElement->getLabel(); 87 cout << " GWt_softwarePanel Bis::displayFromControler() dernier element a afficher " << dernierElementLabel << endl;87 cout << " GWt_softwarePanel::displayFromControler() dernier element a afficher " << dernierElementLabel << endl; 88 88 89 89 WComboBox* lineFromCombo = new WComboBox(); … … 119 119 GWt_computingBlock* newBlock = new GWt_computingBlock(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(blocPtr),blocPtr,UImachine_); 120 120 121 cout << " GWt_softwarePanel Bis::displayFromControler j'ajoute un bloc : " << newBlock << endl;122 cout << " GWt_softwarePanel Bis::displayFromControler nb widget avant : " << contenuSections_->count() << endl;121 cout << " GWt_softwarePanel::displayFromControler j'ajoute un bloc : " << newBlock << endl; 122 cout << " GWt_softwarePanel::displayFromControler nb widget avant : " << contenuSections_->count() << endl; 123 123 contenuSections_->addWidget(newBlock); 124 cout << " GWt_softwarePanel Bis::displayFromControler nb widget apres : " << contenuSections_->count() << endl;124 cout << " GWt_softwarePanel::displayFromControler nb widget apres : " << contenuSections_->count() << endl; 125 125 126 126 } … … 128 128 } 129 129 130 void GWt_softwarePanel Bis::fillComboWithElements(Wt::WComboBox* cBox)130 void GWt_softwarePanel::fillComboWithElements(Wt::WComboBox* cBox) 131 131 { 132 132 … … 145 145 } 146 146 147 void GWt_softwarePanel Bis::fillComboWithSoftwares(Wt::WComboBox* cBox, std::string selected)147 void GWt_softwarePanel::fillComboWithSoftwares(Wt::WComboBox* cBox, std::string selected) 148 148 { 149 149 #if BAVARD > 0 … … 167 167 168 168 169 Wt::WContainerWidget* GWt_softwarePanel Bis::createAddDeletePushButtons(computingBlock* cpbl)169 Wt::WContainerWidget* GWt_softwarePanel::createAddDeletePushButtons(computingBlock* cpbl) 170 170 { 171 171 WContainerWidget* buttonContainer= new WContainerWidget(); … … 175 175 // preparation du bouton add 176 176 WPushButton* exec_add = new WPushButton("+"); 177 // exec_add->clicked().connect(this, &GWt_softwarePanel Bis::addComputingBlock);178 exec_add->clicked().connect(boost::bind(&GWt_softwarePanel Bis::addComputingBlock, this, cpbl));177 // exec_add->clicked().connect(this, &GWt_softwarePanel::addComputingBlock); 178 exec_add->clicked().connect(boost::bind(&GWt_softwarePanel::addComputingBlock, this, cpbl)); 179 179 exec_add->setStyleClass("roundButton"); 180 180 exec_add->setMaximumSize(20,20); … … 185 185 // warningsContainer_->setStyleClass("warningsContainer"); 186 186 187 exec_delete->clicked().connect(boost::bind(&GWt_softwarePanel Bis::deleteComputingBlock, this, cpbl));187 exec_delete->clicked().connect(boost::bind(&GWt_softwarePanel::deleteComputingBlock, this, cpbl)); 188 188 exec_delete->setStyleClass("roundButton"); 189 189 exec_delete->setMaximumSize(20,20); … … 197 197 } 198 198 199 void GWt_softwarePanel Bis::addComputingBlock(computingBlock* cpbl) {199 void GWt_softwarePanel::addComputingBlock(computingBlock* cpbl) { 200 200 // We put the last element of the previous sectionToExecute inside 201 201 … … 209 209 210 210 211 // void GWt_softwarePanelBis::deleteComputingBlock(int sectionLabel) 212 // { 213 // cout << " GWt_softwarePanelBis::deleteComputingBlock()" << endl; 214 215 // stringstream st; 216 // st << sectionLabel; 217 // std::string sectionName = st.str(); 218 // //FIXME 219 // vector<computingBlock*>& compBloc = UImachine_->getMachineControler()->getComputingBlocks(); 220 // cout << " GWt_softwarePanelBis::deleteComputingBlock() nb blocs = " << compBloc.size() << endl; 221 // cout << " GWt_softwarePanelBis::deleteComputingBlock() nb widgets = " << sectionName << endl; 222 // cout << " GWt_softwarePanelBis::deleteComputingBlock() nom bloc a detruire = " << contenuSections_->count() << endl; 223 224 // for ( unsigned k=0; k < compBloc.size(); k++) { 225 226 // } 227 // /* if ( dtmanage_->getJobListSize() == 0 ) return; 228 // for (unsigned int sectionIndex = 0; sectionIndex< UIsectionsToExecute_deprecated_.size(); sectionIndex++) { 229 // if (UIsectionsToExecute_deprecated_[sectionIndex]->objectName() == sectionName) { 230 231 // // delete from dataManager 232 // UIsector_->getSectorControler()->clearSectionToExecute(sectionIndex); 233 234 // // delete from User Interface 235 // contenuSections_->removeWidget(UIsectionsToExecute_deprecated_[sectionIndex]); 236 // delete UIsectionsToExecute_deprecated_[sectionIndex]; 237 // UIsectionsToExecute_deprecated_.erase (UIsectionsToExecute_deprecated_.begin()+sectionIndex); 238 // } 239 // } 240 // */ 241 // displayFromControler(); 242 // } 243 244 void GWt_softwarePanelBis::deleteComputingBlock(computingBlock* cpbl) 245 { 246 cout << " GWt_softwarePanelBis::deleteComputingBlock(computingBlock*)" << endl; 211 212 void GWt_softwarePanel::deleteComputingBlock(computingBlock* cpbl) 213 { 214 cout << " GWt_softwarePanel::deleteComputingBlock(computingBlock*)" << endl; 247 215 248 216 UImachine_->getMachineControler()->eraseComputingBlock(cpbl);
Note: See TracChangeset
for help on using the changeset viewer.