Changeset 165 for smplayer/trunk/src/skingui/panelseeker.cpp
- Timestamp:
- May 16, 2014, 9:51:55 AM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 163
- Property svn:mergeinfo changed
-
smplayer/trunk/src/skingui/panelseeker.cpp
r142 r165 1 /* umplayer, GUI front-end for mplayer. 2 Copyright (C) 2010 Ori Rejwan 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> 3 umplayer, Copyright (C) 2010 Ori Rejwan 3 4 4 5 This program is free software; you can redistribute it and/or modify … … 80 81 81 82 void PanelSeeker::setKnobIcon( QPixmap pix ) 82 { 83 { 83 84 int w = pix.width(); 84 85 int h = pix.height(); … … 88 89 knobPix.setPixmap(pix.copy(0, 3*h/4, w, h/4 ), MyIcon::Disabled, MyIcon::Off); 89 90 knobCurrentPix = knobPix.pixmap(MyIcon::Normal, MyIcon::Off); 90 setSliderValue(minimum());91 /* setSliderValue(minimum()); */ 91 92 setState(Normal, true); 92 93 } 93 94 95 /* 94 96 void PanelSeeker::setSingleKnobIcon(QPixmap pix) 95 97 { … … 101 103 setState(Normal, true); 102 104 } 105 */ 103 106 104 107 void PanelSeeker::mousePressEvent(QMouseEvent *m) … … 108 111 if(m->button() == Qt::LeftButton) 109 112 { 113 #if QT_VERSION >= 0x050000 114 QPointF pos = m->localPos(); 115 #else 110 116 QPointF pos = m->posF(); 117 #endif 111 118 if(knobRect.contains(pos)) 112 119 { … … 120 127 { 121 128 isPressed = false; 129 #if QT_VERSION >= 0x050000 130 knobAdjust( m->localPos().x() - knobRect.center().x(), true); 131 #else 122 132 knobAdjust( m->posF().x() - knobRect.center().x(), true); 133 #endif 123 134 } 124 135 } … … 130 141 if(isPressed) 131 142 { 132 knobAdjust(m->posF().x() - knobRect.center().x() - mousePressDifference ); 143 #if QT_VERSION >= 0x050000 144 knobAdjust(m->localPos().x() - knobRect.center().x() - mousePressDifference ); 145 #else 146 knobAdjust(m->posF().x() - knobRect.center().x() - mousePressDifference ); 147 #endif 133 148 } 134 149 }
Note:
See TracChangeset
for help on using the changeset viewer.