author | zecke <zecke> | 2004-09-10 11:05:37 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-10 11:05:37 (UTC) |
commit | d416ff23ea50303173d07ea243498a163f5995b5 (patch) (unidiff) | |
tree | 8ab861514fd1dc87c509e6ac988ed683f82370ec /libopie2/opiemm/oimagezoomer.cpp | |
parent | 224c96feb94acd6a87e1a2463aca9726afe925ef (diff) | |
download | opie-d416ff23ea50303173d07ea243498a163f5995b5.zip opie-d416ff23ea50303173d07ea243498a163f5995b5.tar.gz opie-d416ff23ea50303173d07ea243498a163f5995b5.tar.bz2 |
The usual... fix warnings about unused parameters
Diffstat (limited to 'libopie2/opiemm/oimagezoomer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiemm/oimagezoomer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiemm/oimagezoomer.cpp b/libopie2/opiemm/oimagezoomer.cpp index d1eec67..b7ef238 100644 --- a/libopie2/opiemm/oimagezoomer.cpp +++ b/libopie2/opiemm/oimagezoomer.cpp | |||
@@ -177,49 +177,49 @@ void OImageZoomer::drawContents( QPainter* p ) { | |||
177 | p->setPen( Qt::red ); | 177 | p->setPen( Qt::red ); |
178 | 178 | ||
179 | /* | 179 | /* |
180 | * the contentRect is set equal to the size of the image | 180 | * the contentRect is set equal to the size of the image |
181 | * Rect/Original = NewRectORWidth/OriginalVisibleStuff and then simply we | 181 | * Rect/Original = NewRectORWidth/OriginalVisibleStuff and then simply we |
182 | * need to add the c.y/x due usage of QFrame | 182 | * need to add the c.y/x due usage of QFrame |
183 | * For x and y we use the visiblePoint | 183 | * For x and y we use the visiblePoint |
184 | * For height and width we use the size of the viewport | 184 | * For height and width we use the size of the viewport |
185 | * if width/height would be bigger than our widget we use this width/height | 185 | * if width/height would be bigger than our widget we use this width/height |
186 | * | 186 | * |
187 | */ | 187 | */ |
188 | int len = m_imgSize.width(); | 188 | int len = m_imgSize.width(); |
189 | int x = (c.width()*m_visPt.x())/len + c.x(); | 189 | int x = (c.width()*m_visPt.x())/len + c.x(); |
190 | int w = (c.width()*m_visSize.width() )/len + c.x(); | 190 | int w = (c.width()*m_visSize.width() )/len + c.x(); |
191 | if ( w > c.width() ) w = c.width(); | 191 | if ( w > c.width() ) w = c.width(); |
192 | 192 | ||
193 | len = m_imgSize.height(); | 193 | len = m_imgSize.height(); |
194 | int y = (c.height()*m_visPt.y() )/len + c.y(); | 194 | int y = (c.height()*m_visPt.y() )/len + c.y(); |
195 | int h = (c.height()*m_visSize.height() )/len + c.y(); | 195 | int h = (c.height()*m_visSize.height() )/len + c.y(); |
196 | if ( h > c.height() ) h = c.height(); | 196 | if ( h > c.height() ) h = c.height(); |
197 | 197 | ||
198 | p->drawRect( x, y, w, h ); | 198 | p->drawRect( x, y, w, h ); |
199 | } | 199 | } |
200 | 200 | ||
201 | void OImageZoomer::mousePressEvent( QMouseEvent*ev) { | 201 | void OImageZoomer::mousePressEvent( QMouseEvent*) { |
202 | m_mouseX = m_mouseY = -1; | 202 | m_mouseX = m_mouseY = -1; |
203 | m_mevent = true; | 203 | m_mevent = true; |
204 | } | 204 | } |
205 | 205 | ||
206 | void OImageZoomer::mouseReleaseEvent( QMouseEvent*ev) { | 206 | void OImageZoomer::mouseReleaseEvent( QMouseEvent*ev) { |
207 | if (!m_mevent) return; | 207 | if (!m_mevent) return; |
208 | int mx, my; | 208 | int mx, my; |
209 | mx = ev->x(); | 209 | mx = ev->x(); |
210 | my = ev->y(); | 210 | my = ev->y(); |
211 | int diffx = (mx) * m_imgSize.width() / width(); | 211 | int diffx = (mx) * m_imgSize.width() / width(); |
212 | int diffy = (my) * m_imgSize.height() / height(); | 212 | int diffy = (my) * m_imgSize.height() / height(); |
213 | emit zoomArea(diffx,diffy); | 213 | emit zoomArea(diffx,diffy); |
214 | } | 214 | } |
215 | 215 | ||
216 | void OImageZoomer::mouseMoveEvent( QMouseEvent* ev ) { | 216 | void OImageZoomer::mouseMoveEvent( QMouseEvent* ev ) { |
217 | int mx, my; | 217 | int mx, my; |
218 | mx = ev->x(); | 218 | mx = ev->x(); |
219 | my = ev->y(); | 219 | my = ev->y(); |
220 | 220 | ||
221 | if ( m_mouseX != -1 && m_mouseY != -1 ) { | 221 | if ( m_mouseX != -1 && m_mouseY != -1 ) { |
222 | m_mevent = false; | 222 | m_mevent = false; |
223 | int diffx = ( mx - m_mouseX ) * m_imgSize.width() / width(); | 223 | int diffx = ( mx - m_mouseX ) * m_imgSize.width() / width(); |
224 | int diffy = ( my - m_mouseY ) * m_imgSize.height() / height(); | 224 | int diffy = ( my - m_mouseY ) * m_imgSize.height() / height(); |
225 | emit zoomAreaRel( diffx, diffy ); | 225 | emit zoomAreaRel( diffx, diffy ); |