Changeset 495 in PSPA


Ignore:
Timestamp:
Mar 12, 2014, 11:15:56 AM (10 years ago)
Author:
lemeur
Message:

maj de History

Location:
Interface_Web/trunk/pspaWT
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/History

    r492 r495  
    55     PSPA - Plateforme de simulation en physique des accélérateurs
    66     =========================================================
     7
     812 mars 2014 : Guy Le Meur
     9- suppression de la classe sectionToExecute
     10- la classe sector ne contient plus de sectionToExecute
     11- remplacée par computingBlock
     12- ajout de la classe expandedMachine qui contient le vecteur total des éléments et le vecteur des "computingBlock"
     13- dataManager contient une instance de expandedMachine
     14- la classe GWt_softwarePanel a été réécrite pour intégrer les précédentes modifications.
     15- GWt_accelerator a été modifié de manière que l'affichage du softwarePanel se fasse dans une fenêtre supplémentaire (Computing View) qui fait suite à la fenêtre "Detailled view of sector"
    716
    8174 Mars 2013 : Laurent Garnier
  • Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h

    r493 r495  
    4444  inline expandedMachine* expandMachine() {
    4545    if ( !currentMachine_ ) currentMachine_ = new expandedMachine(this);
    46     currentMachine_->fromSectors( sectors_, this );
     46    currentMachine_->fromSectors( sectors_ );
    4747    return currentMachine_;
    4848  }
  • Interface_Web/trunk/pspaWT/sources/controler/include/expandedMachine.h

    r493 r495  
    3232
    3333
    34   void  fromSectors( const vector<sector*>& sect, dataManager* dtmg );
     34  void  fromSectors( const vector<sector*>& sect );
    3535  //  computingBlock* openBlock(dataManager* dmg);
    3636
  • Interface_Web/trunk/pspaWT/sources/controler/src/expandedMachine.cc

    r493 r495  
    112112
    113113  // methode provisoire
    114 void expandedMachine::fromSectors( const vector<sector*>& secteurs, dataManager* dtmg  )
     114void expandedMachine::fromSectors( const vector<sector*>& secteurs  )
    115115{
    116116  cout << " methode expandedMachine::fromSectors " << endl;
     
    128128    cout << " expandedMachine::fromSectors la machine a " << elements_.size() << " elements " << endl;
    129129    computingBlocks_.clear();
    130     //    computingBlocks_.push_back(new computingBlock(elements_,NULL, this));
    131130    computingBlocks_.push_back(new computingBlock(0, elements_.size(),NULL, this));
    132131}
     132
    133133
    134134bool expandedMachine::openNewLastBlock() {
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_accelerator.h

    r493 r495  
    3838  void addSector();
    3939  void readConfiguration();
    40   void expandMachine();
     40    void expandMachine();
    4141  void run();
    4242  void closeGraphicDialog();
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_machine.h

    r493 r495  
    1616class GWt_machine : public WObject
    1717{
    18  
     18
     19    GWt_machine() {;}
     20
    1921public:
    2022
    21   GWt_machine(GWt_accelerator*,expandedMachine*);
     23   GWt_machine(GWt_accelerator*,expandedMachine*);
    2224  virtual ~GWt_machine();
    2325  void createWidgetComputing(WContainerWidget* parent);
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h

    r493 r495  
    77//
    88
    9 #ifndef GWt_softwarePanelBis_SEEN
    10 #define GWt_softwarePanelBis_SEEN
     9#ifndef GWt_softwarePanel_SEEN
     10#define GWt_softwarePanel_SEEN
    1111
    1212#include <iostream>
     
    2222class GWt_machine;
    2323
    24 class GWt_softwarePanelBis  : public WContainerWidget
     24class GWt_softwarePanel  : public WContainerWidget
    2525{
    2626 public :
    2727 
    28   GWt_softwarePanelBis(dataManager*, GWt_machine*);
    29   virtual ~GWt_softwarePanelBis();
     28  GWt_softwarePanel(dataManager*, GWt_machine*);
     29  virtual ~GWt_softwarePanel();
    3030
    3131  /**
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_accelerator.cc

    r493 r495  
    1717
    1818//- Ouvrir le premier secteur quand il est chargé
    19 //- Ajouter les sectionToExecute
     19//- Ajouter les computingBlocks
    2020//- Fixer le addConsoleMessage()
    2121//- remise a jour des éléments si on on change un bout de section
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_machine.cc

    r493 r495  
    6363  // add the software panel
    6464  cout << " GWt_machine::createWidgetComputing APPEL sofwarepanel" << endl;
    65     GWt_softwarePanelBis*  computeWidget = new GWt_softwarePanelBis(getAccelerator()->getDataManager(),this);
     65    GWt_softwarePanel*  computeWidget = new GWt_softwarePanel(getAccelerator()->getDataManager(),this);
    6666    vContainerLayout->addWidget(computeWidget);
    6767 
     
    7474}
    7575
    76 // void GWt_machine::expandMachine() {
    77 //   cout << " coucou depuis GWt_machine::expandMachine() " << endl;
    78 //   getAccelerator()->getDataManager()->expandMachine();
    79 //    cout << " GWt_machine::createWidgetComputing APPEL sofwarepanel" << endl;
    80 //        computeWidget_ = new GWt_softwarePanelBis(getAccelerator()->getDataManager(),this);
    81 //      vContainerLayout_->addWidget(computeWidget_);
    82 // }
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc

    r493 r495  
    2323#define BAVARD 1
    2424
    25 GWt_softwarePanelBis::GWt_softwarePanelBis(dataManager* dataManager,GWt_machine* mach)
     25GWt_softwarePanel::GWt_softwarePanel(dataManager* dataManager,GWt_machine* mach)
    2626  : WContainerWidget(),
    2727dtmanage_(dataManager),
     
    3636  contenuSections_->addWidget(new WBreak());
    3737  contenuSections_->addWidget(new WBreak());
    38   cout << " GWt_softwarePanelBis::GWt_softwarePanelBis DISPLAY SOFTWARE PANEL " << endl;
     38  cout << " GWt_softwarePanel::GWt_softwarePanel DISPLAY SOFTWARE PANEL " << endl;
    3939      displayFromControler();
    4040 
     
    4242}
    4343
    44 GWt_softwarePanelBis::~GWt_softwarePanelBis() {
    45 }
    46 
    47 void GWt_softwarePanelBis::displayFromControler()
     44GWt_softwarePanel::~GWt_softwarePanel() {
     45}
     46
     47void GWt_softwarePanel::displayFromControler()
    4848{     
    49   cout << " GWt_softwarePanelBis::displayFromControler() " << endl<<endl;
     49  cout << " GWt_softwarePanel::displayFromControler() " << endl<<endl;
    5050
    5151  // Clear all
     
    5555  // Get all sectionsToExecute from this machine
    5656  if (!UImachine_->getMachineControler()) {
    57     cout << " GWt_softwarePanelBis::displayFromControler() PAS DE MACHINE " << endl;
     57    cout << " GWt_softwarePanel::displayFromControler() PAS DE MACHINE " << endl;
    5858    return;
    5959  } else {
    60     cout << " GWt_softwarePanelBis::displayFromControler() MACHINE TROUVEE " << endl;
     60    cout << " GWt_softwarePanel::displayFromControler() MACHINE TROUVEE " << endl;
    6161  }
    6262 
    6363  if (UImachine_->getMachineControler()->getComputingBlocks().size() == 0) {
    6464    // FIXME : Add a message to tell the user to add first an element
    65     cout << " GWt_softwarePanelBis::displayFromControler() PAS DE BLOCK " << endl;
     65    cout << " GWt_softwarePanel::displayFromControler() PAS DE BLOCK " << endl;
    6666  } else {
    67     cout << " GWt_softwarePanelBis::displayFromControler() NOMBRE DE BLOCK " << UImachine_->getMachineControler()->getComputingBlocks().size() << endl;
     67    cout << " GWt_softwarePanel::displayFromControler() NOMBRE DE BLOCK " << UImachine_->getMachineControler()->getComputingBlocks().size() << endl;
    6868
    6969    unsigned int firstElemeOfComputingBlockIndex = 0;
    7070
    7171    for (unsigned int a=0; a<UImachine_->getMachineControler()->getComputingBlocks().size(); a++) {
    72       cout << " GWt_softwarePanelBis::displayFromControler() BLOC No " << a+1 << endl;
     72      cout << " GWt_softwarePanel::displayFromControler() BLOC No " << a+1 << endl;
    7373      abstractElement* premierElement = NULL;
    7474      abstractElement* dernierElement = NULL;
     
    8585      if (premierElement) premierElementLabel = premierElement->getLabel();
    8686      if (dernierElement) dernierElementLabel = dernierElement->getLabel();
    87       cout << " GWt_softwarePanelBis::displayFromControler() dernier element a afficher " << dernierElementLabel << endl;
     87      cout << " GWt_softwarePanel::displayFromControler() dernier element a afficher " << dernierElementLabel << endl;
    8888     
    8989      WComboBox* lineFromCombo = new WComboBox();
     
    119119      GWt_computingBlock* newBlock = new GWt_computingBlock(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(blocPtr),blocPtr,UImachine_);
    120120
    121       cout << " GWt_softwarePanelBis::displayFromControler j'ajoute un bloc : " << newBlock << endl;
    122       cout << " GWt_softwarePanelBis::displayFromControler nb widget avant : " << contenuSections_->count() << endl;
     121      cout << " GWt_softwarePanel::displayFromControler j'ajoute un bloc : " << newBlock << endl;
     122      cout << " GWt_softwarePanel::displayFromControler nb widget avant : " << contenuSections_->count() << endl;
    123123      contenuSections_->addWidget(newBlock);
    124       cout << " GWt_softwarePanelBis::displayFromControler nb widget apres : " << contenuSections_->count() << endl;
     124      cout << " GWt_softwarePanel::displayFromControler nb widget apres : " << contenuSections_->count() << endl;
    125125     
    126126    }
     
    128128}
    129129
    130 void GWt_softwarePanelBis::fillComboWithElements(Wt::WComboBox* cBox)
     130void GWt_softwarePanel::fillComboWithElements(Wt::WComboBox* cBox)
    131131{
    132132
     
    145145}
    146146
    147 void GWt_softwarePanelBis::fillComboWithSoftwares(Wt::WComboBox* cBox, std::string selected)
     147void GWt_softwarePanel::fillComboWithSoftwares(Wt::WComboBox* cBox, std::string selected)
    148148{
    149149#if BAVARD > 0
     
    167167
    168168
    169 Wt::WContainerWidget* GWt_softwarePanelBis::createAddDeletePushButtons(computingBlock* cpbl)
     169Wt::WContainerWidget* GWt_softwarePanel::createAddDeletePushButtons(computingBlock* cpbl)
    170170{
    171171  WContainerWidget* buttonContainer= new WContainerWidget();
     
    175175  // preparation du bouton add
    176176  WPushButton* exec_add = new WPushButton("+");
    177   //  exec_add->clicked().connect(this, &GWt_softwarePanelBis::addComputingBlock);
    178   exec_add->clicked().connect(boost::bind(&GWt_softwarePanelBis::addComputingBlock, this, cpbl));
     177  //  exec_add->clicked().connect(this, &GWt_softwarePanel::addComputingBlock);
     178  exec_add->clicked().connect(boost::bind(&GWt_softwarePanel::addComputingBlock, this, cpbl));
    179179  exec_add->setStyleClass("roundButton");
    180180  exec_add->setMaximumSize(20,20);
     
    185185  //  warningsContainer_->setStyleClass("warningsContainer");
    186186
    187   exec_delete->clicked().connect(boost::bind(&GWt_softwarePanelBis::deleteComputingBlock, this, cpbl));
     187  exec_delete->clicked().connect(boost::bind(&GWt_softwarePanel::deleteComputingBlock, this, cpbl));
    188188  exec_delete->setStyleClass("roundButton");
    189189  exec_delete->setMaximumSize(20,20);
     
    197197}
    198198
    199 void GWt_softwarePanelBis::addComputingBlock(computingBlock* cpbl) {
     199void GWt_softwarePanel::addComputingBlock(computingBlock* cpbl) {
    200200  // We put the last element of the previous sectionToExecute inside
    201201 
     
    209209
    210210
    211 // void GWt_softwarePanelBis::deleteComputingBlock(int sectionLabel)
    212 // {
    213 //   cout << " GWt_softwarePanelBis::deleteComputingBlock()" << endl;
    214 
    215 //   stringstream st;
    216 //   st << sectionLabel;
    217 //   std::string sectionName = st.str();
    218 //   //FIXME
    219 //   vector<computingBlock*>& compBloc = UImachine_->getMachineControler()->getComputingBlocks();
    220 //   cout << " GWt_softwarePanelBis::deleteComputingBlock() nb blocs = " << compBloc.size() << endl;
    221 //   cout << " GWt_softwarePanelBis::deleteComputingBlock() nb widgets = " << sectionName << endl;
    222 //   cout << " GWt_softwarePanelBis::deleteComputingBlock() nom bloc a detruire = " << contenuSections_->count() << endl;
    223 
    224 //   for ( unsigned k=0; k <  compBloc.size(); k++) {
    225 
    226 //   }
    227 // /*  if ( dtmanage_->getJobListSize() == 0 ) return;
    228 //   for (unsigned int sectionIndex = 0; sectionIndex< UIsectionsToExecute_deprecated_.size(); sectionIndex++) {
    229 //     if (UIsectionsToExecute_deprecated_[sectionIndex]->objectName() == sectionName) {
    230 
    231 //       // delete from dataManager
    232 //       UIsector_->getSectorControler()->clearSectionToExecute(sectionIndex);
    233 
    234 //       // delete from User Interface
    235 //       contenuSections_->removeWidget(UIsectionsToExecute_deprecated_[sectionIndex]);
    236 //       delete UIsectionsToExecute_deprecated_[sectionIndex];
    237 //       UIsectionsToExecute_deprecated_.erase (UIsectionsToExecute_deprecated_.begin()+sectionIndex);
    238 //     }
    239 //   } 
    240 // */
    241 //   displayFromControler();
    242 // }
    243 
    244 void GWt_softwarePanelBis::deleteComputingBlock(computingBlock* cpbl)
    245 {
    246   cout << " GWt_softwarePanelBis::deleteComputingBlock(computingBlock*)" << endl;
     211
     212void GWt_softwarePanel::deleteComputingBlock(computingBlock* cpbl)
     213{
     214  cout << " GWt_softwarePanel::deleteComputingBlock(computingBlock*)" << endl;
    247215
    248216  UImachine_->getMachineControler()->eraseComputingBlock(cpbl);
Note: See TracChangeset for help on using the changeset viewer.