[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1597: Remove a couple more bits of ZImageView that we don't need. (trunk/src/gui/network)
Author: edmanm
Date: 2007-01-18 21:55:01 -0500 (Thu, 18 Jan 2007)
New Revision: 1597
Modified:
trunk/src/gui/network/zimageview.cpp
trunk/src/gui/network/zimageview.h
Log:
Remove a couple more bits of ZImageView that we don't need.
Modified: trunk/src/gui/network/zimageview.cpp
===================================================================
--- trunk/src/gui/network/zimageview.cpp 2007-01-18 04:40:45 UTC (rev 1596)
+++ trunk/src/gui/network/zimageview.cpp 2007-01-19 02:55:01 UTC (rev 1597)
@@ -162,7 +162,7 @@
}
/** Updates the displayed viewport. */
-QPair<QRect, QRect>
+void
ZImageView::updateViewport(int screendx, int screendy)
{
/* The gist of this is to find the biggest and smallest possible viewports,
@@ -264,9 +264,6 @@
}
_view.translate(int(vdx), int(vdy));
-
- return QPair<QRect, QRect>(QRect(0, 0, int(newmaxw), int(newmaxh)),
- QRect(0, 0, int(newminw), int(newminh)));
}
/** Resets the zoom point back to the center of the viewport. */
@@ -305,14 +302,14 @@
repaint();
}
-/** Zooms into the image by 5% */
+/** Zooms into the image by 10% */
void
ZImageView::zoomIn()
{
zoom(_zoom + .1);
}
-/** Zooms away from the image by 5% */
+/** Zooms away from the image by 10% */
void
ZImageView::zoomOut()
{
@@ -327,7 +324,6 @@
setCursor(CURSOR_MOUSE_PRESS);
_mouseX = e->x();
_mouseY = e->y();
- resetZoomPoint();
}
/** Responds to the user releasing a mouse button. */
@@ -355,10 +351,3 @@
}
}
-/** Handles the event indicating the widget has been resized. */
-void
-ZImageView::resizeEvent(QResizeEvent* e)
-{
- QWidget::resizeEvent(e);
-}
-
Modified: trunk/src/gui/network/zimageview.h
===================================================================
--- trunk/src/gui/network/zimageview.h 2007-01-18 04:40:45 UTC (rev 1596)
+++ trunk/src/gui/network/zimageview.h 2007-01-19 02:55:01 UTC (rev 1597)
@@ -29,7 +29,6 @@
#define ZIMAGEVIEW_H
#include <QImage>
-#include <QFrame>
#include <QPixmap>
#include <QWidget>
@@ -68,18 +67,13 @@
virtual void mouseReleaseEvent(QMouseEvent* e);
/** Handles the user moving the mouse. */
virtual void mouseMoveEvent(QMouseEvent* e);
- /** Handles events where the widget is resized. */
- virtual void resizeEvent(QResizeEvent* e);
/** Update the viewport. This will set _view to a region that,
* when copied from the image and scaled to the screen size, will
* show what is expected. The _view may be larger in one or more
* directions than the image, and you must deal with the
- * non-overlapping regions.
- *
- * Returns the _zoom==0.0 viewport rect (the max) and the
- * _zoom==1.0 viewport rect (the min). */
- QPair<QRect, QRect> updateViewport(int screendx=0, int screendy=0);
+ * non-overlapping regions. */
+ void updateViewport(int screendx=0, int screendy=0);
/** Redraws the scaled image in the viewport. */
void drawScaledImage();