Changeset 495 in PSPA
- Timestamp:
- Mar 12, 2014, 11:15:56 AM (10 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/History
r492 r495 5 5 PSPA - Plateforme de simulation en physique des accélérateurs 6 6 ========================================================= 7 8 12 mars 2014 : Guy Le Meur 9 - suppression de la classe sectionToExecute 10 - la classe sector ne contient plus de sectionToExecute 11 - remplacée par computingBlock 12 - ajout de la classe expandedMachine qui contient le vecteur total des éléments et le vecteur des "computingBlock" 13 - dataManager contient une instance de expandedMachine 14 - la classe GWt_softwarePanel a été réécrite pour intégrer les précédentes modifications. 15 - GWt_accelerator a été modifié de manière que l'affichage du softwarePanel se fasse dans une fenêtre supplémentaire (Computing View) qui fait suite à la fenêtre "Detailled view of sector" 7 16 8 17 4 Mars 2013 : Laurent Garnier -
Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
r493 r495 44 44 inline expandedMachine* expandMachine() { 45 45 if ( !currentMachine_ ) currentMachine_ = new expandedMachine(this); 46 currentMachine_->fromSectors( sectors_ , this);46 currentMachine_->fromSectors( sectors_ ); 47 47 return currentMachine_; 48 48 } -
Interface_Web/trunk/pspaWT/sources/controler/include/expandedMachine.h
r493 r495 32 32 33 33 34 void fromSectors( const vector<sector*>& sect , dataManager* dtmg);34 void fromSectors( const vector<sector*>& sect ); 35 35 // computingBlock* openBlock(dataManager* dmg); 36 36 -
Interface_Web/trunk/pspaWT/sources/controler/src/expandedMachine.cc
r493 r495 112 112 113 113 // methode provisoire 114 void expandedMachine::fromSectors( const vector<sector*>& secteurs , dataManager* dtmg)114 void expandedMachine::fromSectors( const vector<sector*>& secteurs ) 115 115 { 116 116 cout << " methode expandedMachine::fromSectors " << endl; … … 128 128 cout << " expandedMachine::fromSectors la machine a " << elements_.size() << " elements " << endl; 129 129 computingBlocks_.clear(); 130 // computingBlocks_.push_back(new computingBlock(elements_,NULL, this));131 130 computingBlocks_.push_back(new computingBlock(0, elements_.size(),NULL, this)); 132 131 } 132 133 133 134 134 bool expandedMachine::openNewLastBlock() { -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_accelerator.h
r493 r495 38 38 void addSector(); 39 39 void readConfiguration(); 40 void expandMachine();40 void expandMachine(); 41 41 void run(); 42 42 void closeGraphicDialog(); -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_machine.h
r493 r495 16 16 class GWt_machine : public WObject 17 17 { 18 18 19 GWt_machine() {;} 20 19 21 public: 20 22 21 GWt_machine(GWt_accelerator*,expandedMachine*);23 GWt_machine(GWt_accelerator*,expandedMachine*); 22 24 virtual ~GWt_machine(); 23 25 void createWidgetComputing(WContainerWidget* parent); -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h
r493 r495 7 7 // 8 8 9 #ifndef GWt_softwarePanel Bis_SEEN10 #define GWt_softwarePanel Bis_SEEN9 #ifndef GWt_softwarePanel_SEEN 10 #define GWt_softwarePanel_SEEN 11 11 12 12 #include <iostream> … … 22 22 class GWt_machine; 23 23 24 class GWt_softwarePanel Bis: public WContainerWidget24 class GWt_softwarePanel : public WContainerWidget 25 25 { 26 26 public : 27 27 28 GWt_softwarePanel Bis(dataManager*, GWt_machine*);29 virtual ~GWt_softwarePanel Bis();28 GWt_softwarePanel(dataManager*, GWt_machine*); 29 virtual ~GWt_softwarePanel(); 30 30 31 31 /** -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_accelerator.cc
r493 r495 17 17 18 18 //- Ouvrir le premier secteur quand il est chargé 19 //- Ajouter les sectionToExecute19 //- Ajouter les computingBlocks 20 20 //- Fixer le addConsoleMessage() 21 21 //- remise a jour des éléments si on on change un bout de section -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_machine.cc
r493 r495 63 63 // add the software panel 64 64 cout << " GWt_machine::createWidgetComputing APPEL sofwarepanel" << endl; 65 GWt_softwarePanel Bis* computeWidget = new GWt_softwarePanelBis(getAccelerator()->getDataManager(),this);65 GWt_softwarePanel* computeWidget = new GWt_softwarePanel(getAccelerator()->getDataManager(),this); 66 66 vContainerLayout->addWidget(computeWidget); 67 67 … … 74 74 } 75 75 76 // void GWt_machine::expandMachine() {77 // cout << " coucou depuis GWt_machine::expandMachine() " << endl;78 // getAccelerator()->getDataManager()->expandMachine();79 // cout << " GWt_machine::createWidgetComputing APPEL sofwarepanel" << endl;80 // computeWidget_ = new GWt_softwarePanelBis(getAccelerator()->getDataManager(),this);81 // vContainerLayout_->addWidget(computeWidget_);82 // } -
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.