diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-06-24 12:02:41 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-06-24 12:47:13 (GMT) |
commit | 1e88fd57c693db1e4b6f0c42a2c05fad935fb4b9 (patch) | |
tree | 54fb226c3931f008181e7163476bfce06807362a /src/plugins/platforms | |
parent | 3a34a71c6f70a709ac494e65d465dcd4e346ccbb (diff) | |
download | Qt-1e88fd57c693db1e4b6f0c42a2c05fad935fb4b9.zip Qt-1e88fd57c693db1e4b6f0c42a2c05fad935fb4b9.tar.gz Qt-1e88fd57c693db1e4b6f0c42a2c05fad935fb4b9.tar.bz2 |
Refactored QGraphicsSystemCursor -> QPlatformCursor
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbcursor.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbcursor.h | 6 | ||||
-rw-r--r-- | src/plugins/platforms/fb_base/fb_base.cpp | 24 | ||||
-rw-r--r-- | src/plugins/platforms/fb_base/fb_base.h | 10 | ||||
-rw-r--r-- | src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/testlite/qtestliteintegration.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/vnc/qvnccursor.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/vnc/qvnccursor.h | 2 |
8 files changed, 30 insertions, 30 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp index 2edae45..f2c9f35 100644 --- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp +++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp @@ -3,10 +3,10 @@ QDirectFBCursor::QDirectFBCursor(QPlatformScreen* screen) : - QGraphicsSystemCursor(screen), surface(0) + QPlatformCursor(screen), surface(0) { QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, &m_layer); - image = new QGraphicsSystemCursorImage(0, 0, 0, 0, 0, 0); + image = new QPlatformCursorImage(0, 0, 0, 0, 0, 0); } void QDirectFBCursor::changeCursor(QCursor * cursor, QWidget * widget) diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.h b/src/plugins/platforms/directfb/qdirectfbcursor.h index 1566e7c..6aecb16 100644 --- a/src/plugins/platforms/directfb/qdirectfbcursor.h +++ b/src/plugins/platforms/directfb/qdirectfbcursor.h @@ -1,12 +1,12 @@ #ifndef QDIRECTFBCURSOR_H #define QDIRECTFBCURSOR_H -#include <QGraphicsSystemCursor> +#include <QPlatformCursor> #include <directfb.h> class QDirectFbScreen; class QDirectFbBlitter; -class QDirectFBCursor : public QGraphicsSystemCursor +class QDirectFBCursor : public QPlatformCursor { public: QDirectFBCursor(QPlatformScreen *screem); @@ -15,7 +15,7 @@ public: private: IDirectFBDisplayLayer * m_layer; IDirectFBSurface * surface; - QGraphicsSystemCursorImage * image; + QPlatformCursorImage * image; QDirectFbBlitter *blitter; }; diff --git a/src/plugins/platforms/fb_base/fb_base.cpp b/src/plugins/platforms/fb_base/fb_base.cpp index 213a710..ef7ab02 100644 --- a/src/plugins/platforms/fb_base/fb_base.cpp +++ b/src/plugins/platforms/fb_base/fb_base.cpp @@ -3,17 +3,17 @@ #include <qpainter.h> #include <qdebug.h> #include <qbitmap.h> -#include <QGraphicsSystemCursor> +#include <QPlatformCursor> #include <QWindowSystemInterface> -QGraphicsSystemSoftwareCursor::QGraphicsSystemSoftwareCursor(QPlatformScreen *scr) - : QGraphicsSystemCursor(scr), currentRect(QRect()), prevRect(QRect()) +QPlatformSoftwareCursor::QPlatformSoftwareCursor(QPlatformScreen *scr) + : QPlatformCursor(scr), currentRect(QRect()), prevRect(QRect()) { - graphic = new QGraphicsSystemCursorImage(0, 0, 0, 0, 0, 0); + graphic = new QPlatformCursorImage(0, 0, 0, 0, 0, 0); setCursor(Qt::ArrowCursor); } -QRect QGraphicsSystemSoftwareCursor::getCurrentRect() +QRect QPlatformSoftwareCursor::getCurrentRect() { QRect rect = graphic->image()->rect().translated(-graphic->hotspot().x(), -graphic->hotspot().y()); @@ -24,7 +24,7 @@ QRect QGraphicsSystemSoftwareCursor::getCurrentRect() } -void QGraphicsSystemSoftwareCursor::pointerEvent(const QMouseEvent & e) +void QPlatformSoftwareCursor::pointerEvent(const QMouseEvent & e) { Q_UNUSED(e); QPoint screenOffset = screen->geometry().topLeft(); @@ -35,7 +35,7 @@ void QGraphicsSystemSoftwareCursor::pointerEvent(const QMouseEvent & e) } } -QRect QGraphicsSystemSoftwareCursor::drawCursor(QPainter & painter) +QRect QPlatformSoftwareCursor::drawCursor(QPainter & painter) { dirty = false; if (currentRect.isNull()) @@ -53,7 +53,7 @@ QRect QGraphicsSystemSoftwareCursor::drawCursor(QPainter & painter) return prevRect; } -QRect QGraphicsSystemSoftwareCursor::dirtyRect() +QRect QPlatformSoftwareCursor::dirtyRect() { if (onScreen) { onScreen = false; @@ -62,22 +62,22 @@ QRect QGraphicsSystemSoftwareCursor::dirtyRect() return QRect(); } -void QGraphicsSystemSoftwareCursor::setCursor(Qt::CursorShape shape) +void QPlatformSoftwareCursor::setCursor(Qt::CursorShape shape) { graphic->set(shape); } -void QGraphicsSystemSoftwareCursor::setCursor(const QImage * image, int hotx, int hoty) +void QPlatformSoftwareCursor::setCursor(const QImage * image, int hotx, int hoty) { graphic->set(image, hotx, hoty); } -void QGraphicsSystemSoftwareCursor::setCursor(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY) +void QPlatformSoftwareCursor::setCursor(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY) { graphic->set(data, mask, width, height, hotX, hotY); } -void QGraphicsSystemSoftwareCursor::changeCursor(QCursor * widgetCursor, QWidget * widget) +void QPlatformSoftwareCursor::changeCursor(QCursor * widgetCursor, QWidget * widget) { Q_UNUSED(widget); Qt::CursorShape shape = widgetCursor->shape(); diff --git a/src/plugins/platforms/fb_base/fb_base.h b/src/plugins/platforms/fb_base/fb_base.h index 3b5075d..10f292e 100644 --- a/src/plugins/platforms/fb_base/fb_base.h +++ b/src/plugins/platforms/fb_base/fb_base.h @@ -5,7 +5,7 @@ #include <qimage.h> #include <qtimer.h> #include <qpainter.h> -#include <QGraphicsSystemCursor> +#include <QPlatformCursor> #include <QPlatformScreen> #include <QPlatformWindow> #include <QtGui/private/qwindowsurface_p.h> @@ -16,10 +16,10 @@ class QPainter; class QFbScreen; -class QGraphicsSystemSoftwareCursor : public QGraphicsSystemCursor +class QPlatformSoftwareCursor : public QPlatformCursor { public: - QGraphicsSystemSoftwareCursor(QPlatformScreen * scr); + QPlatformSoftwareCursor(QPlatformScreen * scr); // output methods QRect dirtyRect(); @@ -35,7 +35,7 @@ public: virtual QRect lastPainted() { return prevRect; } protected: - QGraphicsSystemCursorImage * graphic; + QPlatformCursorImage * graphic; private: void setCursor(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY); @@ -142,7 +142,7 @@ public: protected: QList<QFbWindow *> windowStack; QRegion repaintRegion; - QGraphicsSystemSoftwareCursor * cursor; + QPlatformSoftwareCursor * cursor; QTimer redrawTimer; protected slots: diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index f79f956..437af81 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -811,7 +811,7 @@ QLinuxFbScreen::QLinuxFbScreen(uchar * d, int w, mFormat); mFbScreenImage = new QImage(data, mGeometry.width(), mGeometry.height(), bytesPerLine, mFormat); - cursor = new QGraphicsSystemSoftwareCursor(this); + cursor = new QPlatformSoftwareCursor(this); } void QLinuxFbScreen::setGeometry(QRect rect) diff --git a/src/plugins/platforms/testlite/qtestliteintegration.cpp b/src/plugins/platforms/testlite/qtestliteintegration.cpp index 46f2384..3f500c0 100644 --- a/src/plugins/platforms/testlite/qtestliteintegration.cpp +++ b/src/plugins/platforms/testlite/qtestliteintegration.cpp @@ -46,7 +46,7 @@ #include <QtGui/private/qpixmap_raster_p.h> #include <QtCore/qdebug.h> -#include <QGraphicsSystemCursor> +#include <QPlatformCursor> #include "qtestlitewindow.h" @@ -59,10 +59,10 @@ QT_BEGIN_NAMESPACE -class MyCursor : QGraphicsSystemCursor +class MyCursor : QPlatformCursor { public: - MyCursor(QPlatformScreen *screen) : QGraphicsSystemCursor(screen) {} + MyCursor(QPlatformScreen *screen) : QPlatformCursor(screen) {} void changeCursor(QCursor * cursor, QWidget * widget) { QTestLiteWindow *w = 0; diff --git a/src/plugins/platforms/vnc/qvnccursor.cpp b/src/plugins/platforms/vnc/qvnccursor.cpp index 72dcb25..e83696d 100644 --- a/src/plugins/platforms/vnc/qvnccursor.cpp +++ b/src/plugins/platforms/vnc/qvnccursor.cpp @@ -54,13 +54,13 @@ QT_BEGIN_NAMESPACE QVNCCursor::QVNCCursor(QVNCServer * srvr, QVNCScreen *scr ) - :QGraphicsSystemSoftwareCursor(scr), useVncCursor(false), server(srvr) + :QPlatformSoftwareCursor(scr), useVncCursor(false), server(srvr) { } void QVNCCursor::changeCursor(QCursor * widgetCursor, QWidget * widget) { - QGraphicsSystemSoftwareCursor::changeCursor(widgetCursor, widget); + QPlatformSoftwareCursor::changeCursor(widgetCursor, widget); if (useVncCursor) { server->setDirtyCursor(); } else { @@ -84,7 +84,7 @@ QRect QVNCCursor::drawCursor(QPainter & painter) if (useVncCursor) return QRect(); - return QGraphicsSystemSoftwareCursor::drawCursor(painter); + return QPlatformSoftwareCursor::drawCursor(painter); } void QVNCCursor::clearClientCursor() diff --git a/src/plugins/platforms/vnc/qvnccursor.h b/src/plugins/platforms/vnc/qvnccursor.h index 2c6ff5b..eeb3686 100644 --- a/src/plugins/platforms/vnc/qvnccursor.h +++ b/src/plugins/platforms/vnc/qvnccursor.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QVNCScreen; class QVNCServer; -class QVNCCursor : public QGraphicsSystemSoftwareCursor { +class QVNCCursor : public QPlatformSoftwareCursor { public: QVNCCursor(QVNCServer *, QVNCScreen *); |