#ifndef LIGNEFAISCEAU_SEEN #define LIGNEFAISCEAU_SEEN #include "dataManager.h" #include "nomdElements.h" #include "GWt_pspaApplication.h" #include "GWt_abstractElement.h" #include #include #include #include using namespace Wt; class GWt_dropZoneLigneFaisceau; class compteur { int n_; public : compteur() {n_= 0;} int incr() {return ++n_;} }; class GWt_LigneFaisceau : public WContainerWidget { WHBoxLayout* ligneFaisceauLayout_; PspaApplication* pspa_; public : GWt_LigneFaisceau() {;} GWt_LigneFaisceau(PspaApplication*); /** Add an element at a position inside the beam line. @param eType : type of element @param dropContainer : origin of the drop event - Special case, when first element is created, we add a drop zone at the end and beginning of the drop zone and we center everything */ GWt_abstractElement* addElement(typedElement eType, GWt_dropZoneLigneFaisceau* dropContainer); GWt_abstractElement* addElement(typedElement eType); void removeElement(GWt_abstractElement*); ~GWt_LigneFaisceau() {;} /** return the abstract element at a position @param : position in the beam line */ abstractElement* getAbstractElement(int i); /** return the index of the abstract element @param : label of this abstractElement in the beam line */ int getAbstractElementIndexFromLabel(std::string str); // void restoreElementCollectionFromDataManager(); void clickEvent(WContainerWidget*); void deleteElement(WContainerWidget*); int getBeamLineSize(); /** remove all elements from beam line */ void clear(); /** Return a vector contains all abstract elements in the beam line */ vector getAllAbstractElements(); void update(); /** update the status of the given index element */ void update(int); void initializeSoftwares(); private : void manageLineFaisceauLayout(); GWt_dropZoneLigneFaisceau* allDropZone_; }; #endif