Ignore:
Timestamp:
Nov 15, 2013, 3:30:50 PM (11 years ago)
Author:
touze
Message:

systeme periodique (mailles) + multipoles + madx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc

    r407 r431  
    1616softwarePanel(sPanel)
    1717{
    18     Wt::WGridLayout* mainContainerLayout = new Wt::WGridLayout();
    19     mainContainerLayout->setContentsMargins(0,0,0,0);
     18  Wt::WGridLayout* mainContainerLayout = new Wt::WGridLayout();
     19  mainContainerLayout->setContentsMargins(0,0,0,0);
    2020
    21     Wt::WContainerWidget* labelAndComboContainer = new Wt::WContainerWidget();
    22     Wt::WVBoxLayout* labelAndComboContainerLayout = new Wt::WVBoxLayout();
    23     labelAndComboContainerLayout->setContentsMargins(0,0,0,0);
     21  Wt::WContainerWidget* labelAndComboContainer = new Wt::WContainerWidget();
     22  Wt::WVBoxLayout* labelAndComboContainerLayout = new Wt::WVBoxLayout();
     23  labelAndComboContainerLayout->setContentsMargins(0,0,0,0);
    2424
    25     Wt::WContainerWidget* labelAndComboInsideContainer = new Wt::WContainerWidget();
    26     Wt::WHBoxLayout* labelAndComboInsideContainerLayout = new Wt::WHBoxLayout();
    27     labelAndComboInsideContainerLayout->setContentsMargins(0,0,0,0);
    28    
    29     labelAndComboInsideContainerLayout->addWidget(new Wt::WText("from : "));
    30     labelAndComboInsideContainerLayout->addWidget(first);
    31     labelAndComboInsideContainerLayout->addWidget(new Wt::WText("to : "));
    32     labelAndComboInsideContainerLayout->addWidget(last);
    33     labelAndComboInsideContainerLayout->addWidget(soft);
     25  Wt::WContainerWidget* labelAndComboInsideContainer = new Wt::WContainerWidget();
     26  Wt::WHBoxLayout* labelAndComboInsideContainerLayout = new Wt::WHBoxLayout();
     27  labelAndComboInsideContainerLayout->setContentsMargins(0,0,0,0);
     28 
     29  labelAndComboInsideContainerLayout->addWidget(new Wt::WText("from : "));
     30  labelAndComboInsideContainerLayout->addWidget(first);
     31  labelAndComboInsideContainerLayout->addWidget(new Wt::WText("to : "));
     32  labelAndComboInsideContainerLayout->addWidget(last);
     33  labelAndComboInsideContainerLayout->addWidget(soft);
     34 
     35    // add buttons
     36  labelAndComboInsideContainerLayout->addWidget(buttonPanel);
     37  labelAndComboInsideContainer->setLayout(labelAndComboInsideContainerLayout);
     38  labelAndComboContainerLayout->addWidget(labelAndComboInsideContainer);
     39  labelAndComboContainerLayout->addStretch (10);
     40  labelAndComboContainer->setLayout(labelAndComboContainerLayout);
     41 
     42  // add errors and warning layout
     43  warningsContainer_ = new Wt::WContainerWidget();
     44  errorsContainer_ = new Wt::WContainerWidget();
     45 
     46  Wt::WContainerWidget* warningsAndErrorsContainer = new Wt::WContainerWidget();
     47  Wt::WVBoxLayout* vWarningsAndErrorsLayoutContainer = new Wt::WVBoxLayout();
     48 
     49  Wt::WHBoxLayout* hLayoutContainerWarnings = new Wt::WHBoxLayout();
     50  Wt::WHBoxLayout* hLayoutContainerErrors = new Wt::WHBoxLayout();
     51 
     52 
     53  warningsLabel_ = new Wt::WText("",XHTMLText);
     54  errorsLabel_ = new Wt::WText("",XHTMLText);
     55  hLayoutContainerWarnings->addWidget(warningsLabel_);
     56  hLayoutContainerErrors->addWidget(errorsLabel_);
    3457
    35     // add buttons
    36     labelAndComboInsideContainerLayout->addWidget(buttonPanel);
    37 
    38     labelAndComboInsideContainer->setLayout(labelAndComboInsideContainerLayout);
    39 
    40     labelAndComboContainerLayout->addWidget(labelAndComboInsideContainer);
    41     labelAndComboContainerLayout->addStretch (10);
    42    
    43     labelAndComboContainer->setLayout(labelAndComboContainerLayout);
    44    
    45            
    46     // add errors and warning layout
    47     warningsContainer_ = new Wt::WContainerWidget();
    48     errorsContainer_ = new Wt::WContainerWidget();
    49 
    50     Wt::WContainerWidget* warningsAndErrorsContainer = new Wt::WContainerWidget();
    51     Wt::WVBoxLayout* vWarningsAndErrorsLayoutContainer = new Wt::WVBoxLayout();
    52    
    53     Wt::WHBoxLayout* hLayoutContainerWarnings = new Wt::WHBoxLayout();
    54     Wt::WHBoxLayout* hLayoutContainerErrors = new Wt::WHBoxLayout();
    55 
    56    
    57     warningsLabel_ = new Wt::WText("",XHTMLText);
    58     errorsLabel_ = new Wt::WText("",XHTMLText);
    59     hLayoutContainerWarnings->addWidget(warningsLabel_);
    60     hLayoutContainerErrors->addWidget(errorsLabel_);
    61 
    62     warningsAndErrorsContainer->addWidget(warningsLabel_);
    63     warningsAndErrorsContainer->addWidget(errorsLabel_);
    64    
    65    
    66     // set Layouts
    67     warningsContainer_->setLayout(hLayoutContainerWarnings);
    68     errorsContainer_->setLayout(hLayoutContainerErrors);
    69    
    70     vWarningsAndErrorsLayoutContainer->addWidget(errorsContainer_);
    71     vWarningsAndErrorsLayoutContainer->addWidget(warningsContainer_);
    72     vWarningsAndErrorsLayoutContainer->addStretch (100);
    73 
    74     warningsAndErrorsContainer->setLayout(vWarningsAndErrorsLayoutContainer);
    75 
    76     // add label and Combo containers
    77     mainContainerLayout->addWidget(labelAndComboContainer,0,0);
    78     // add warnings and errors containers
    79     mainContainerLayout->addWidget(warningsAndErrorsContainer,1,0);
    80 
    81     // manage margins
    82     vWarningsAndErrorsLayoutContainer->setContentsMargins(20,0,0,0);
    83     hLayoutContainerWarnings->setContentsMargins(0,0,0,0);
    84     hLayoutContainerErrors->setContentsMargins(0,0,0,0);
    85 
    86     setLayout(mainContainerLayout);
    87     warningsContainer_->setStyleClass("warningsContainer");
    88     errorsContainer_->setStyleClass("errorsContainer");
    89 
    90     // resize combo
    91     firstElement->setMinimumSize(80,12);
    92     lastElement->setMinimumSize(80,12);
    93     software->setMinimumSize(80,12);
    94        
    95     firstElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
    96     lastElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
    97     software->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
    98 
    99     manageWarningsAndErrors();
     58  warningsAndErrorsContainer->addWidget(warningsLabel_);
     59  warningsAndErrorsContainer->addWidget(errorsLabel_);
     60 
     61 
     62  // set Layouts
     63  warningsContainer_->setLayout(hLayoutContainerWarnings);
     64  errorsContainer_->setLayout(hLayoutContainerErrors);
     65 
     66  vWarningsAndErrorsLayoutContainer->addWidget(errorsContainer_);
     67  vWarningsAndErrorsLayoutContainer->addWidget(warningsContainer_);
     68  vWarningsAndErrorsLayoutContainer->addStretch (100);
     69 
     70  warningsAndErrorsContainer->setLayout(vWarningsAndErrorsLayoutContainer);
     71 
     72  // add label and Combo containers
     73  mainContainerLayout->addWidget(labelAndComboContainer,0,0);
     74  // add warnings and errors containers
     75  mainContainerLayout->addWidget(warningsAndErrorsContainer,1,0);
     76 
     77  // manage margins
     78  vWarningsAndErrorsLayoutContainer->setContentsMargins(20,0,0,0);
     79  hLayoutContainerWarnings->setContentsMargins(0,0,0,0);
     80  hLayoutContainerErrors->setContentsMargins(0,0,0,0);
     81 
     82  setLayout(mainContainerLayout);
     83  warningsContainer_->setStyleClass("warningsContainer");
     84  errorsContainer_->setStyleClass("errorsContainer");
     85 
     86  // resize combo
     87  firstElement->setMinimumSize(80,12);
     88  lastElement->setMinimumSize(80,12);
     89  software->setMinimumSize(80,12);
     90 
     91  firstElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
     92  lastElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
     93  software->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
     94 
     95  manageWarningsAndErrors();
    10096}
    10197
Note: See TracChangeset for help on using the changeset viewer.