Changeset 239 in PSPA
- Timestamp:
- Jan 18, 2013, 9:34:38 AM (12 years ago)
- Location:
- Interface_Web
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/branches/insertionsElements/include/GWt_LigneFaisceau.h
r195 r239 41 41 void clickEvent(WContainerWidget*); 42 42 void deleteElement(WContainerWidget*); 43 void addElement(WContainerWidget*); 43 44 44 45 45 }; -
Interface_Web/branches/insertionsElements/src/GWt_LigneFaisceau.cc
r197 r239 84 84 } 85 85 86 87 void GWt_LigneFaisceau::addElement(WContainerWidget* c){88 hbox_->insertWidget(hbox_->count()-1,c);89 } -
Interface_Web/trunk/pspaWT/Doxyfile
r32 r239 1717 1717 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 1718 1718 1719 DOT_GRAPH_MAX_NODES = 501719 DOT_GRAPH_MAX_NODES = 1000 1720 1720 1721 1721 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -
Interface_Web/trunk/pspaWT/History
r223 r239 6 6 ========================================================= 7 7 8 18 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. 8 12 9 13 21 December 2012 Laurent Garnier -
Interface_Web/trunk/pspaWT/include/GWt_abstractElement.h
r229 r239 3 3 4 4 //#include "GWt_pspaApplication.h" 5 #include "GWt_draggableImage.h" 5 6 #include "abstractElement.h" 6 7 … … 20 21 21 22 WDialog* dialog_; 22 WPushButton* dropped_;23 GWt_draggableImage* dropped_; 23 24 WContainerWidget* wc_; 24 25 WText* wc_item_; … … 38 39 void setLabelWidget(); 39 40 void updateLabelWidget(); 40 WPushButton* getButton();41 GWt_draggableImage* getImage(); 41 42 WContainerWidget* getWidget(); 42 43 abstractElement* getElement(); -
Interface_Web/trunk/pspaWT/include/GWt_dropZoneLigneFaiseau.h
r199 r239 15 15 { 16 16 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 */ 17 23 18 GWt_dropZoneLigneFaiseau(PspaApplication* ,bool linkImage = true);24 GWt_dropZoneLigneFaiseau(PspaApplication* pspa,bool linkImage = true,bool showInsertMessage = false); 19 25 ~GWt_dropZoneLigneFaiseau(); 20 26 void addElement(WContainerWidget* elem); -
Interface_Web/trunk/pspaWT/include/GWt_tools.h
r226 r239 16 16 public : 17 17 18 staticWContainerWidget* console_;18 static WContainerWidget* console_; 19 19 20 20 -
Interface_Web/trunk/pspaWT/src/GWt_LigneFaisceau.cc
r230 r239 36 36 37 37 // add the first drop zone 38 hbox_->addWidget(new GWt_dropZoneLigneFaiseau(pspa_,false ));38 hbox_->addWidget(new GWt_dropZoneLigneFaiseau(pspa_,false,true)); 39 39 40 40 // add a strech element at the end -
Interface_Web/trunk/pspaWT/src/GWt_abstractElement.cc
r229 r239 25 25 element_ = elem; 26 26 27 dropped_ = new WPushButton();27 dropped_ = new GWt_draggableImage(element_->getNomdElement().getElementImage()); 28 28 dropped_->setObjectName("aPushButton"); 29 dropped_->setIcon(element_->getNomdElement().getElementImage());29 // dropped_->setIcon(element_->getNomdElement().getElementImage()); 30 30 dropped_->setMaximumSize(50,37); 31 31 dropped_->clicked().connect(this,&GWt_abstractElement::clicked); … … 86 86 } 87 87 88 WPushButton* GWt_abstractElement::getButton() {88 GWt_draggableImage* GWt_abstractElement::getImage() { 89 89 return dropped_; 90 90 } -
Interface_Web/trunk/pspaWT/src/GWt_draggableImage.cc
r223 r239 10 10 WImage(imageLink,altText,parent) 11 11 { 12 13 12 init(); 14 std::cout << "GWt_draggableImage OK"<< std::endl;15 16 13 } 17 14 … … 23 20 { 24 21 init(); 25 std::cout << "GWt_draggableImage OK2"<< std::endl;26 22 } 27 28 23 29 24 … … 52 47 void GWt_draggableImage::mouseOver(const WMouseEvent& e) 53 48 { 54 #ifdef PSPA_DEBUG55 std::cout << "GWt_draggableImage mouseOver"<< std::endl;56 #endif57 49 if (changeCursorOnMouseOver_) { 58 50 decorationStyle().setCursor(OpenHandCursor); … … 64 56 void GWt_draggableImage::mouseOut(const WMouseEvent& e) 65 57 { 66 #ifdef PSPA_DEBUG67 std::cout << "GWt_draggableImage mouseOut"<< std::endl;68 #endif69 58 decorationStyle().setCursor(ArrowCursor); 70 59 } … … 72 61 void GWt_draggableImage::mouseIsDragged(const WMouseEvent& e) 73 62 { 74 #ifdef PSPA_DEBUG75 // pspa_->addConsoleMessage(" GWt_draggableImage::mouseDragged");76 #endif77 63 } 78 64 79 65 void GWt_draggableImage::mouseUp(const WMouseEvent& e) 80 66 { 81 #ifdef PSPA_DEBUG82 // pspa_->addConsoleMessage("GWt_draggableImage::mouseOut up");83 #endif84 67 } 85 68 86 69 void GWt_draggableImage::mouseDown(const WMouseEvent& e) 87 70 { 88 #ifdef PSPA_DEBUG89 // pspa_->addConsoleMessage("GWt_draggableImage::mouseDown up");90 #endif91 71 } -
Interface_Web/trunk/pspaWT/src/GWt_dropZoneLigneFaiseau.cc
r229 r239 10 10 #include <Wt/WImage> 11 11 #include <Wt/WHBoxLayout> 12 13 14 GWt_dropZoneLigneFaiseau::GWt_dropZoneLigneFaiseau(PspaApplication* ps,bool linkImageOk )12 #include <Wt/WGridLayout> 13 14 GWt_dropZoneLigneFaiseau::GWt_dropZoneLigneFaiseau(PspaApplication* ps,bool linkImageOk, bool showInsertMessage) 15 15 : WContainerWidget(), 16 16 pspa_(ps), … … 31 31 mouseDragged().connect(this, &GWt_dropZoneLigneFaiseau::mouseIsDragged); 32 32 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 34 50 addWidget(insertMessage_); 35 51 if (linkImageOk) { … … 39 55 } 40 56 41 insertMessage_->hide(); 57 if (! showInsertMessage) { 58 insertMessage_->hide(); 59 } 42 60 43 61 // accept drops … … 59 77 void GWt_dropZoneLigneFaiseau::mouseOver(const WMouseEvent& e) 60 78 { 61 decorationStyle().setCursor(OpenHandCursor);62 79 // Add text 80 #ifdef PSPA_DEBUG 81 printf("button %d\n",WMouseEvent::LeftButton); 82 #endif 63 83 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 } 67 90 } else { 68 decorationStyle().setCursor(OpenHandCursor); 91 #ifdef PSPA_DEBUG 92 GWt_tools::addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOver but no button press"); 93 #endif 69 94 } 70 95 } … … 94 119 linkImage_->show(); 95 120 } 96 decorationStyle().setCursor(ArrowCursor);97 121 98 122 #ifdef PSPA_DEBUG … … 170 194 WSignalMapper<GWt_abstractElement *> *mapper= new WSignalMapper<GWt_abstractElement *>(this); 171 195 mapper->mapped().connect(this,&GWt_dropZoneLigneFaiseau::onClick); 172 mapper->mapConnect(insertedAbstractElement->get Button()->doubleClicked(),insertedAbstractElement);196 mapper->mapConnect(insertedAbstractElement->getImage()->doubleClicked(),insertedAbstractElement); 173 197 174 198 ////////////////////////////////////////////////////////////////// -
Interface_Web/trunk/pspaWT/src/beam2Moments.cc
r236 r239 90 90 getline(inp, buf); 91 91 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; 93 93 cout << " beam2Moments::readFromTransportOutput TEST= " << test << endl; 94 94 }
Note: See TracChangeset
for help on using the changeset viewer.