Changeset 226 in PSPA


Ignore:
Timestamp:
Dec 28, 2012, 7:50:58 PM (11 years ago)
Author:
lemeur
Message:

addConsoleMessge en static + bricoles

Location:
Interface_Web/trunk/pspaWT
Files:
2 added
31 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/cmt/requirements

    r225 r226  
    1717
    1818
    19 #macro lib_PSPSLib_cppflags " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD  -DHAS_IMAGEMAGIC -DPSPA_DEBUG" Linux-x86_64  " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD -DHAS_IMAGEMAGIC"
     19macro lib_PSPSLib_cppflags " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD  -DHAS_IMAGEMAGIC -DPSPA_DEBUG" Linux-x86_64  " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD -DHAS_IMAGEMAGIC"
    2020
    21 macro lib_PSPSLib_cppflags " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD  -DPSPA_DEBUG" Linux-x86_64  " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD "
     21#macro lib_PSPSLib_cppflags " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD  -DPSPA_DEBUG" Linux-x86_64  " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD "
    2222
    2323
     
    2727
    2828#macro PSPSLib_linkopts     " -L${PSPAWTROOT}/$(Platform_bin) -lPSPSLib "
    29 application pspaWT bareParticle.cc particleBeam.cc GWt_cell.cc GWt_rfgun.cc GWt_soleno.cc GWt_bend.cc GWt_beam.cc GWt_globalParameters.cc GWt_drift.cc GWt_fit.cc GWt_abstractElement.cc dataManager.cc elementsCollection.cc elementDrift.cc elementCell.cc elementRfgun.cc elementSoleno.cc elementBend.cc elementBeam.cc elementFit.cc globalParameters.cc abstractElement.cc GWt_LigneFaisceau.cc GWt_pspaApplication.cc GWt_dropZoneLigneFaiseau.cc GWt_draggableImage.cc GWt_dialog.cc nomdElements.cc nomDeLogiciel.cc transportMoments.cc main.cc use_cppflags='" ${lib_PSPSLib_cppflags}"'
     29application pspaWT bareParticle.cc particleBeam.cc GWt_cell.cc GWt_rfgun.cc GWt_soleno.cc GWt_bend.cc GWt_beam.cc GWt_globalParameters.cc GWt_drift.cc GWt_fit.cc GWt_abstractElement.cc dataManager.cc elementsCollection.cc elementDrift.cc elementCell.cc elementRfgun.cc elementSoleno.cc elementBend.cc elementBeam.cc elementFit.cc globalParameters.cc abstractElement.cc GWt_tools.cc GWt_LigneFaisceau.cc GWt_pspaApplication.cc GWt_dropZoneLigneFaiseau.cc GWt_draggableImage.cc GWt_dialog.cc nomdElements.cc nomDeLogiciel.cc transportMoments.cc main.cc use_cppflags='" ${lib_PSPSLib_cppflags}"'
    3030
    3131macro DrawWt_linkopts " ${PSPSLib_linkopts} ${Wt_linkopts} ${boost_linkopts} ${dld_linkopts}"
  • Interface_Web/trunk/pspaWT/include/GWt_abstractElement.h

    r225 r226  
    22#define GWTABSTRACELEMENT_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "abstractElement.h"
    66
     
    1616 protected :
    1717
    18   PspaApplication* pspa_;
     18  //  PspaApplication* pspa_;
    1919  abstractElement* element_;
    2020
     
    3030 public :
    3131
    32   GWt_abstractElement(PspaApplication* ps,abstractElement* elem);
     32  GWt_abstractElement(abstractElement* elem);
    3333
    3434  // methode Factory
    35   static GWt_abstractElement *ajoute(PspaApplication* ps,abstractElement* ptr);
     35  static GWt_abstractElement *ajoute(abstractElement* ptr);
    3636
    3737  void clicked();
  • Interface_Web/trunk/pspaWT/include/GWt_beam.h

    r180 r226  
    22#define GWT_BEAM_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66
     
    1919 public :
    2020
    21   GWt_beam(PspaApplication* ps,abstractElement* elem);
     21  GWt_beam(abstractElement* elem);
    2222  ~GWt_beam() {;}
    2323  virtual void dialogDone();
  • Interface_Web/trunk/pspaWT/include/GWt_bend.h

    r202 r226  
    22#define GWT_BEND_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66
     
    1919 public :
    2020
    21   GWt_bend(PspaApplication* ps,abstractElement* elem);
     21  GWt_bend(abstractElement* elem);
    2222  ~GWt_bend() {;}
    2323  virtual void dialogDone();
  • Interface_Web/trunk/pspaWT/include/GWt_cell.h

    r153 r226  
    22#define GWT_CELL_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66#include "abstractElement.h"
     
    2929 public :
    3030
    31   GWt_cell(PspaApplication* ps,abstractElement* elem);
     31  GWt_cell(abstractElement* elem);
    3232  ~GWt_cell() {;}
    3333  virtual void dialogDone();
  • Interface_Web/trunk/pspaWT/include/GWt_drift.h

    r153 r226  
    22#define GRAPHDRIFTELEMENT_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66#include "abstractElement.h"
     
    2222 public:
    2323
    24   GWt_drift(PspaApplication* ps,abstractElement* elem);
     24  GWt_drift(abstractElement* elem);
    2525  ~GWt_drift() {;}
    2626  virtual void dialogDone();
  • Interface_Web/trunk/pspaWT/include/GWt_fit.h

    r225 r226  
    22#define GWT_FIT_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66
     
    1616 public :
    1717
    18 GWt_fit(PspaApplication* ps,abstractElement* elem);
     18GWt_fit(abstractElement* elem);
    1919~GWt_fit() {;}
    2020 virtual void dialogDone();
  • Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h

    r224 r226  
    4545
    4646
    47  WContainerWidget* console_;
     47 // WContainerWidget* console_;
    4848 WWidget* globalParam_;
    4949 WWidget* beamLine_;
     
    102102 }
    103103 
    104  void addConsoleMessage(WString msg);
     104 // void addConsoleMessage(WString msg);
    105105
    106106 void updateSelections();
  • Interface_Web/trunk/pspaWT/include/GWt_rfgun.h

    r156 r226  
    22#define GWT_RFGUN_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66#include "abstractElement.h"
     
    2727 public :
    2828
    29   GWt_rfgun(PspaApplication* ps,abstractElement* elem);
     29  GWt_rfgun(abstractElement* elem);
    3030  ~GWt_rfgun() {;}
    3131  virtual void dialogDone();
  • Interface_Web/trunk/pspaWT/include/GWt_soleno.h

    r153 r226  
    22#define GWTSOLENO_SEEN
    33
    4 #include "GWt_pspaApplication.h"
     4//#include "GWt_pspaApplication.h"
    55#include "GWt_abstractElement.h"
    66#include "abstractElement.h"
     
    2323 public :
    2424
    25   GWt_soleno(PspaApplication* ps, abstractElement* elem);
     25  GWt_soleno( abstractElement* elem);
    2626  ~GWt_soleno() {;}
    2727  virtual  void dialogDone();
  • Interface_Web/trunk/pspaWT/include/dataManager.h

    r190 r226  
    4242  inline particleBeam* getCurrentBeam() {return currentBeam_;}
    4343
    44   particleBeam* getDiagnosticBeam(int index);
     44  particleBeam* getDiagnosticBeam(unsigned index);
    4545
    4646  void addSectionToExecute(int debut, int fin, nomDeLogiciel prog);
  • Interface_Web/trunk/pspaWT/include/elementsCollection.h

    r126 r226  
    2121
    2222  void raz();
    23   int size(); 
     23  unsigned size(); 
    2424  abstractElement* addElement(typedElement elemType);
    2525  abstractElement* getElementPointer(string label) const;
  • Interface_Web/trunk/pspaWT/include/particleBeam.h

    r224 r226  
    6161  particleBeam();
    6262
    63   ~particleBeam() {;}
     63  virtual ~particleBeam() {;}
    6464
    6565  bool setFromParmela(unsigned numeroElement,double referencefrequency);
  • Interface_Web/trunk/pspaWT/include/sectionToExecute.h

    r58 r226  
    66typedef struct 
    77{
    8   int firstElement;
    9   int lastElement;
     8  unsigned firstElement;
     9  unsigned lastElement;
    1010  nomDeLogiciel software;
    1111}  sectionToExecute;
  • Interface_Web/trunk/pspaWT/src/GWt_LigneFaisceau.cc

    r225 r226  
    6464    {     
    6565      abstractElement* ptr = pspa_->getDataManager()->getCollection()->getElementPointer(k);
    66       GWt_abstractElement* gw = GWt_abstractElement::ajoute(pspa_,ptr);
     66      GWt_abstractElement* gw = GWt_abstractElement::ajoute(ptr);
    6767      if(gw == NULL) {
    6868        cerr << "GWt_LigneFaisceau::restaure element type " << ptr->getNomdElement().getElementName() << " est inconnu " << endl;
  • Interface_Web/trunk/pspaWT/src/GWt_abstractElement.cc

    r225 r226  
    1414#include "mixedTools.h"
    1515#include "nomdElements.h"
     16#include "GWt_tools.h"
    1617
    1718#include <Wt/WText>
    1819#include <Wt/WLineEdit>
     20#include <Wt/WBreak>
    1921
    20 GWt_abstractElement::GWt_abstractElement(PspaApplication* ps,abstractElement* elem)
     22GWt_abstractElement::GWt_abstractElement(abstractElement* elem)
    2123{
    22   pspa_ = ps;
     24  //  pspa_ = ps;
    2325  element_ = elem;
    2426
     
    4446  if ( param == NULL )
    4547    {
    46       pspa_->addConsoleMessage(" GWt_abstractElement::beginDialog : empty parameter set for element " + element_->getNomdElement().getElementName());
     48      GWt_tools::addConsoleMessage(" GWt_abstractElement::beginDialog : empty parameter set for element " + element_->getNomdElement().getElementName());
    4749    }
    4850  //   int compteur = -1;
     
    5254  if ( nbparam != element_->getNbParams())
    5355    {
    54       pspa_->addConsoleMessage(" element seems not to be a " + element_->getNomdElement().getElementName());
     56      GWt_tools::addConsoleMessage(" element seems not to be a " + element_->getNomdElement().getElementName());
    5557    }
    5658
     
    9092}
    9193
    92 GWt_abstractElement* GWt_abstractElement::ajoute(PspaApplication* ps,abstractElement* ptr)
     94GWt_abstractElement* GWt_abstractElement::ajoute(abstractElement* ptr)
    9395{
    9496  typedElement eType = ptr->getNomdElement().getElementType();
    9597
    9698  switch (  eType ) {
    97   case RFgun : return new GWt_rfgun(ps,ptr);
    98   case drift : return new GWt_drift(ps,ptr);
    99   case cell  : return new GWt_cell(ps,ptr);
    100   case bend  : return new GWt_bend(ps,ptr);
    101   case soleno  : return new GWt_soleno(ps,ptr);
    102   case beam  : return new GWt_beam(ps,ptr);
    103   case fit  : return new GWt_fit(ps,ptr);
     99  case RFgun : return new GWt_rfgun(ptr);
     100  case drift : return new GWt_drift(ptr);
     101  case cell  : return new GWt_cell(ptr);
     102  case bend  : return new GWt_bend(ptr);
     103  case soleno  : return new GWt_soleno(ptr);
     104  case beam  : return new GWt_beam(ptr);
     105  case fit  : return new GWt_fit(ptr);
    104106  case inconnu : return NULL;
    105107  default : return NULL;
  • Interface_Web/trunk/pspaWT/src/GWt_beam.cc

    r225 r226  
    88#include <Wt/WPushButton>
    99
    10 GWt_beam::GWt_beam(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem) {
     10GWt_beam::GWt_beam(abstractElement* elem) : GWt_abstractElement(elem) {
    1111
    1212
  • Interface_Web/trunk/pspaWT/src/GWt_bend.cc

    r225 r226  
    99#include <Wt/WPushButton>
    1010
    11 GWt_bend::GWt_bend(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem)
     11GWt_bend::GWt_bend(abstractElement* elem) : GWt_abstractElement(elem)
    1212{
    1313
  • Interface_Web/trunk/pspaWT/src/GWt_cell.cc

    r225 r226  
    1010#include <Wt/WPanel>
    1111
    12 GWt_cell::GWt_cell(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem)
     12GWt_cell::GWt_cell(abstractElement* elem) : GWt_abstractElement(elem)
    1313{
    1414
  • Interface_Web/trunk/pspaWT/src/GWt_drift.cc

    r225 r226  
    99#include <Wt/WPushButton>
    1010
    11 GWt_drift::GWt_drift(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem)
     11GWt_drift::GWt_drift(abstractElement* elem) : GWt_abstractElement(elem)
    1212{
    1313
  • Interface_Web/trunk/pspaWT/src/GWt_dropZoneLigneFaiseau.cc

    r225 r226  
    33#include "GWt_dropZoneLigneFaiseau.h"
    44#include "nomdElements.h"
     5#include "GWt_tools.h"
    56
    67#include <Wt/WCssDecorationStyle>
     
    7475
    7576#ifdef PSPA_DEBUG
    76   pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOver");
     77  GWt_tools::addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOver");
    7778#endif
    7879}
     
    9697
    9798#ifdef PSPA_DEBUG
    98   pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOut");
     99  GWt_tools::addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOut");
    99100#endif
    100101}
     
    103104{
    104105#ifdef PSPA_DEBUG
    105   pspa_->addConsoleMessage(" GWt_dropZoneLigneFaiseau::mouseDragged");
     106  GWt_tools::addConsoleMessage(" GWt_dropZoneLigneFaiseau::mouseDragged");
    106107#endif
    107108}
     
    110111{
    111112#ifdef PSPA_DEBUG
    112   pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOut up");
     113  GWt_tools::addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOut up");
    113114#endif
    114115}
     
    117118{
    118119#ifdef PSPA_DEBUG
    119   pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseDown up");
     120  GWt_tools::addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseDown up");
    120121#endif
    121122}
     
    124125{
    125126#ifdef PSPA_DEBUG
    126   pspa_->addConsoleMessage(" GWt_dropZoneLigneFaiseau::dropEvent");
     127  GWt_tools::addConsoleMessage(" GWt_dropZoneLigneFaiseau::dropEvent");
    127128#endif
    128129
     
    142143  }
    143144
    144   pspa_->addConsoleMessage(e.getElementName());
     145  GWt_tools::addConsoleMessage(e.getElementName());
    145146
    146147  abstractElement* ptr = pspa_->getDataManager()->addElement(eType);
     
    148149  ptr->setLabel(getElementNumberInBeamLine(e));
    149150
    150   GWt_abstractElement* insertedAbstractElement = GWt_abstractElement::ajoute(pspa_,ptr);
     151  GWt_abstractElement* insertedAbstractElement = GWt_abstractElement::ajoute(ptr);
    151152  cout << " je vais ajouter l'element  " << ptr->getNomdElement().getElementName() << " de type " << ptr->getNomdElement().getElementType() << "ID "<< insertedAbstractElement << endl;
    152153
     
    308309 
    309310#ifdef PSPA_DEBUG
    310   pspa_->addConsoleMessage("remove from drag Zone");
     311  GWt_tools::addConsoleMessage("remove from drag Zone");
    311312  cout << "remove from drag Zone id" << layout->indexOf ((WLayoutItem*)(layout->findWidgetItem (other))) << " count:" << layout->count()<< endl;
    312313#endif
     
    316317      layout->removeItem (layout->itemAt(2));
    317318#ifdef PSPA_DEBUG
    318   pspa_->addConsoleMessage("remove first link");
     319  GWt_tools::addConsoleMessage("remove first link");
    319320#endif
    320321    }
     
    325326      layout->removeItem (layout->itemAt(layout->count()-3));
    326327#ifdef PSPA_DEBUG
    327   pspa_->addConsoleMessage("remove last link");
     328  GWt_tools::addConsoleMessage("remove last link");
    328329#endif
    329330    }
     
    334335    layout->removeItem (layout->itemAt(layout->indexOf((WLayoutItem*)(layout->findWidgetItem (other)))));
    335336#ifdef PSPA_DEBUG
    336     pspa_->addConsoleMessage("remove drop zone");
     337    GWt_tools::addConsoleMessage("remove drop zone");
    337338#endif
    338339  }
  • Interface_Web/trunk/pspaWT/src/GWt_fit.cc

    r225 r226  
    77#include <Wt/WDialog>
    88#include <Wt/WPushButton>
     9#include <Wt/WComboBox>
    910
    10 GWt_fit::GWt_fit(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem)
     11GWt_fit::GWt_fit(abstractElement* elem) : GWt_abstractElement(elem)
    1112{
    1213
  • Interface_Web/trunk/pspaWT/src/GWt_globalParameters.cc

    r58 r226  
    1010
    1111#include "mixedTools.h"
    12 //#include "nomDeLogiciel.h"
     12#include "GWt_tools.h"
     13
    1314
    1415GWt_globalParameters::GWt_globalParameters(PspaApplication* ps)
     
    107108  if ( param == NULL )
    108109    {
    109       pspa_->addConsoleMessage(" GWt_globalParameters : empty parameter set");
     110      GWt_tools::addConsoleMessage(" GWt_globalParameters : empty parameter set");
    110111    }
    111112  int nbparam = atoi(param[0].c_str());
    112113  if ( nbparam != 4 )
    113114    {
    114       pspa_->addConsoleMessage(" GWt_globalParameters : wrong number of parameters");
     115      GWt_tools::addConsoleMessage(" GWt_globalParameters : wrong number of parameters");
    115116    }
    116117  frequencyEdit_->setText(param[1].c_str());
  • Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc

    r224 r226  
    1414#include "nomdElements.h"
    1515#include "environmentVariables.h"
    16 
     16#include "GWt_tools.h"
    1717
    1818#include <Wt/WLineEdit>
     
    8585  layout->addWidget(beamLine_, 2, 1, 1, 1);
    8686 
    87   console_ = new WContainerWidget();
    88   console_->decorationStyle().setBackgroundColor (WColor("lightgray"));
    89   console_->setMaximumSize(600,200);
    90   layout->addWidget(console_, 3, 1);
    91   console_->setMinimumSize(300,100);
    92   console_->setOverflow(WContainerWidget::OverflowAuto); 
     87
     88  // console_ = new WContainerWidget();
     89  // console_->decorationStyle().setBackgroundColor (WColor("lightgray"));
     90  // console_->setMaximumSize(600,200);
     91  // layout->addWidget(console_, 3, 1);
     92  // console_->setMinimumSize(300,100);
     93  // console_->setOverflow(WContainerWidget::OverflowAuto); 
     94
     95  GWt_tools::console_->clear();
     96  GWt_tools::console_->decorationStyle().setBackgroundColor (WColor("lightgray"));
     97  GWt_tools::console_->setMaximumSize(600,200);
     98  GWt_tools::console_->setMinimumSize(300,100);
     99  GWt_tools::console_->setOverflow(WContainerWidget::OverflowAuto); 
     100  layout->addWidget(GWt_tools::console_, 3, 1);
     101
     102
     103
     104
    93105
    94106  //-----------
     
    107119  //-----------
    108120 
     121
     122
    109123  layout->setColumnResizable(1);
    110124  layout->setRowResizable(2);
     
    351365      if ( current >= dtmanage_->beamLineSize() )
    352366        {
    353           addConsoleMessage(" bad section definition !  \n ");
     367          //      GWt_tools::addConsoleMessage(" bad section definition !  \n ");
    354368          GWt_dialog warningDialog("PSPA : Vérification des sections", " bad section definition !", GWt_dialog::Error,true,true);
    355369          warningDialog.exec();
     
    365379      if ( numeroFin <= current || numeroFin > dtmanage_->beamLineSize())
    366380        {
    367           addConsoleMessage(" bad section definition !  \n ");
     381          //      GWt_tools::addConsoleMessage(" bad section definition !  \n ");
    368382          GWt_dialog warningDialog("PSPA : Vérification des sections", " bad section definition !", GWt_dialog::Error, true,true);
    369383          warningDialog.exec();
     
    408422    {   
    409423      caMarche = false;
    410       addConsoleMessage(diagnostic.c_str());
     424      //     GWt_tools::addConsoleMessage(diagnostic.c_str());
    411425      GWt_dialog calculDialog("PSPA : Erreur lors de check execute", diagnostic , GWt_dialog::Error,true,true);
    412426      calculDialog.exec();
     
    427441void PspaApplication::executer()
    428442{
    429   addConsoleMessage(string("on va peut etre y arriver"));
     443  GWt_tools::addConsoleMessage(string("on va peut etre y arriver"));
    430444  static_cast<GWt_globalParameters*>(globalParam_)->updateGlobals();
    431445
     
    441455  }
    442456  //  cout << " PspaApplication : retour d'execution resultat =  " << resultat << endl;
    443   addConsoleMessage(resultat);
     457  GWt_tools::addConsoleMessage(resultat);
    444458  //  cout << " PspaApplication : affichage console termine  " << endl;
    445459
     
    454468{
    455469  cout << " on sauve " << endl;
    456   addConsoleMessage("sauvegarde");
     470  GWt_tools::addConsoleMessage("sauvegarde");
    457471
    458472  dialogSave_ = new WDialog("save");
     
    469483void PspaApplication::dialogSaveDone(WDialog::DialogCode code)
    470484{
    471   if ( code != Wt::WDialog::Accepted ) { addConsoleMessage(" pas de sauvegarde"); return;}
    472   else { addConsoleMessage("sauvegarde sur repertoire : " + WORKINGAREA);}
     485  if ( code != Wt::WDialog::Accepted ) { GWt_tools::addConsoleMessage(" pas de sauvegarde"); return;}
     486  else { GWt_tools::addConsoleMessage("sauvegarde sur repertoire : " + WORKINGAREA);}
    473487  nameOfCase_ = saveNameEdit_->text().toUTF8();
    474488  cout << " PspaApplication::dialogSaveDone() nameOfCase_= " << nameOfCase_ << endl;
     
    484498void PspaApplication::restaurer()
    485499{
    486   addConsoleMessage(string("on va recharger..."));
     500  GWt_tools::addConsoleMessage(string("on va recharger..."));
    487501  dialogOpen_ = new WDialog("open");
    488502  new WText("name of case : ",dialogOpen_->contents());
     
    499513{
    500514
    501   if ( code != Wt::WDialog::Accepted ) { addConsoleMessage(" pas de restauration"); return;}
    502   else { addConsoleMessage("restauration depuis le repertoire " + WORKINGAREA);}
     515  if ( code != Wt::WDialog::Accepted ) { GWt_tools::addConsoleMessage(" pas de restauration"); return;}
     516  else { GWt_tools::addConsoleMessage("restauration depuis le repertoire " + WORKINGAREA);}
    503517
    504518  nameOfCase_ = openNameEdit_->text().toUTF8();
     
    506520  delete dialogOpen_;
    507521  dialogSave_ = NULL;
    508 
    509522
    510523  bool test = dtmanage_->restoreElements(WORKINGAREA +  nameOfCase_ +".save");
     
    520533  bobo->restoreElementCollection();
    521534
    522   addConsoleMessage(string("...terminee"));
     535  GWt_tools::addConsoleMessage(string("...terminee"));
    523536}
    524537
     
    567580    {
    568581      nameOfCase_ = nomDuFichier;
    569       addConsoleMessage(string("restauration..."));
     582      GWt_tools::addConsoleMessage(string("restauration..."));
    570583
    571584      if ( !dtmanage_->restoreElements(uploadFileSelectorWidget_->spoolFileName()) ) {
     
    580593      bobo->restoreElementCollection();
    581594
    582       addConsoleMessage(string("...terminee"));
     595      GWt_tools::addConsoleMessage(string("...terminee"));
    583596      message->show();
    584597    }
     
    641654      if ( beam->particleRepresentationOk() ) faireDessinParmela(toto_, beam);
    642655      else {
    643         addConsoleMessage("the beam state does not allow providing a drawing");
    644656        GWt_dialog warningBeamState(" graphical analysis", "the beam state does not allow providing a drawing with macroparticles !", GWt_dialog::Error, false,true);
    645657          warningBeamState.exec();
     
    647659    }
    648660  else {
    649     addConsoleMessage("type of  drawing not programmed");
    650661        GWt_dialog warningTypeDrawing(" graphical analysis", "type of  drawing not programmed !", GWt_dialog::Error, false,true);
    651662           warningTypeDrawing.exec();
     
    665676    }
    666677  else {
    667     addConsoleMessage("type of enveloppe drawing not programmed");
    668678        GWt_dialog warningTypeEnveloppe(" graphical analysis", "type of enveloppe drawing not programmed !", GWt_dialog::Error, false,true);
    669679           warningTypeEnveloppe.exec();
     
    867877}
    868878
    869 void PspaApplication::addConsoleMessage(WString msg) {
    870   WText *w = new WText(console_);
    871   w->setTextFormat(PlainText);
    872   w->setText(msg);
    873   w->setInline(false);
    874  
    875   /*
    876    * Little javascript trick to make sure we scroll along with new content
    877    */
    878   WApplication *app = WApplication::instance();
    879   app->doJavaScript(console_->jsRef() + ".scrollTop += "
    880                     + console_->jsRef() + ".scrollHeight;");
    881  
    882 }
     879// void PspaApplication::addConsoleMessage(WString msg) {
     880//   WText *w = new WText(console_);
     881//   w->setTextFormat(PlainText);
     882//   w->setText(msg);
     883//   w->setInline(false);
     884 
     885//   /*
     886//    * Little javascript trick to make sure we scroll along with new content
     887//    */
     888//   WApplication *app = WApplication::instance();
     889//   app->doJavaScript(console_->jsRef() + ".scrollTop += "
     890//                     + console_->jsRef() + ".scrollHeight;");
     891 
     892// }
    883893
    884894
  • Interface_Web/trunk/pspaWT/src/GWt_rfgun.cc

    r225 r226  
    88#include <Wt/WPushButton>
    99
    10 GWt_rfgun::GWt_rfgun(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem)
     10GWt_rfgun::GWt_rfgun(abstractElement* elem) : GWt_abstractElement(elem)
    1111{
    1212
  • Interface_Web/trunk/pspaWT/src/GWt_soleno.cc

    r225 r226  
    88#include <Wt/WPushButton>
    99
    10 GWt_soleno::GWt_soleno(PspaApplication* ps,abstractElement* elem) : GWt_abstractElement(ps,elem)
     10GWt_soleno::GWt_soleno(abstractElement* elem) : GWt_abstractElement(elem)
    1111{
    1212  string* param = beginDialog();
  • Interface_Web/trunk/pspaWT/src/dataManager.cc

    r225 r226  
    4141  cout << "dataManager::checkExecute()" << endl;
    4242 
    43   int k,j;
     43  unsigned k,j;
    4444  string diagnostic;
    45   int indexDeb, indexFin;
     45  unsigned indexDeb, indexFin;
    4646  cout << "controle execution : " << endl;
    4747  for(k = 0; k < jobList_.size(); k++) {
     
    142142        infile.open(nameOut.c_str(), ios::in);
    143143
    144         int k;
     144        unsigned k;
    145145        for ( k= indexDeb; k <= indexFin; k++)
    146146          {
     
    203203    else
    204204      {
    205         int k;
     205        unsigned k;
    206206        for ( k= indexDeb; k <= indexFin; k++)
    207207          {
     
    227227{
    228228  unsigned int k;
     229  if ( numeroDeb < 1 || numeroFin > elementsGallery_.size() ) {
     230    cerr << " numero of element out of limits " << endl;
     231    return false;
     232  }
     233
    229234  unsigned indexDeb = numeroDeb - 1;
    230235  unsigned indexFin = numeroFin - 1;
    231   if ( indexDeb < 0 || indexFin >= elementsGallery_.size() ) {
    232     cerr << " index of element out of limits " << endl;
    233     return false;
    234   }
    235236
    236237  abstractElement* premierEl = NULL;
     
    311312{
    312313  unsigned int k;
     314
     315  if ( numeroDeb < 1 || numeroFin > elementsGallery_.size() ) {
     316    cerr << " index of element out of limits " << endl;
     317    return false;
     318  }
     319
     320
    313321  unsigned indexDeb = numeroDeb - 1;
    314322  unsigned indexFin = numeroFin - 1;
    315   if ( indexDeb < 0 || indexFin >= elementsGallery_.size() ) {
    316     cerr << " index of element out of limits " << endl;
    317     return false;
    318   }
    319323
    320324  ofstream outfile;
     
    417421
    418422  outfile << globParam_.FileOutputFlow();
    419   int k;
     423  unsigned k;
    420424  abstractElement* elPtr;
    421425  for ( k=0 ; k < elementsGallery_.size() ; k++)
     
    439443  else cout << " successful opening input stream " << inputFileName << endl;
    440444
    441   int ielem;
    442445  string globalTitle;
    443446  if ( infile >> globalTitle ) {
     
    473476
    474477  // debug
    475   int k;
     478  unsigned k;
    476479  for(k = 0; k <  elementsGallery_.size(); k++) {
    477480    abstractElement* ptr= elementsGallery_.getElementPointer(k);
     
    483486}
    484487
    485 particleBeam* dataManager::getDiagnosticBeam(int index)
     488particleBeam* dataManager::getDiagnosticBeam(unsigned index)
    486489{
    487490  cout << " particleBeam* dataManager je vais dessiner " << getLabelFromElementNumero(index+1) << endl;
    488491
    489492
    490   if ( index < 0 || index >= diagnosticBeam_.size() ) {
     493  if ( index >= diagnosticBeam_.size() ) {
    491494      return NULL;
    492495    }
  • Interface_Web/trunk/pspaWT/src/elementsCollection.cc

    r225 r226  
    2828}
    2929 
    30 int elementsCollection::size()
     30unsigned elementsCollection::size()
    3131{
    3232  return elements_.size();
     
    8484abstractElement* elementsCollection::getElementPointerFromNumero(int num) const
    8585{
    86   if ( num > elements_.size() || num <= 0)
     86  if ( num > (int)elements_.size() || num <= 0)
    8787    {
    8888      return NULL;
  • Interface_Web/trunk/pspaWT/src/nomdElements.cc

    r225 r226  
    186186  eLabel_ = ne.eLabel_;
    187187  nbParam_ = ne.nbParam_;
     188  return *this;
    188189}
  • Interface_Web/trunk/pspaWT/src/particleBeam.cc

    r224 r226  
    165165
    166166  while( partic.readFromParmelaFile(filefais) > 0 ) {
    167     if ( partic.ne == indexElement )
     167    if ( partic.ne == (int)indexElement )
    168168      {
    169169        faisceau.push_back(partic);
     
    576576
    577577  xcor= vector<double>(ihist);
    578   for (unsigned i = 0; i < ihist; ++i) {
     578  for (int i = 0; i < ihist; ++i) {
    579579    xcor[i]= vmin+i*hpas;
    580580  }
     
    591591
    592592  cnts= 0;
    593   for (unsigned i = 0; i < ihist; ++i) {
     593  for (int i = 0; i < ihist; ++i) {
    594594    if(hist.at(i) > 0) cnts++;
    595595    cout<<"("<<xcor.at(i)<<","<<hist.at(i)<<") ";
  • Interface_Web/trunk/pspaWT/src/transportMoments.cc

    r180 r226  
    113113transportMoments& transportMoments::operator= (const transportMoments& tpm) {
    114114  rij_transportMoments_ = tpm.rij_transportMoments_;
     115  return *this;
    115116}
Note: See TracChangeset for help on using the changeset viewer.