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

maj de History

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.