author | zecke <zecke> | 2004-04-07 23:33:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-07 23:33:48 (UTC) |
commit | 61cb9c9ad238e5aec6aaa1384549e0aab99d14bf (patch) (side-by-side diff) | |
tree | b96da732386aa45060bd80890cd7466cbcf77afb /noncore/graphics/opie-eye/lib | |
parent | 0a21abab4eed64d17c4b1475569194117dab709c (diff) | |
download | opie-61cb9c9ad238e5aec6aaa1384549e0aab99d14bf.zip opie-61cb9c9ad238e5aec6aaa1384549e0aab99d14bf.tar.gz opie-61cb9c9ad238e5aec6aaa1384549e0aab99d14bf.tar.bz2 |
First version of the zoomer placement still needs some work though
-rw-r--r-- | noncore/graphics/opie-eye/lib/oimagezoomer.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/noncore/graphics/opie-eye/lib/oimagezoomer.cpp b/noncore/graphics/opie-eye/lib/oimagezoomer.cpp index 178fbd4..ffa3c0c 100644 --- a/noncore/graphics/opie-eye/lib/oimagezoomer.cpp +++ b/noncore/graphics/opie-eye/lib/oimagezoomer.cpp @@ -28,2 +28,6 @@ OImageZoomer::OImageZoomer( const QSize& pSize, const QSize& vSize, QWidget* par +OImageZoomer::~OImageZoomer() { + +} + void OImageZoomer::init() { @@ -95,3 +99,3 @@ void OImageZoomer::drawContents( QPainter* p ) { void OImageZoomer::mousePressEvent( QMouseEvent* ) { - + m_mouseX = m_mouseY = -1; } @@ -104,6 +108,6 @@ void OImageZoomer::mouseMoveEvent( QMouseEvent* ev ) { if ( m_mouseX != -1 && m_mouseY != -1 ) { - int diffx = m_mouseX-mx; - int diffy = m_mouseY-my; -// emit zoomAreaRel( diffx, diffy ); -// emit zoomArea( + int diffx = ( mx - m_mouseX ) * m_imgSize.width() / width(); + int diffy = ( my - m_mouseY ) * m_imgSize.height() / height(); + emit zoomAreaRel( diffx, diffy ); + emit zoomArea(m_visPt.x()+diffx, m_visPt.y()+diffy ); } |