Changeset 239 in PSPA


Ignore:
Timestamp:
Jan 18, 2013, 9:34:38 AM (12 years ago)
Author:
garnier
Message:

modifications de la partie Web, a ameliorer

Location:
Interface_Web
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/branches/insertionsElements/include/GWt_LigneFaisceau.h

    r195 r239  
    4141  void clickEvent(WContainerWidget*);
    4242  void deleteElement(WContainerWidget*);
    43   void addElement(WContainerWidget*);
     43
    4444
    4545};
  • Interface_Web/branches/insertionsElements/src/GWt_LigneFaisceau.cc

    r197 r239  
    8484}
    8585
    86 
    87 void GWt_LigneFaisceau::addElement(WContainerWidget* c){
    88   hbox_->insertWidget(hbox_->count()-1,c);
    89 }
  • Interface_Web/trunk/pspaWT/Doxyfile

    r32 r239  
    17171717# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
    17181718
    1719 DOT_GRAPH_MAX_NODES    = 50
     1719DOT_GRAPH_MAX_NODES    = 1000
    17201720
    17211721# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
  • Interface_Web/trunk/pspaWT/History

    r223 r239  
    66     =========================================================
    77
     818 Janvier 2012  Laurent Garnier
     9- Mise à jour de la partie web (drop zone). Aucune modification majeures,
     10  uniquement des méthodes modifiées en vue de faire mieux. Quelques problèmes
     11  au niveau graphiques à prévoir avec cette modification qui vont être corrigées.
    812
    91321 December 2012  Laurent Garnier
  • Interface_Web/trunk/pspaWT/include/GWt_abstractElement.h

    r229 r239  
    33
    44//#include "GWt_pspaApplication.h"
     5#include "GWt_draggableImage.h"
    56#include "abstractElement.h"
    67
     
    2021
    2122  WDialog* dialog_;
    22   WPushButton* dropped_;
     23  GWt_draggableImage* dropped_;
    2324  WContainerWidget* wc_;
    2425  WText* wc_item_;
     
    3839  void setLabelWidget();
    3940  void updateLabelWidget();
    40   WPushButton* getButton();
     41  GWt_draggableImage* getImage();
    4142  WContainerWidget* getWidget();
    4243  abstractElement* getElement();
  • Interface_Web/trunk/pspaWT/include/GWt_dropZoneLigneFaiseau.h

    r199 r239  
    1515{
    1616 public :
     17  /**
     18     dropZone element
     19     @param pspa : application name
     20     @param linkImage : true/false if the drop zone have to display the link image
     21     @param showInsertMessage : true/false if it has to display the insertMessage at first step
     22   */
    1723
    18   GWt_dropZoneLigneFaiseau(PspaApplication*,bool linkImage = true);
     24  GWt_dropZoneLigneFaiseau(PspaApplication* pspa,bool linkImage = true,bool showInsertMessage = false);
    1925  ~GWt_dropZoneLigneFaiseau();
    2026  void addElement(WContainerWidget* elem);
  • Interface_Web/trunk/pspaWT/include/GWt_tools.h

    r226 r239  
    1616 public :
    1717
    18 static WContainerWidget* console_;
     18  static WContainerWidget* console_;
    1919
    2020
  • Interface_Web/trunk/pspaWT/src/GWt_LigneFaisceau.cc

    r230 r239  
    3636
    3737  // add the first drop zone
    38   hbox_->addWidget(new GWt_dropZoneLigneFaiseau(pspa_,false));
     38  hbox_->addWidget(new GWt_dropZoneLigneFaiseau(pspa_,false,true));
    3939
    4040  // add a strech element at the end
  • Interface_Web/trunk/pspaWT/src/GWt_abstractElement.cc

    r229 r239  
    2525  element_ = elem;
    2626
    27   dropped_ = new WPushButton();
     27  dropped_ = new GWt_draggableImage(element_->getNomdElement().getElementImage());
    2828  dropped_->setObjectName("aPushButton");
    29   dropped_->setIcon(element_->getNomdElement().getElementImage());
     29  //  dropped_->setIcon(element_->getNomdElement().getElementImage());
    3030  dropped_->setMaximumSize(50,37);
    3131  dropped_->clicked().connect(this,&GWt_abstractElement::clicked);
     
    8686}
    8787
    88 WPushButton* GWt_abstractElement::getButton() {
     88GWt_draggableImage* GWt_abstractElement::getImage() {
    8989  return dropped_;
    9090}
  • Interface_Web/trunk/pspaWT/src/GWt_draggableImage.cc

    r223 r239  
    1010  WImage(imageLink,altText,parent)
    1111{
    12 
    1312  init();
    14   std::cout << "GWt_draggableImage OK"<< std::endl;
    15 
    1613}
    1714
     
    2320{
    2421  init();
    25   std::cout << "GWt_draggableImage OK2"<< std::endl;
    2622}
    27 
    2823
    2924
     
    5247void GWt_draggableImage::mouseOver(const WMouseEvent& e)
    5348{
    54 #ifdef PSPA_DEBUG
    55   std::cout << "GWt_draggableImage mouseOver"<< std::endl;
    56 #endif
    5749  if (changeCursorOnMouseOver_) {
    5850    decorationStyle().setCursor(OpenHandCursor);
     
    6456void GWt_draggableImage::mouseOut(const WMouseEvent& e)
    6557{
    66 #ifdef PSPA_DEBUG
    67   std::cout << "GWt_draggableImage mouseOut"<< std::endl;
    68 #endif
    6958    decorationStyle().setCursor(ArrowCursor);
    7059}
     
    7261void GWt_draggableImage::mouseIsDragged(const WMouseEvent& e)
    7362{
    74 #ifdef PSPA_DEBUG
    75   //  pspa_->addConsoleMessage(" GWt_draggableImage::mouseDragged");
    76 #endif
    7763}
    7864
    7965void GWt_draggableImage::mouseUp(const WMouseEvent& e)
    8066{
    81 #ifdef PSPA_DEBUG
    82   //  pspa_->addConsoleMessage("GWt_draggableImage::mouseOut up");
    83 #endif
    8467}
    8568
    8669void GWt_draggableImage::mouseDown(const WMouseEvent& e)
    8770{
    88 #ifdef PSPA_DEBUG
    89   //  pspa_->addConsoleMessage("GWt_draggableImage::mouseDown up");
    90 #endif
    9171}
  • Interface_Web/trunk/pspaWT/src/GWt_dropZoneLigneFaiseau.cc

    r229 r239  
    1010#include <Wt/WImage>
    1111#include <Wt/WHBoxLayout>
    12 
    13 
    14 GWt_dropZoneLigneFaiseau::GWt_dropZoneLigneFaiseau(PspaApplication* ps,bool linkImageOk)
     12#include <Wt/WGridLayout>
     13
     14GWt_dropZoneLigneFaiseau::GWt_dropZoneLigneFaiseau(PspaApplication* ps,bool linkImageOk, bool showInsertMessage)
    1515  : WContainerWidget(),
    1616    pspa_(ps),
     
    3131  mouseDragged().connect(this, &GWt_dropZoneLigneFaiseau::mouseIsDragged);
    3232
    33   insertMessage_ = new WText("Drag an element here");
     33  WContainerWidget* insertMessage_ = new WContainerWidget();
     34  WGridLayout *textGridLayout = new WGridLayout();
     35
     36  WText* insertMessageText = new WText("Drag elements here",insertMessage_);
     37
     38  insertMessageText->decorationStyle().setBorder (WBorder (WBorder::Dashed));
     39  decorationStyle().setBorder (WBorder (WBorder::Dotted));
     40
     41  textGridLayout->addWidget(new WText(" "),0,0);
     42  textGridLayout->addWidget(insertMessageText,1,0);
     43  textGridLayout->addWidget(new WText(" "),2,0);
     44  insertMessage_->setLayout(textGridLayout);
     45
     46  insertMessage_->setContentAlignment(  Wt::AlignCenter |Wt::AlignMiddle );     
     47  textGridLayout->setRowStretch(0, 1);
     48  textGridLayout->setRowStretch(2, 1);
     49
    3450  addWidget(insertMessage_);
    3551  if (linkImageOk) {
     
    3955  }
    4056
    41   insertMessage_->hide();
     57  if (! showInsertMessage) {
     58    insertMessage_->hide();
     59  }
    4260
    4361  // accept drops
     
    5977void GWt_dropZoneLigneFaiseau::mouseOver(const WMouseEvent& e)
    6078{
    61   decorationStyle().setCursor(OpenHandCursor);
    6279  // Add text
     80#ifdef PSPA_DEBUG
     81  printf("button %d\n",WMouseEvent::LeftButton);
     82#endif
    6383  if (insertMessage_) {
    64     if (!abstractElement_) {
    65       insertMessage_->show();
    66       resize(insertMessage_->width(),insertMessage_->height());
     84    // only if mouse is pressed
     85    if (e.button () == WMouseEvent::LeftButton) {
     86      if (!abstractElement_) {
     87        insertMessage_->show();
     88        resize(insertMessage_->width(),insertMessage_->height());
     89      }
    6790    } else {
    68       decorationStyle().setCursor(OpenHandCursor);
     91#ifdef PSPA_DEBUG
     92      GWt_tools::addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOver but no button press");
     93#endif
    6994    }
    7095  }
     
    94119    linkImage_->show();
    95120  }
    96   decorationStyle().setCursor(ArrowCursor);
    97121
    98122#ifdef PSPA_DEBUG
     
    170194  WSignalMapper<GWt_abstractElement *> *mapper= new WSignalMapper<GWt_abstractElement *>(this);
    171195  mapper->mapped().connect(this,&GWt_dropZoneLigneFaiseau::onClick);
    172   mapper->mapConnect(insertedAbstractElement->getButton()->doubleClicked(),insertedAbstractElement);
     196  mapper->mapConnect(insertedAbstractElement->getImage()->doubleClicked(),insertedAbstractElement);
    173197
    174198  //////////////////////////////////////////////////////////////////
  • Interface_Web/trunk/pspaWT/src/beam2Moments.cc

    r236 r239  
    9090    getline(inp, buf);
    9191    stringstream str(buf);
    92     test = str >> bidon >>  bidString >>  bidon >>  ( rij_secondOrderMoments_.at(0) ).at(0) >> bidString;
     92//    test = str >> bidon >>  bidString >>  bidon >>  ( rij_secondOrderMoments_.at(0) ).at(0) >> bidString;
    9393    cout << " beam2Moments::readFromTransportOutput TEST= " << test << endl;
    9494  }
Note: See TracChangeset for help on using the changeset viewer.