Ignore:
Timestamp:
Dec 19, 2013, 3:53:53 PM (11 years ago)
Author:
garnier
Message:

Désormais il est de nouveau possible d'ajouter des sections et dy affecter des softwares (ne marche pour le moment quavec la 1ere sectionToExecute. Autres améliorations et renommages

File:
1 edited

Legend:

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

    r455 r469  
    88#include "GWt_sectionToExecute.h"
    99#include "GWt_softwarePanel.h"
     10#include "GWt_sector.h"
    1011
    11 GWt_sectionToExecute::GWt_sectionToExecute(Wt::WComboBox* first,Wt::WComboBox* last,Wt::WComboBox* soft,Wt::WContainerWidget* buttonPanel, GWt_softwarePanel* sPanel,GWt_sector* sect)
     12GWt_sectionToExecute::GWt_sectionToExecute(Wt::WComboBox* first,Wt::WComboBox* last,Wt::WComboBox* soft,Wt::WContainerWidget* buttonPanel, sectionToExecute* section,GWt_sector* sector)
    1213:WContainerWidget(),
    13 firstElement(first),
    14 lastElement(last),
    15 software(soft),
    16 softwarePanel(sPanel),
    17 UI_sector_(sect)
     14firstElement_(first),
     15lastElement_(last),
     16softElement_(soft),
     17section_(section),
     18UIsector_(sector)
    1819{
    1920  Wt::WGridLayout* mainContainerLayout = new Wt::WGridLayout();
     
    2930 
    3031  labelAndComboInsideContainerLayout->addWidget(new Wt::WText("from : "));
    31   labelAndComboInsideContainerLayout->addWidget(first);
     32  labelAndComboInsideContainerLayout->addWidget(firstElement_);
    3233  labelAndComboInsideContainerLayout->addWidget(new Wt::WText("to : "));
    33   labelAndComboInsideContainerLayout->addWidget(last);
    34   labelAndComboInsideContainerLayout->addWidget(soft);
     34  labelAndComboInsideContainerLayout->addWidget(lastElement_);
     35  labelAndComboInsideContainerLayout->addWidget(softElement_);
    3536 
    3637    // add buttons
     
    8687 
    8788  // resize combo
    88   firstElement->setMinimumSize(80,12);
    89   lastElement->setMinimumSize(80,12);
    90   software->setMinimumSize(80,12);
     89  firstElement_->setMinimumSize(80,12);
     90  lastElement_->setMinimumSize(80,12);
     91  softElement_->setMinimumSize(80,12);
    9192 
    92   firstElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
    93   lastElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
    94   software->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
     93//  firstElement_->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
     94//  lastElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
     95  softElement_->activated().connect(this,&GWt_sectionToExecute::setSoftware);
    9596 
    9697  manageWarningsAndErrors();
     
    99100
    100101void GWt_sectionToExecute::setFirstElementCurrentSelection(Wt::WString txt){
    101     for (int a=0; a< firstElement->count(); a++) {
    102         if (firstElement->itemText(a) == txt) {
    103             firstElement->setCurrentIndex (a);
     102    for (int a=0; a< firstElement_->count(); a++) {
     103        if (firstElement_->itemText(a) == txt) {
     104            firstElement_->setCurrentIndex (a);
    104105            return;
    105106        }
     
    108109
    109110void GWt_sectionToExecute::setLastElementCurrentSelection(Wt::WString txt){
    110     for (int a=0; a< lastElement->count(); a++) {
    111         if (lastElement->itemText(a) == txt) {
    112             lastElement->setCurrentIndex (a);
     111    for (int a=0; a< lastElement_->count(); a++) {
     112        if (lastElement_->itemText(a) == txt) {
     113            lastElement_->setCurrentIndex (a);
    113114            return;
    114115        }
     
    117118
    118119void GWt_sectionToExecute::setSoftwareElementCurrentSelection(Wt::WString txt){
    119   for (int a=0; a< software->count(); a++) {
    120     if (software->itemText(a) == txt) {
    121       software->setCurrentIndex (a);
     120  for (int a=0; a< softElement_->count(); a++) {
     121    if (softElement_->itemText(a) == txt) {
     122      softElement_->setCurrentIndex (a);
    122123      return;
    123124    }
     
    140141}
    141142
    142 /*
    143  void GWt_sectionToExecute::setSoftware(nomDeLogiciel logiciel)
     143
     144 void GWt_sectionToExecute::setSoftware()
    144145{
    145   UI_sector_->getSectorControler()->setSoftware(logiciel);
    146 
     146  section_->setSoftware(softElement_->currentText().toUTF8());
     147  UIsector_->getBeamLineWidget()->buildBeamLineWidget();
    147148}
    148149
    149 */
Note: See TracChangeset for help on using the changeset viewer.