Changeset 284 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src
- Timestamp:
- Jan 25, 2013, 2:54:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc
r282 r284 62 62 unsigned int k; 63 63 64 // add first dropZone65 ligneFaisceauLayout_->addWidget(new GWt_elementLigneFaisceau());66 67 64 for(k = 0; k < (unsigned)nbElem; k++) 68 65 { 69 66 abstractElement* ptr = pspa_->getDataManager()->getCollection()->getElementPointerFromIndex(k); 70 /*GWt_abstractElement* gw = GWt_abstractElement::ajoute(ptr);67 GWt_abstractElement* gw = GWt_abstractElement::ajoute(ptr); 71 68 if(gw == NULL) { 72 cerr << "GWt_LigneFaisceau::restaure element type " << ptr->getNomdElement().getElementName() << " est inconnu " << endl; 69 /* 70 GWt_dialog warningDialog("PSPA : restore configuration", " Element type "+ptr->getNomdElement().getElementName()+" not reconized", GWt_dialog::Error,true,true); 71 warningDialog.exec(); 72 */ 73 73 } 74 74 gw->setLabelWidget(); 75 */75 76 76 nObjets_[ptr->getNomdElement().getElementType()].incr(); 77 GWt_elementLigneFaisceau* dropZone = new GWt_elementLigneFaisceau(ptr);78 77 79 /* dropZone->addElement(gw->getWidget()); 80 */ 81 ligneFaisceauLayout_->addWidget(dropZone,0); 78 ligneFaisceauLayout_->addWidget(new GWt_elementLigneFaisceau(ptr),1); 82 79 83 80 … … 89 86 */ 90 87 } 88 manageLineFaisceauLayout(); 91 89 92 90 pspa_->updateSelections(); … … 132 130 index = a+1; 133 131 } 134 // printf("ELEM : %s â°d\n",elem->getElementName()->text().toUTF8 ().c_str() , a);135 } else {136 printf("NOT an elem %d\n",a);137 132 } 138 133 … … 145 140 } 146 141 } 142 manageLineFaisceauLayout(); 143 144 } 145 146 147 void GWt_LigneFaisceau::manageLineFaisceauLayout() { 147 148 // special : hide/setVisible arrow : 148 149 for (int a=0; a< ligneFaisceauLayout_->count(); a++) { 149 150 GWt_elementLigneFaisceau* elem = static_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ()); 150 151 if (elem) { 151 printf("ELEM : %s n",elem->getElementName()->text().toUTF8 ().c_str());152 152 if ((a == 0) && (a == (ligneFaisceauLayout_->count()-1))) { 153 153 elem->getDropZoneLeft()->setStyleClass("elementLigneFaiseau_transparent"); 154 154 elem->getDropZoneRight()->setStyleClass("elementLigneFaiseau_transparent"); 155 155 elem->getDropZoneLeft()->widget(0)->setHidden(true); 156 printf(" - ------ -------\n");156 printf(" - - %d\n",a); 157 157 } else if (a == 0){ 158 158 elem->getDropZoneLeft()->setStyleClass("elementLigneFaiseau_transparent"); 159 159 elem->getDropZoneRight()->setStyleClass("elementLigneFaiseau_line"); 160 160 elem->getDropZoneLeft()->widget(0)->setHidden(true); 161 printf(" - ------ DROIT\n");161 printf(" - D %d\n",a); 162 162 } else if (a == (ligneFaisceauLayout_->count()-1)){ 163 163 elem->getDropZoneLeft()->setStyleClass("elementLigneFaiseau_line"); 164 164 elem->getDropZoneRight()->setStyleClass("elementLigneFaiseau_transparent"); 165 165 elem->getDropZoneLeft()->widget(0)->setHidden(false); 166 printf(" GAUCHE -----\n");167 166 167 printf(" L - %d\n",a); 168 168 } else { 169 169 elem->getDropZoneLeft()->setStyleClass("elementLigneFaiseau_line"); 170 170 elem->getDropZoneRight()->setStyleClass("elementLigneFaiseau_line"); 171 171 elem->getDropZoneLeft()->widget(0)->setHidden(false); 172 printf(" GAUCHE DROIT\n");172 printf(" L D %d\n",a); 173 173 } 174 174 }
Note: See TracChangeset
for help on using the changeset viewer.