Changeset 428 in PSPA for Interface_Web/trunk
- Timestamp:
- Nov 4, 2013, 12:21:18 PM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT/sources/userInterface
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_globalParameters.h
r426 r428 33 33 GWt_globalParameters() {;} 34 34 GWt_globalParameters(dataManager*); 35 GWt_globalParameters(dataManager*,WContainerWidget*);36 35 virtual ~GWt_globalParameters() {;} 37 36 … … 40 39 void updateGlobals(); 41 40 void renew(); 42 string* getGlobalParameters();41 void setText(WContainerWidget*); 43 42 }; 44 43 #endif -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_globalParameters.cc
r427 r428 15 15 } 16 16 17 GWt_globalParameters::GWt_globalParameters(dataManager* dt,WContainerWidget* wt)17 void GWt_globalParameters::setText(WContainerWidget* wt) 18 18 { 19 dt_ = dt;20 19 status_ = new WText("Go ahead...",wt); 21 20 } … … 23 22 void GWt_globalParameters::initilializeDialog() 24 23 { 24 dialog_ = new WDialog("global parameters"); 25 25 string* param = dialogBegin(); 26 26 27 dialog_ = new WDialog("global parameters");28 27 new WText("Enter frequency (MHz) : ",dialog_->contents()); 29 28 frequencyEdit_ = new WLineEdit(param[1].c_str(),dialog_->contents()); … … 72 71 envoi_[3] = param[3].c_str(); 73 72 envoi_[4] = param[4].c_str(); 74 setStatus();75 73 return param; 76 74 } … … 78 76 void GWt_globalParameters::dialogDone(WDialog::DialogCode code) 79 77 { 80 if (code == WDialog::Accepted) updateGlobals(); 78 if (code == WDialog::Accepted) { 79 updateGlobals(); 80 setStatus(); 81 } 81 82 return; 82 83 } … … 89 90 envoi_[3] = nstepMAxEdit_->text().toUTF8(); 90 91 envoi_[4] = nscEdit_->text().toUTF8(); 91 92 setStatus();93 92 dt_->getGlobalParameters()->setParametersString(envoi_); 94 93 } … … 97 96 { 98 97 string* param = dialogBegin(); 99 100 frequencyEdit_->setText(param[1].c_str()); 101 stepEdit_->setText(param[2].c_str()); 102 nstepMAxEdit_->setText(param[3].c_str()); 103 nscEdit_->setText(param[4].c_str()); 104 } 105 106 string* GWt_globalParameters::getGlobalParameters() 107 { 108 return envoi_; 98 setStatus(); 99 frequencyEdit_ = new WLineEdit(param[1].c_str()); 100 stepEdit_ = new WLineEdit(param[2].c_str()); 101 nstepMAxEdit_ = new WLineEdit(param[3].c_str()); 102 nscEdit_ = new WLineEdit(param[4].c_str()); 109 103 } 110 104 -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r427 r428 143 143 // xx mainGridLayout->addWidget(globalParam_,3,1); 144 144 145 globalParam_ = new GWt_globalParameters(dtmanage_); 145 146 WWidget* dboard = createDashBoard(); 146 147 dboard->setMinimumSize(300,100); … … 187 188 textdiv = new WContainerWidget(); 188 189 textdiv->setStyleClass("text"); 189 190 globalParam_ = new GWt_globalParameters(dtmanage_,textdiv); 190 globalParam_->setText(textdiv); 191 191 192 192 WContainerWidget *cnt = new WContainerWidget(); … … 396 396 } 397 397 398 399 398 void PspaApplication::dialogSaveDone(WDialog::DialogCode code) 400 399 { 401 if ( code != Wt::WDialog::Accepted ) { 402 return; 403 } 404 nameOfCase_ = saveNameEdit_->text().toUTF8(); 405 delete dialogSave_; 406 dialogSave_ = NULL; 407 408 GWt_globalParameters* bibi = static_cast<GWt_globalParameters*>(globalParam_); 409 bibi->updateGlobals(); 410 411 // dtmanage_->saveConfiguration(nameOfCase_); 412 dtmanage_->saveConfiguration(sessionId(),nameOfCase_); 413 414 // en test: j'ajoute la sauvegarde sur .aml 415 dtmanage_->writeToAMLFile(nameOfCase_); 416 } 417 400 if ( code != Wt::WDialog::Accepted ) { 401 return; 402 } 403 nameOfCase_ = saveNameEdit_->text().toUTF8(); 404 delete dialogSave_; 405 dialogSave_ = NULL; 406 407 globalParam_->updateGlobals(); 408 409 // dtmanage_->saveConfiguration(nameOfCase_); 410 dtmanage_->saveConfiguration(sessionId(),nameOfCase_); 411 412 // en test: j'ajoute la sauvegarde sur .aml 413 dtmanage_->writeToAMLFile(nameOfCase_); 414 } 418 415 419 416 void PspaApplication::restaurer() … … 432 429 if (nameOfCase_ == "") 433 430 return; 434 cout << " jerestaure le fichier " << fileName << endl;431 cout << " PspaApplication:: restaure le fichier " << fileName << endl; 435 432 dialogSave_ = NULL; 436 433 … … 445 442 } 446 443 447 GWt_globalParameters* bibi = static_cast<GWt_globalParameters*>(globalParam_); 448 bibi->renew(); 449 444 globalParam_->renew(); 450 445 console_->addConsoleMessage(string("restauration terminee \n")); 451 446 }
Note: See TracChangeset
for help on using the changeset viewer.