Changeset 272 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_globalParameters.cc
- Timestamp:
- Jan 24, 2013, 3:32:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_globalParameters.cc
r257 r272 13 13 14 14 15 GWt_globalParameters::GWt_globalParameters(PspaApplication* ps) 16 17 18 15 GWt_globalParameters::GWt_globalParameters(PspaApplication* ps) 16 { 17 18 pspa_ = ps; 19 19 WVBoxLayout* globLayout = new WVBoxLayout(); 20 20 decorationStyle().setBackgroundColor (WColor("blue")); 21 //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 21 //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 22 22 WContainerWidget *result = new WContainerWidget(); 23 23 WPanel *panel = new WPanel(result); 24 24 panel->setTitle(" global parameters "); 25 26 25 26 27 27 WText* freqText = new WText("frequency (MHz) : "); 28 28 frequencyEdit_ = new WLineEdit(); 29 29 30 30 WText *stepText = new WText("step in phase (deg.) : "); 31 31 stepEdit_ = new WLineEdit(); 32 32 33 33 WText *nstepMaxText = new WText("max step number : "); 34 34 nstepMAxEdit_ = new WLineEdit(); 35 35 36 36 WText *nscText = new WText("periodicity of s.c. computation : "); 37 37 nscEdit_ = new WLineEdit(); 38 39 40 38 39 40 41 41 WContainerWidget* contenu = new WContainerWidget(); 42 42 contenu->addWidget(freqText); … … 51 51 contenu->addWidget(nscText); 52 52 contenu->addWidget(nscEdit_); 53 54 55 53 54 55 56 56 panel->setCentralWidget(contenu); 57 57 // panel->setCollapsible(true); 58 59 58 59 60 60 // WPanel *panelModules = new WPanel(result); 61 61 // panelModules->setTitle(" sections of beam Line for executing softwres "); 62 63 62 63 64 64 // WPushButton* push_add = new WPushButton("add"); 65 66 65 66 67 67 // contenuSections_ = new WContainerWidget(); 68 68 69 69 // addSection(); 70 70 // contenuSections_->addWidget( push_add); 71 72 71 72 73 73 // panelModules->setCentralWidget(contenuSections_); 74 75 74 75 76 76 globLayout->addWidget(result); 77 77 78 78 setLayout(globLayout); 79 80 79 renew(); 80 } 81 81 82 82 // void GWt_globalParameters::addSection() … … 105 105 void GWt_globalParameters::renew() 106 106 { 107 string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString();108 if ( param == NULL )107 string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString(); 108 if ( param == NULL ) 109 109 { 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 } 114 114 } 115 int nbparam = atoi(param[0].c_str());116 if ( nbparam != 4 )115 int nbparam = atoi(param[0].c_str()); 116 if ( nbparam != 4 ) 117 117 { 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 } 122 122 } 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()); 127 127 } 128 128 129 129 void GWt_globalParameters::updateGlobals() 130 130 { 131 131 string envoi[5]; 132 132 envoi[0] = string("4"); … … 136 136 envoi[4] = nscEdit_->text().toUTF8(); 137 137 pspa_->getDataManager()->getGlobalParameters()->setParametersString(envoi); 138 138 } 139 139 140 140 // void GWt_globalParameters::getExecute(unsigned index, unsigned& first, unsigned& last, int& programm) … … 142 142 // string debut; 143 143 // string fin; 144 // if ( index == 1) 144 // if ( index == 1) 145 145 // { 146 146 // debut = origineEdit1_->text().toUTF8(); … … 155 155 // } 156 156 // first = atoi ( debut.c_str() ); 157 // last = atoi ( fin.c_str() ); 157 // last = atoi ( fin.c_str() ); 158 158 // programm++; 159 159 160 160 // } 161 161
Note: See TracChangeset
for help on using the changeset viewer.