[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1596: If we're building with Qt 4.2, use the open and closed hand (trunk/src/gui/network)
Author: edmanm
Date: 2007-01-17 23:40:45 -0500 (Wed, 17 Jan 2007)
New Revision: 1596
Modified:
trunk/src/gui/network/zimageview.cpp
Log:
If we're building with Qt 4.2, use the open and closed hand cursors in
ZImageView when panning.
Modified: trunk/src/gui/network/zimageview.cpp
===================================================================
--- trunk/src/gui/network/zimageview.cpp 2007-01-18 04:19:33 UTC (rev 1595)
+++ trunk/src/gui/network/zimageview.cpp 2007-01-18 04:40:45 UTC (rev 1596)
@@ -31,7 +31,15 @@
#include "zimageview.h"
+#if QT_VERSION >= 0x040200
+#define CURSOR_NORMAL QCursor(Qt::OpenHandCursor)
+#define CURSOR_MOUSE_PRESS QCursor(Qt::ClosedHandCursor)
+#else
+#define CURSOR_NORMAL QCursor(Qt::CrossCursor)
+#define CURSOR_MOUSE_PRESS QCursor(Qt::SizeAllCursor)
+#endif
+
/** Constructor. */
ZImageView::ZImageView(QWidget *parent)
: QWidget(parent)
@@ -43,7 +51,7 @@
_maxZoomFactor = 2.0;
_padding = 60;
- setCursor(QCursor(Qt::CrossCursor));
+ setCursor(CURSOR_NORMAL);
updateViewport();
resetZoomPoint();
repaint();
@@ -316,7 +324,7 @@
ZImageView::mousePressEvent(QMouseEvent* e)
{
e->accept();
- setCursor(QCursor(Qt::SizeAllCursor));
+ setCursor(CURSOR_MOUSE_PRESS);
_mouseX = e->x();
_mouseY = e->y();
resetZoomPoint();
@@ -326,7 +334,7 @@
void ZImageView::mouseReleaseEvent(QMouseEvent* e)
{
e->accept();
- setCursor(QCursor(Qt::CrossCursor));
+ setCursor(CURSOR_NORMAL);
updateViewport();
resetZoomPoint();
}