Ignore:
Timestamp:
Mar 27, 2013, 5:47:22 PM (11 years ago)
Author:
garnier
Message:

merge avec la branche 12_03_12-managerComboBox

Location:
Interface_Web/trunk/pspaWT
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT

  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc

    r379 r401  
    99#include "GWt_soleno.h"
    1010#include "GWt_bend.h"
     11#include "nomDeLogiciel.h"
    1112
    1213#include "mixedTools.h"
     
    2425  ligneFaisceauLayout_ = new WHBoxLayout();
    2526  //  decorationStyle().setBackgroundColor (WColor(245,245,245));
    26   setLayout(ligneFaisceauLayout_);
    2727  ligneFaisceauLayout_->setContentsMargins(0,0,0,0);
    2828  ligneFaisceauLayout_->setSpacing(0);
    2929 
     30  setLayout(ligneFaisceauLayout_);
     31
    3032  // set the object name
    31   setObjectName("ligneFaisceau"); 
     33  setObjectName("ligneFaisceau");
    3234  clear();
    3335}
     
    157159  }
    158160 
    159   pspa_->getExecuteWidget()->updateSelections();
     161  pspa_->getExecuteWidget()->updateSections();
    160162}
    161163
     
    203205    }
    204206   
    205     // first if 1
    206     //    i--;
    207207    for (int a=0; a< ligneFaisceauLayout_->count(); a++) {
    208208        if (ligneFaisceauLayout_->itemAt(a)) {
     
    222222
    223223
     224int GWt_LigneFaisceau::getAbstractElementIndexFromLabel(std::string txt){
     225    int index = 0;
     226    if (txt == "") {
     227        return NULL;
     228    }
     229   
     230    for (int a=0; a< ligneFaisceauLayout_->count(); a++) {
     231        if (ligneFaisceauLayout_->itemAt(a)) {
     232           
     233            if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) {
     234                if (elem->getGWt_AbstractElement()) {
     235                    if (elem->getGWt_AbstractElement()->getAbstractElement()->getLabel() == txt) {
     236                        return index;
     237                    }
     238                }
     239                index ++;
     240            }
     241        }
     242    }
     243    return NULL;
     244   
     245}
     246
     247
    224248int GWt_LigneFaisceau::getBeamLineSize() {
    225249  int count = 0;
     
    260284}
    261285
     286
     287void GWt_LigneFaisceau::initializeSoftwares(){
     288   
     289  vector <abstractElement*> elems = getAllAbstractElements();
     290    for (int a=0; a< elems.size(); a++) {
     291        elems[a]->setSoftware(nomDeLogiciel::unknownSoftware);
     292    }
     293}
     294
     295
Note: See TracChangeset for help on using the changeset viewer.