Changeset 301 in PSPA


Ignore:
Timestamp:
Jan 30, 2013, 4:40:18 PM (11 years ago)
Author:
garnier
Message:

Correction du bug #11

Location:
Interface_Web/trunk/pspaWT
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/History

    r299 r301  
    1212- GWt_LigneFaisceau,GWt_abstractElement :
    1313   Possibilité de suppression d'un élement par double-click sur celui-ci
    14 - GWt_elementLigneFaisceau : Ajout d'une méthode pour récupérer l'abstract element
     14- GWt_elementLigneFaisceau :
     15 o  Ajout d'une méthode pour récupérer l'abstract element
     16 o Suppresion de méthode inutile
     17- Correction du bug #11
    1518
    161929 janvier 2013 Guy Le Meur
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h

    r299 r301  
    22#define GWt_elementLigneFaisceau_SEEN
    33
    4 #include "GWt_dialog.h"
    54#include "abstractElement.h"
    65#include "GWt_abstractElement.h"
     
    6362private:
    6463   
    65     void onClick(GWt_abstractElement*);
    6664    void removeDone(GWt_abstractElement*);
    6765    std::string getElementNumberInBeamLine(nomdElements el);
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc

    r300 r301  
    2222#include <Wt/WBreak>
    2323#include <Wt/WApplication>
     24#include <Wt/WMessageBox>
    2425
    2526GWt_abstractElement::GWt_abstractElement(abstractElement* elem)
     
    103104void GWt_abstractElement::doubleClicked()
    104105{
    105     GWt_dialog warningDialog("PSPA : Delete element",WString("Delete '")+WString(getElement()->getLabel())+"' ?", GWt_dialog::Warning,true,true);
    106     warningDialog.exec();
     106    StandardButton result = WMessageBox::show("PSPA : Delete element", WString("Delete '")+WString(getElement()->getLabel())+"' ?", Ok | Cancel);
    107107
     108    if (result == Cancel ) {
     109        return;
     110    }
    108111    // get LigneFaiseau widget and add new elementLigneFaiseau
    109112    GWt_LigneFaisceau* ligneFaisceau = NULL;
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_dialog.cc

    r299 r301  
    9696       
    9797        // this event will accept() the Dialog
    98         ok->clicked().connect(this, &Wt::WDialog::accept); 
     98        ok->clicked().connect(this, &Wt::WDialog::accept);
    9999    }
    100100   
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc

    r299 r301  
    148148GWt_elementLigneFaisceau::~GWt_elementLigneFaisceau()
    149149{
    150 }
    151 
    152 
    153 void GWt_elementLigneFaisceau::onClick(GWt_abstractElement* gw)
    154 {
    155     cout << "mouse key was double clicked on this widget " << gw->getWidget()->id()<< endl;
    156    
    157     messageDropZone_ = new GWt_dialog("Question","Are you sure you want to delete the selected item?",GWt_dialog::Warning,true,true);
    158    
    159     WSignalMapper<GWt_abstractElement *> *MyMap = new WSignalMapper<GWt_abstractElement *>(this);
    160     MyMap->mapped().connect(this, &GWt_elementLigneFaisceau::removeDone);
    161     MyMap->mapConnect(messageDropZone_->finished(),gw);
    162     messageDropZone_->exec();
    163150}
    164151
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc

    r299 r301  
    88#include "GWt_soleno.h"
    99#include "GWt_bend.h"
    10 #include "GWt_dialog.h"
    1110
    1211#include "mixedTools.h"
Note: See TracChangeset for help on using the changeset viewer.