Ignore:
Timestamp:
Jan 24, 2013, 3:32:13 PM (11 years ago)
Author:
garnier
Message:

Ameliorations graphiques et re-identation

File:
1 edited

Legend:

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

    r257 r272  
    1313
    1414
    15 GWt_globalParameters::GWt_globalParameters(PspaApplication* ps) 
    16   {
    17 
    18         pspa_ = ps;
     15GWt_globalParameters::GWt_globalParameters(PspaApplication* ps)
     16{
     17   
     18    pspa_ = ps;
    1919    WVBoxLayout* globLayout = new WVBoxLayout();
    2020    decorationStyle().setBackgroundColor (WColor("blue"));
    21     //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 
     21    //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    2222    WContainerWidget *result = new WContainerWidget();
    2323    WPanel *panel = new WPanel(result);
    2424    panel->setTitle(" global parameters ");
    25 
    26 
     25   
     26   
    2727    WText* freqText = new WText("frequency (MHz) : ");
    2828    frequencyEdit_ = new WLineEdit();
    29 
     29   
    3030    WText *stepText = new WText("step in phase (deg.) : ");
    3131    stepEdit_ = new WLineEdit();
    32 
     32   
    3333    WText *nstepMaxText = new WText("max step number : ");
    3434    nstepMAxEdit_ = new WLineEdit();
    35 
     35   
    3636    WText *nscText = new WText("periodicity of s.c. computation : ");
    3737    nscEdit_ = new WLineEdit();
    38 
    39 
    40 
     38   
     39   
     40   
    4141    WContainerWidget* contenu = new WContainerWidget();
    4242    contenu->addWidget(freqText);
     
    5151    contenu->addWidget(nscText);
    5252    contenu->addWidget(nscEdit_);
    53 
    54 
    55 
     53   
     54   
     55   
    5656    panel->setCentralWidget(contenu);
    5757    // panel->setCollapsible(true);
    58 
    59 
     58   
     59   
    6060    //  WPanel *panelModules = new WPanel(result);
    6161    // panelModules->setTitle(" sections of beam Line for executing softwres ");
    62 
    63 
     62   
     63   
    6464    // WPushButton* push_add = new WPushButton("add");
    65 
    66 
     65   
     66   
    6767    // contenuSections_ = new WContainerWidget();
    68 
     68   
    6969    // addSection();
    7070    // contenuSections_->addWidget( push_add);
    71 
    72 
     71   
     72   
    7373    // panelModules->setCentralWidget(contenuSections_);
    74 
    75 
     74   
     75   
    7676    globLayout->addWidget(result);
    77 
     77   
    7878    setLayout(globLayout);
    79       renew();
    80   }
     79    renew();
     80}
    8181
    8282// void GWt_globalParameters::addSection()
     
    105105void GWt_globalParameters::renew()
    106106{
    107   string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString();
    108   if ( param == NULL )
     107    string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString();
     108    if ( param == NULL )
    109109    {
    110       if ( static_cast<GWt_console*> (wApp->findWidget ("console"))) {
    111         GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
    112         console->addConsoleMessage(" GWt_globalParameters : empty parameter set");
    113       }
     110        if ( static_cast<GWt_console*> (wApp->findWidget ("console"))) {
     111            GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
     112            console->addConsoleMessage(" GWt_globalParameters : empty parameter set");
     113        }
    114114    }
    115   int nbparam = atoi(param[0].c_str());
    116   if ( nbparam != 4 )
     115    int nbparam = atoi(param[0].c_str());
     116    if ( nbparam != 4 )
    117117    {
    118       if ( static_cast<GWt_console*> (wApp->findWidget ("console"))) {
    119         GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
    120         console->addConsoleMessage(" GWt_globalParameters : wrong number of parameters");
    121       }
     118        if ( static_cast<GWt_console*> (wApp->findWidget ("console"))) {
     119            GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
     120            console->addConsoleMessage(" GWt_globalParameters : wrong number of parameters");
     121        }
    122122    }
    123   frequencyEdit_->setText(param[1].c_str());
    124   stepEdit_->setText(param[2].c_str());
    125   nstepMAxEdit_->setText(param[3].c_str());
    126   nscEdit_->setText(param[4].c_str());
     123    frequencyEdit_->setText(param[1].c_str());
     124    stepEdit_->setText(param[2].c_str());
     125    nstepMAxEdit_->setText(param[3].c_str());
     126    nscEdit_->setText(param[4].c_str());
    127127}
    128128
    129129void GWt_globalParameters::updateGlobals()
    130   {
     130{
    131131    string envoi[5];
    132132    envoi[0] = string("4");
     
    136136    envoi[4] = nscEdit_->text().toUTF8();
    137137    pspa_->getDataManager()->getGlobalParameters()->setParametersString(envoi);
    138   }
     138}
    139139
    140140// void GWt_globalParameters::getExecute(unsigned index, unsigned& first, unsigned& last, int& programm)
     
    142142//   string debut;
    143143//   string fin;
    144 //   if ( index == 1) 
     144//   if ( index == 1)
    145145//     {
    146146//       debut = origineEdit1_->text().toUTF8();
     
    155155//     }
    156156//   first = atoi ( debut.c_str() );
    157 //   last = atoi ( fin.c_str() ); 
     157//   last = atoi ( fin.c_str() );
    158158//   programm++;
    159      
     159
    160160// }
    161161
Note: See TracChangeset for help on using the changeset viewer.