Changeset 385 in PSPA for Interface_Web
- Timestamp:
- Mar 12, 2013, 12:37:20 PM (11 years ago)
- Location:
- Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/controler/include/dataManager.h
r381 r385 30 30 particleBeam* getDiagnosticBeam(unsigned index); 31 31 32 void addSectionToExecute( int debut, int fin, nomDeLogicielprog);32 void addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, abstractSoftware* prog); 33 33 34 34 abstractElement* addElement(typedElement elemType); … … 64 64 bool restoreElements(string inputFileName); 65 65 66 abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi); 66 67 67 68 … … 79 80 void removeFile(string nameOfFile); 80 81 void clearSectionToExecute(); 81 abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi);82 82 83 83 }; -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/controler/include/sectionToExecute.h
r312 r385 3 3 4 4 #include "nomDeLogiciel.h" 5 #include "abstractElement.h" 6 #include "abstractSoftware.h" 5 7 6 typedef struct 8 class sectionToExecute 7 9 { 8 unsigned firstElement; // numero premier element 9 unsigned lastElement; // numero dernier element 10 nomDeLogiciel software; 11 } sectionToExecute; 10 public : 11 sectionToExecute(abstractElement*, abstractElement*, abstractSoftware*); 12 13 /** Deprecated : To be removed ! */ 14 sectionToExecute(abstractElement*, int, abstractElement*, int, abstractSoftware*); 15 ~sectionToExecute() {;} 16 17 inline abstractElement* getFirstElement() { 18 return firstElement; 19 } 20 21 inline abstractElement* getLastElement() { 22 return lastElement; 23 } 24 25 /** Deprecated : To be removed ! */ 26 inline int getFirstElementNumberInBeamLine() { 27 return firstElementNumberInBeamLine; 28 } 29 30 /** Deprecated : To be removed ! */ 31 inline int getLastElementNumberInBeamLine() { 32 return lastElementNumberInBeamLine; 33 } 34 inline abstractSoftware* getSoftware() { 35 return software; 36 } 37 38 private : 39 abstractElement* firstElement; 40 abstractElement* lastElement; 41 42 int firstElementNumberInBeamLine; 43 int lastElementNumberInBeamLine; 44 45 abstractSoftware* software; 46 }; 12 47 13 48 #endif -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/controler/src/dataManager.cc
r381 r385 64 64 } 65 65 66 void dataManager::addSectionToExecute(int debut, int fin, nomDeLogiciel prog) 67 { 68 jobList_.push_back(new sectionToExecute); 69 jobList_.back()->firstElement = debut; 70 jobList_.back()->lastElement = fin; 71 jobList_.back()->software = prog; 66 void dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, abstractSoftware* prog) 67 { 68 jobList_.push_back(new sectionToExecute(debut, debutIndex, fin, finIndex, prog)); 72 69 } 73 70 … … 122 119 for(unsigned k = 0; k < jobList_.size(); k++) 123 120 { 124 cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]-> software).getString() << endl;125 126 int debut = jobList_[k]-> firstElement;127 int fin = jobList_[k]-> lastElement;128 softw = createSoftwareConnexion(jobList_[k]->software);121 cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->getSoftware()->getName()) << endl; 122 123 int debut = jobList_[k]->getFirstElementNumberInBeamLine(); 124 int fin = jobList_[k]->getLastElementNumberInBeamLine(); 125 softw = jobList_[k]->getSoftware(); 129 126 130 127 if (softw == NULL) { -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h
r379 r385 54 54 */ 55 55 abstractElement* getAbstractElement(int i); 56 57 /** return the index of the abstract element 58 @param : label of this abstractElement in the beam line 59 */ 60 int getAbstractElementIndexFromLabel(std::string str); 61 56 62 // void restoreElementCollectionFromDataManager(); 57 63 void clickEvent(WContainerWidget*); -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_dialog.cc
r336 r385 24 24 hLayout->addWidget(wc); 25 25 widgt->setLayout(hLayout); 26 27 setClosable(true); 28 setModal (modal); 29 show(); 26 30 } 27 28 setClosable(true);29 setModal (modal);30 31 } 31 32 -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc
r379 r385 203 203 } 204 204 205 // first if 1206 // i--;207 205 for (int a=0; a< ligneFaisceauLayout_->count(); a++) { 208 206 if (ligneFaisceauLayout_->itemAt(a)) { … … 222 220 223 221 222 int GWt_LigneFaisceau::getAbstractElementIndexFromLabel(std::string txt){ 223 int index = 0; 224 if (txt == "") { 225 return NULL; 226 } 227 228 for (int a=0; a< ligneFaisceauLayout_->count(); a++) { 229 if (ligneFaisceauLayout_->itemAt(a)) { 230 231 if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) { 232 if (elem->getGWt_AbstractElement()) { 233 if (elem->getGWt_AbstractElement()->getAbstractElement()->getLabel() == txt) { 234 return index; 235 } 236 } 237 index ++; 238 } 239 } 240 } 241 return NULL; 242 243 } 244 245 224 246 int GWt_LigneFaisceau::getBeamLineSize() { 225 247 int count = 0; -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r371 r385 275 275 string finString = (*itr)->fin->text().toUTF8(); 276 276 277 int debut = dtmanage_->getNumeroFromElementLabel(debString); 278 int fin = dtmanage_->getNumeroFromElementLabel(finString); 277 int debut = pspa_->getBeamLine()->getAbstractElementIndexFromLabel(debString)+1; // FIXME : Should NOT be +1 278 int fin = pspa_->getBeamLine()->getAbstractElementIndexFromLabel(finString)+1; // FIXME : Should NOT be +1 279 279 280 nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() ); 280 dtmanage_->addSectionToExecute(debut,fin,prog); 281 dtmanage_->addSectionToExecute(pspa_->getBeamLine()->getAbstractElement(debut), 282 debut, 283 pspa_->getBeamLine()->getAbstractElement(fin), 284 fin, 285 dtmanage_->createSoftwareConnexion(prog)); 281 286 282 287 // check sections … … 337 342 (*selectedSections_.begin())->fin->setText(dernierText); 338 343 } 339 340 cout << "PspaApplication::updateSelections(): " << premierText << " ââ " << dernierText << endl;341 344 } 342 345
Note: See TracChangeset
for help on using the changeset viewer.