Changeset 340 in PSPA for Interface_Web
- Timestamp:
- Feb 20, 2013, 5:13:37 PM (12 years ago)
- Location:
- Interface_Web/trunk/pspaWT/sources/userInterface
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h
r336 r340 41 41 GWt_LigneFaisceau* beamLine_; 42 42 43 // WContainerWidget* console_;44 43 WWidget* globalParam_; 45 // WContainerWidget* leDessin_;46 44 GWt_dialog* graphicsDialog_; 47 45 WButtonGroup *group_; 48 46 vector<GWt_dialog*> eDialog_; 47 49 48 WText* probleme_; 50 49 WComboBox* choixElementDessin_; 51 50 WComboBox* choixTypeDessinFaisceau_; 52 53 51 WComboBox* choixAbsPhase_; 52 WComboBox* choixOrdPhase_; 54 53 WComboBox* choixEnveloppeDessin_; 55 54 WComboBox* choixHistoDessin_; … … 79 78 80 79 void dialogOnGraphics(); 81 80 void faireDessinParmela(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd ); 82 81 void faireDessinTransport(WContainerWidget* toto, particleBeam* beam); 83 82 void faireDessinEnveloppe(WContainerWidget* toto, string type); … … 85 84 86 85 bool removeExtensionFromConfigName(string& config); 87 86 88 87 void dessiner(); 89 88 void dessinerEnveloppe(); … … 91 90 void dessinerHistogramme(); 92 91 93 92 public : 94 93 95 94 PspaApplication(const WEnvironment& env); 96 97 95 98 96 string getSelection(); 99 97 void faireDessin(); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r339 r340 297 297 { 298 298 cout << " close graphicsDialog_" << endl; 299 for(unsigned i = 0; i < eDialog_.size(); i++) eDialog_[i]->done(WDialog::Rejected); 300 eDialog_.clear(); 299 301 graphicsDialog_->done(WDialog::Rejected); 300 302 } … … 518 520 519 521 GWt_dialog* envDialog = new GWt_dialog("enveloppe",toto,false); 522 eDialog_.push_back(envDialog); 520 523 envDialog->setMinimumSize(400,400); 521 524 envDialog->setClosable(true); … … 534 537 { 535 538 cout << " faireDessinParmela " << endl; 536 GWt_dialog* pointsDialog = new GWt_dialog("space phase",toto,false); 537 pointsDialog->setMinimumSize(400,400); 538 pointsDialog->setClosable(true); 539 // pointsDialog->show(); 540 539 GWt_dialog* pointsDialog = new GWt_dialog("space phase",toto,false); 540 eDialog_.push_back(pointsDialog); 541 pointsDialog->setMinimumSize(400,400); 542 pointsDialog->setClosable(true); 543 // pointsDialog->show(); 544 541 545 542 546 … … 647 651 } 648 652 649 650 // void PspaApplication::addElemToGlobals()651 // {652 // static_cast<GWt_globalParameters*>(globalParam_)->addElem();653 // }654 655 653 void PspaApplication::faireDessinTransport(WContainerWidget* toto, particleBeam* beam) 656 654 { 657 // WContainerWidget* toto = static_cast<WContainerWidget*>(leDessin_); 658 // toto->clear(); 659 660 // new WText(nameOfCase_ + " : espace de phase x,x' "+ " nb partic. "+ mixedTools::intToString(partic.size()), toto); 661 662 GWt_dialog* ellipseDialog = new GWt_dialog("ellipse",toto,false); 663 ellipseDialog->setMinimumSize(400,400); 664 ellipseDialog->setClosable(true); 665 ellipseDialog->show(); 666 667 668 new WText(nameOfCase_ + " : emittance x,x' " + mixedTools::doubleToString(beam->getUnnormalizedEmittanceX()) + " pi.mm.mrad" , ellipseDialog->contents()); 669 new WBreak(ellipseDialog->contents()); 670 new WText(" xmax = " + mixedTools::doubleToString(beam->getSigmaTransportij(1,1)) + " cm ", ellipseDialog->contents()); 671 new WBreak(ellipseDialog->contents()); 672 new WText(" x' max = " + mixedTools::doubleToString(beam->getSigmaTransportij(2,2)) + " mrad ", ellipseDialog->contents()); 673 new WBreak(ellipseDialog->contents()); 674 new WText(" corr. 12 = " + mixedTools::doubleToString(beam->getSigmaTransportij(2,1)) + " sqrt(cm.rad) ", ellipseDialog->contents()); 675 676 vector<double> xcor; 677 vector<double> ycor; 678 // dtmanage_->getCurrentBeam()->donneesDessinEllipseXxp(xcor,ycor); 679 beam->donneesDessinEllipseXxp(xcor,ycor); 680 scatterPlot1D(ellipseDialog->contents(),xcor,ycor); 681 655 GWt_dialog* ellipseDialog = new GWt_dialog("ellipse",toto,false); 656 eDialog_.push_back(ellipseDialog); 657 ellipseDialog->setMinimumSize(400,400); 658 ellipseDialog->setClosable(true); 659 ellipseDialog->show(); 660 661 new WText(nameOfCase_ + " : emittance x,x' " + mixedTools::doubleToString(beam->getUnnormalizedEmittanceX()) + " pi.mm.mrad" , ellipseDialog->contents()); 662 new WBreak(ellipseDialog->contents()); 663 new WText(" xmax = " + mixedTools::doubleToString(beam->getSigmaTransportij(1,1)) + " cm ", ellipseDialog->contents()); 664 new WBreak(ellipseDialog->contents()); 665 new WText(" x' max = " + mixedTools::doubleToString(beam->getSigmaTransportij(2,2)) + " mrad ", ellipseDialog->contents()); 666 new WBreak(ellipseDialog->contents()); 667 new WText(" corr. 12 = " + mixedTools::doubleToString(beam->getSigmaTransportij(2,1)) + " sqrt(cm.rad) ", ellipseDialog->contents()); 668 669 vector<double> xcor; 670 vector<double> ycor; 671 // dtmanage_->getCurrentBeam()->donneesDessinEllipseXxp(xcor,ycor); 672 beam->donneesDessinEllipseXxp(xcor,ycor); 673 scatterPlot1D(ellipseDialog->contents(),xcor,ycor); 682 674 } 683 675 … … 861 853 // pour mon test : histo en energie 862 854 toto_->clear(); 863 864 GWt_dialog* pourVoir= new GWt_dialog("histogramme",toto_,false); 865 pourVoir->setMinimumSize(400,400); 866 pourVoir->setClosable(true); 867 pourVoir->show(); 855 856 GWt_dialog* histoDialog = new GWt_dialog("histogramme",toto_,false); 857 eDialog_.push_back(histoDialog); 858 histoDialog->setMinimumSize(400,400); 859 histoDialog->setClosable(true); 860 histoDialog->show(); 868 861 869 862 int index = choixHistoDessin_->currentIndex(); … … 889 882 cout<<"xcor.size()= "<<xcor.size()<<", hist.size()= "<<hist.size()<<endl; 890 883 ////////////////////////////////////////////////////////////////////////////////// 891 892 WContainerWidget *w = toto_;884 885 WContainerWidget *w= histoDialog->contents(); 893 886 int nbpts= xcor.size()+cnts+1; 894 887 WStandardItemModel *model = new WStandardItemModel(nbpts,2,w);
Note: See TracChangeset
for help on using the changeset viewer.