Changeset 272 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_draggableImage.cc
- Timestamp:
- Jan 24, 2013, 3:32:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_draggableImage.cc
r257 r272 5 5 6 6 GWt_draggableImage::GWt_draggableImage( 7 const WLink & imageLink,8 const WString & altText,9 WContainerWidget * parent):10 7 const WLink & imageLink, 8 const WString & altText, 9 WContainerWidget * parent): 10 WImage(imageLink,altText,parent) 11 11 { 12 init();12 init(); 13 13 } 14 14 15 15 16 16 GWt_draggableImage::GWt_draggableImage( 17 const WLink & imageLink,18 WContainerWidget * parent):19 17 const WLink & imageLink, 18 WContainerWidget * parent): 19 WImage(imageLink,"Image PSPA",parent) 20 20 { 21 init();21 init(); 22 22 } 23 23 … … 29 29 30 30 void GWt_draggableImage::init(){ 31 changeCursorOnMouseOver_ = true;32 33 // setMouseOverDelay(100);34 mouseWentOver().connect(this, &GWt_draggableImage::mouseOver);35 mouseWentUp().connect(this, &GWt_draggableImage::mouseUp);36 mouseWentDown().connect(this, &GWt_draggableImage::mouseDown);37 mouseWentOut().connect(this, &GWt_draggableImage::mouseOut);38 mouseDragged().connect(this, &GWt_draggableImage::mouseIsDragged);31 changeCursorOnMouseOver_ = true; 32 33 // setMouseOverDelay(100); 34 mouseWentOver().connect(this, &GWt_draggableImage::mouseOver); 35 mouseWentUp().connect(this, &GWt_draggableImage::mouseUp); 36 mouseWentDown().connect(this, &GWt_draggableImage::mouseDown); 37 mouseWentOut().connect(this, &GWt_draggableImage::mouseOut); 38 mouseDragged().connect(this, &GWt_draggableImage::mouseIsDragged); 39 39 } 40 40 41 41 42 42 void GWt_draggableImage::setChangeCursorOnMouseOver(bool change){ 43 changeCursorOnMouseOver_ = change;43 changeCursorOnMouseOver_ = change; 44 44 } 45 45 … … 47 47 void GWt_draggableImage::mouseOver(const WMouseEvent& e) 48 48 { 49 if (changeCursorOnMouseOver_) {50 decorationStyle().setCursor(OpenHandCursor);51 } else {52 decorationStyle().setCursor(ArrowCursor);53 }49 if (changeCursorOnMouseOver_) { 50 decorationStyle().setCursor(OpenHandCursor); 51 } else { 52 decorationStyle().setCursor(ArrowCursor); 53 } 54 54 } 55 55 56 56 void GWt_draggableImage::mouseOut(const WMouseEvent& e) 57 57 { 58 decorationStyle().setCursor(ArrowCursor); 58 decorationStyle().setCursor(ArrowCursor); 59 59 } 60 60
Note: See TracChangeset
for help on using the changeset viewer.