Ignore:
Timestamp:
Dec 16, 2013, 5:16:54 PM (11 years ago)
Author:
garnier
Message:

grosse modification pour intégrer les sections

File:
1 edited

Legend:

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

    r449 r455  
    1717#include "GWt_dialog.h"
    1818#include "GWt_console.h"
     19#include "GWt_sector.h"
    1920#include "GWt_globalParameters.h"
    2021#include "GWt_sectionToExecute.h"
     
    2324#define BAVARD 0
    2425
    25 GWt_softwarePanel::GWt_softwarePanel(dataManager* dataManager,PspaApplication* pspa,WContainerWidget* parent)
    26   : WContainerWidget(parent)
    27 {
    28   dtmanage_ = dataManager;
    29   pspa_ = pspa;
     26GWt_softwarePanel::GWt_softwarePanel(dataManager* dataManager,GWt_sector* sect)
     27  : WContainerWidget(),
     28dtmanage_(dataManager),
     29UIsector_(sect)
     30{
    3031 
    3132  // bouton execute
     
    5152void GWt_softwarePanel::addSectionToExecuteW()
    5253{     
     54  cout << "***********************************" << endl;
     55  cout << "*  A réécrire  *" << endl;
     56  cout << "***********************************" << endl;
     57  return;
    5358#if BAVARD > 0
    5459  cout << "***********************************" << endl;
     
    5661#endif
    5762
    58   abstractElement* premierElement;
    59   abstractElement* dernierElement;
     63  abstractElement* premierElement = NULL;
     64  abstractElement* dernierElement = NULL;
    6065
    6166  int premierIndex = 0;
     
    6368 
    6469  cout << "sections_.size() = " << sections_.size() << endl;
    65 
     70/*
    6671  // if there is no section
    6772  if(sections_.size() == 0) {
     
    8792 
    8893  dtmanage_->addSectionToExecute(premierElement,premierIndex,dernierElement,dernierIndex,nomDeLogiciel());
    89 
     94*/
    9095  std::string premierElementLabel = "";
    9196  std::string dernierElementLabel = "";
     
    109114  fillComboWithSoftwares(softCombo);
    110115
    111   GWt_sectionToExecute* newSection = new GWt_sectionToExecute(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(sections_.size()),this);
     116  GWt_sectionToExecute* newSection = new GWt_sectionToExecute(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(sections_.size()),this,UIsector_);
    112117
    113118  stringstream st;
     
    165170  // traitement de la premiere ligne
    166171  // on impose le depart du calcul au premier element
    167   string premier = dtmanage_->getLabelFromElementNumero(1);
     172  string premier = "";
     173  if (UIsector_->getSectorControler()) {
     174    if (UIsector_->getSectorControler()->getSectionsToExecute().size() > 0) {
     175      if (UIsector_->getSectorControler()->getSectionsToExecute()[0]->getElements().size() > 0) {
     176        premier = UIsector_->getSectorControler()->getSectionsToExecute()[0]->getElements()[0]->getLabel();
     177      }
     178    }
     179  }
     180 
     181  // FIXME :  A réécrire
     182  /*
    168183  if (sections_.size() > 0) {
    169184    sections_[0]->setFirstElementCurrentSelection(premier);
     
    235250    exec_go_->enable();
    236251  }
    237 
     252*/
    238253  return true;
    239254}
     
    241256bool GWt_softwarePanel::areDataCoherent()
    242257{
     258// FIXME
     259  cout << "***********************************" << endl;
     260  cout << "**  To be move in controler  **" << endl;
     261  cout << "***********************************" << endl;
     262  return true;
    243263#if BAVARD > 0
    244264  cout << "***********************************" << endl;
     
    247267
    248268  bool caMarche = true;
    249 
     269/*
    250270  // initialize dataManager
    251271  dtmanage_->initializeExecution();
     
    299319      sections_[a]->setWarnings(diagnosticWarnings);
    300320    }//a
    301    
     321    */
    302322  return caMarche;
    303323}
     
    319339
    320340      // delete from dataManager
    321       dtmanage_->clearSectionToExecute(sectionIndex);
     341      UIsector_->getSectorControler()->clearSectionToExecute(sectionIndex);
    322342
    323343      // delete from User Interface
     
    352372  //  exec_go_->setDisabled(true);
    353373  calculDialog.hide(); 
    354   pspa_->faireDessin();
     374  UIsector_->getAccelerator()->faireDessin();
    355375}
    356376
    357377void GWt_softwarePanel::fillComboWithElements(Wt::WComboBox* cBox)
    358378{
    359   if (cBox == NULL) return;
     379  // FIXME
     380  cout << "***********************************" << endl;
     381  cout << "**  To be move in controler  **" << endl;
     382  cout << "***********************************" << endl;
     383  return;
     384
     385/*  if (cBox == NULL) return;
    360386
    361387  // get the last item selected
     
    376402  }
    377403  cBox->refresh();
     404*/
    378405}
    379406
Note: See TracChangeset for help on using the changeset viewer.