Ignore:
Timestamp:
Mar 12, 2013, 1:54:41 PM (11 years ago)
Author:
lemeur
Message:

amélioration fiabilité graphique

File:
1 edited

Legend:

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

    r381 r386  
    500500  for(int i = 1; i <= nombre; i++) {
    501501    abstractElement* elPtr = dtmanage_->getElementPointerFromNumero(i);
    502     if(elPtr->getNomdElement().getElementType() == snapshot) continue;
     502    //    if(elPtr->getNomdElement().getElementType() == snapshot) continue;
    503503
    504504    choixElementDessin_->addItem(elPtr->getLabel());
     
    511511   
    512512  int typeFaisceau = choixTypeDessinFaisceau_->currentIndex();
    513   int index = choixElementDessin_->currentIndex();
     513  //  int index = choixElementDessin_->currentIndex();
    514514  string nameAbs = choixAbsPhase_->currentText().toUTF8();
    515515  string nameOrd = choixOrdPhase_->currentText().toUTF8();
     
    519519        return;
    520520  }
    521 
    522   particleBeam* beam = dtmanage_->getDiagnosticBeam(index);
     521  string elementLabel = choixElementDessin_->currentText().toUTF8();
     522  particleBeam* beam = dtmanage_->getDiagnosticBeam(elementLabel);
     523  //  particleBeam* beam = dtmanage_->getDiagnosticBeam(index);
    523524   
    524525  if ( beam == NULL ) {
     
    626627
    627628
    628 void PspaApplication::faireDessinParmela(WContainerWidget* toto, particleBeam* beam, string namex, string namey )
    629 {
    630   cout << " faireDessinParmela " << endl;
    631   GWt_dialog* pointsDialog = new GWt_dialog("space phase",toto,false);
    632   eDialog_.push_back(pointsDialog);
    633   pointsDialog->setMinimumSize(400,400);
    634   pointsDialog->setClosable(true);
    635   // pointsDialog->show();
     629// void PspaApplication::faireDessinParmela(WContainerWidget* toto, particleBeam* beam, string namex, string namey )
     630// {
     631//   cout << " faireDessinParmela " << endl;
     632//   GWt_dialog* pointsDialog = new GWt_dialog("space phase",toto,false);
     633//   eDialog_.push_back(pointsDialog);
     634//   pointsDialog->setMinimumSize(400,400);
     635//   pointsDialog->setClosable(true);
     636//   // pointsDialog->show();
    636637     
    637   new WText(nameOfCase_, pointsDialog->contents());
    638 
    639 
    640   vector<double> xcor;
    641   vector<double> ycor;
    642   vector<string> legende;
    643   beam->particlesPhaseSpaceData(xcor, ycor, legende, namex, namey);
    644   for (int k=0 ; k < legende.size(); k++) {
    645     new WBreak(pointsDialog->contents());
    646     new WText(legende.at(k), pointsDialog->contents());
    647   }
    648   string titre = " phase space ";
    649   chartPlot2vec(pointsDialog->contents(), xcor, ycor, true,titre,namex, namey,400,400);
    650 
    651 
    652    
    653   pointsDialog->show();
    654    
    655   //  chart->setMargin(10, Top | Bottom);            // add margin vertically
    656   //  chart->setMargin(WLength::Auto, Left | Right); // center horizontally
    657 }
    658 
    659 void PspaApplication::faireDessinTransport(WContainerWidget* toto, particleBeam* beam, string namex, string namey)
    660 {
    661   GWt_dialog* ellipseDialog = new GWt_dialog("ellipse",toto,false);
    662   eDialog_.push_back(ellipseDialog);
    663   ellipseDialog->setMinimumSize(400,400);
    664   ellipseDialog->setClosable(true);
    665   ellipseDialog->show();
    666   new WText(nameOfCase_, ellipseDialog->contents());
    667  
    668   vector<double> xcor;
    669   vector<double> ycor;
    670   vector<string> legende;
    671   beam->donneesDessinEllipse(xcor,ycor,legende, namex, namey);
    672 
    673   for (int k=0 ; k < legende.size(); k++) {
    674     new WBreak(ellipseDialog->contents());
    675     new WText(legende.at(k), ellipseDialog->contents());
    676   }
    677   string titre = "phase space rms";
    678   chartPlot2vec(ellipseDialog->contents(), xcor, ycor, false,titre, namex, namey,500,300);
    679 }
     638//   new WText(nameOfCase_, pointsDialog->contents());
     639
     640
     641//   vector<double> xcor;
     642//   vector<double> ycor;
     643//   vector<string> legende;
     644//   beam->particlesPhaseSpaceData(xcor, ycor, legende, namex, namey);
     645//   for (int k=0 ; k < legende.size(); k++) {
     646//     new WBreak(pointsDialog->contents());
     647//     new WText(legende.at(k), pointsDialog->contents());
     648//   }
     649//   string titre = " phase space ";
     650//   chartPlot2vec(pointsDialog->contents(), xcor, ycor, true,titre,namex, namey,400,400);
     651
     652
     653   
     654//   pointsDialog->show();
     655   
     656//   //  chart->setMargin(10, Top | Bottom);            // add margin vertically
     657//   //  chart->setMargin(WLength::Auto, Left | Right); // center horizontally
     658// }
     659
     660// void PspaApplication::faireDessinTransport(WContainerWidget* toto, particleBeam* beam, string namex, string namey)
     661// {
     662//   GWt_dialog* ellipseDialog = new GWt_dialog("ellipse",toto,false);
     663//   eDialog_.push_back(ellipseDialog);
     664//   ellipseDialog->setMinimumSize(400,400);
     665//   ellipseDialog->setClosable(true);
     666//   ellipseDialog->show();
     667//   new WText(nameOfCase_, ellipseDialog->contents());
     668 
     669//   vector<double> xcor;
     670//   vector<double> ycor;
     671//   vector<string> legende;
     672//   beam->donneesDessinEllipse(xcor,ycor,legende, namex, namey);
     673
     674//   for (int k=0 ; k < legende.size(); k++) {
     675//     new WBreak(ellipseDialog->contents());
     676//     new WText(legende.at(k), ellipseDialog->contents());
     677//   }
     678//   string titre = "phase space rms";
     679//   chartPlot2vec(ellipseDialog->contents(), xcor, ycor, false,titre, namex, namey,500,300);
     680// }
    680681
    681682
     
    848849  histoDialog->setClosable(true);
    849850 
    850   int index = choixHistoDessin_->currentIndex();   
    851   particleBeam* beam = dtmanage_->getDiagnosticBeam(index);
     851  // int index = choixHistoDessin_->currentIndex();   
     852  // particleBeam* beam = dtmanage_->getDiagnosticBeam(index);
     853   string elementLabel = choixHistoDessin_->currentText().toUTF8();   
     854   particleBeam* beam = dtmanage_->getDiagnosticBeam(elementLabel);
    852855  if (beam == NULL) {
    853856    GWt_dialog warningBeamState("histogram","the beam does not exist at the end of this element !", GWt_dialog::Error, false,true);
Note: See TracChangeset for help on using the changeset viewer.