diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpixmap_blitter.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_qpa.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/painting.pri | 4 | ||||
-rw-r--r-- | src/gui/painting/qplatformcursor_qpa.cpp (renamed from src/gui/painting/qgraphicssystemcursor_qpa.cpp) | 58 | ||||
-rw-r--r-- | src/gui/painting/qplatformcursor_qpa.h (renamed from src/gui/painting/qgraphicssystemcursor_qpa.h) | 18 |
6 files changed, 49 insertions, 45 deletions
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index 660f4d2..d91a269 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -37,7 +37,11 @@ QBlittable *QBlittablePixmapData::blittable() const { if (!m_blittable) { QBlittablePixmapData *that = const_cast<QBlittablePixmapData *>(this); +#ifdef Q_WS_QPA //####jl: graphics system nor platformintegration should have createBlittable + that->m_blittable = QApplicationPrivate::platformIntegration()->createBlittable(QSize(w,h)); +#else that->m_blittable = QApplicationPrivate::graphicsSystem()->createBlittable(QSize(w,h)); +#endif } return m_blittable; diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index afa069b..1fc202c 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -57,7 +57,7 @@ #include <qdesktopwidget.h> #include <qinputcontext.h> -#include <QGraphicsSystemCursor> +#include <QPlatformCursor> #include <qdebug.h> #include <QWindowSystemInterface> #include <QPlatformIntegration> @@ -705,8 +705,8 @@ void QApplicationPrivate::processMouseEvent(QWindowSystemInterface::MouseEvent * QMouseEvent ev(type, localPoint, globalPoint, button, buttons, modifiers); - QList<QWeakPointer<QGraphicsSystemCursor> > cursors = QGraphicsSystemCursorPrivate::getInstances(); - foreach (QWeakPointer<QGraphicsSystemCursor> cursor, cursors) { + QList<QWeakPointer<QPlatformCursor> > cursors = QPlatformCursorPrivate::getInstances(); + foreach (QWeakPointer<QPlatformCursor> cursor, cursors) { if (cursor) cursor.data()->pointerEvent(ev); } diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index 11fa211..a543c8f 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -49,7 +49,7 @@ #include "QtGui/qdesktopwidget.h" #include "QtGui/qplatformwindow_qpa.h" -#include <QtGui/QGraphicsSystemCursor> +#include <QtGui/QPlatformCursor> QT_BEGIN_NAMESPACE static QPlatformScreen *qt_screenForWidget(const QWidget *w); @@ -800,7 +800,7 @@ void qt_lite_set_cursor(QWidget * w, bool force) cursorCursor = w->cursor(); cursorWidget = w; } while (0); - foreach (QWeakPointer<QGraphicsSystemCursor> cursor, QGraphicsSystemCursorPrivate::getInstances()) + foreach (QWeakPointer<QPlatformCursor> cursor, QPlatformCursorPrivate::getInstances()) if (cursor) cursor.data()->changeCursor(&cursorCursor, cursorWidget); } diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 8d9b09e..b235320 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -191,9 +191,9 @@ qpa { SOURCES += \ painting/qcolormap_qpa.cpp \ painting/qpaintdevice_qpa.cpp \ - painting/qgraphicssystemcursor_qpa.cpp + painting/qplatformcursor_qpa.cpp HEADERS += \ - painting/qgraphicssystemcursor_qpa.h + painting/qplatformcursor_qpa.h } symbian { diff --git a/src/gui/painting/qgraphicssystemcursor_qpa.cpp b/src/gui/painting/qplatformcursor_qpa.cpp index 24376f9..6665396 100644 --- a/src/gui/painting/qgraphicssystemcursor_qpa.cpp +++ b/src/gui/painting/qplatformcursor_qpa.cpp @@ -38,7 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "qgraphicssystemcursor_qpa.h" +#include "qplatformcursor_qpa.h" #include <QWidget> #include <QPainter> @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE -QList <QWeakPointer<QGraphicsSystemCursor> > QGraphicsSystemCursorPrivate::instances; +QList <QWeakPointer<QPlatformCursor> > QPlatformCursorPrivate::instances; /*! \class QGraphicsSystemCursor @@ -95,10 +95,10 @@ QList <QWeakPointer<QGraphicsSystemCursor> > QGraphicsSystemCursorPrivate::insta \brief Constructs a QGraphicsSystemCursor */ -QGraphicsSystemCursor::QGraphicsSystemCursor(QPlatformScreen *scr ) +QPlatformCursor::QPlatformCursor(QPlatformScreen *scr ) : screen(scr) { - QGraphicsSystemCursorPrivate::instances.append(this); + QPlatformCursorPrivate::instances.append(this); } // End of display and pointer event handling code @@ -114,7 +114,7 @@ QGraphicsSystemCursor::QGraphicsSystemCursor(QPlatformScreen *scr ) \sa QGraphicsSystemCursor */ -static QGraphicsSystemCursorImage *systemCursorTable[Qt::LastCursor+1]; +static QPlatformCursorImage *systemCursorTable[Qt::LastCursor+1]; static bool systemCursorTableInit = false; // 16 x 16 @@ -397,7 +397,7 @@ static const uchar closedhandm_bits[] = { 0xf0,0x7f,0xf8,0x7f,0xfc,0x7f,0xfc,0x3f,0xf8,0x3f,0xf0,0x1f, 0xe0,0x1f,0xe0,0x1f,0x00,0x00,0x00,0x00}; -void QGraphicsSystemCursorImage::createSystemCursor(int id) +void QPlatformCursorImage::createSystemCursor(int id) { if (!systemCursorTableInit) { for (int i = 0; i <= Qt::LastCursor; i++) @@ -408,97 +408,97 @@ void QGraphicsSystemCursorImage::createSystemCursor(int id) // 16x16 cursors case Qt::ArrowCursor: systemCursorTable[Qt::ArrowCursor] = - new QGraphicsSystemCursorImage(cur_arrow_bits, mcur_arrow_bits, 16, 16, 0, 0); + new QPlatformCursorImage(cur_arrow_bits, mcur_arrow_bits, 16, 16, 0, 0); break; case Qt::UpArrowCursor: systemCursorTable[Qt::UpArrowCursor] = - new QGraphicsSystemCursorImage(cur_up_arrow_bits, mcur_up_arrow_bits, 16, 16, 7, 0); + new QPlatformCursorImage(cur_up_arrow_bits, mcur_up_arrow_bits, 16, 16, 7, 0); break; case Qt::CrossCursor: systemCursorTable[Qt::CrossCursor] = - new QGraphicsSystemCursorImage(cur_cross_bits, mcur_cross_bits, 16, 16, 7, 7); + new QPlatformCursorImage(cur_cross_bits, mcur_cross_bits, 16, 16, 7, 7); break; case Qt::IBeamCursor: systemCursorTable[Qt::IBeamCursor] = - new QGraphicsSystemCursorImage(cur_ibeam_bits, mcur_ibeam_bits, 16, 16, 7, 7); + new QPlatformCursorImage(cur_ibeam_bits, mcur_ibeam_bits, 16, 16, 7, 7); break; case Qt::SizeVerCursor: systemCursorTable[Qt::SizeVerCursor] = - new QGraphicsSystemCursorImage(cur_ver_bits, mcur_ver_bits, 16, 16, 7, 7); + new QPlatformCursorImage(cur_ver_bits, mcur_ver_bits, 16, 16, 7, 7); break; case Qt::SizeHorCursor: systemCursorTable[Qt::SizeHorCursor] = - new QGraphicsSystemCursorImage(cur_hor_bits, mcur_hor_bits, 16, 16, 7, 7); + new QPlatformCursorImage(cur_hor_bits, mcur_hor_bits, 16, 16, 7, 7); break; case Qt::SizeBDiagCursor: systemCursorTable[Qt::SizeBDiagCursor] = - new QGraphicsSystemCursorImage(cur_bdiag_bits, mcur_bdiag_bits, 16, 16, 7, 7); + new QPlatformCursorImage(cur_bdiag_bits, mcur_bdiag_bits, 16, 16, 7, 7); break; case Qt::SizeFDiagCursor: systemCursorTable[Qt::SizeFDiagCursor] = - new QGraphicsSystemCursorImage(cur_fdiag_bits, mcur_fdiag_bits, 16, 16, 7, 7); + new QPlatformCursorImage(cur_fdiag_bits, mcur_fdiag_bits, 16, 16, 7, 7); break; case Qt::BlankCursor: systemCursorTable[Qt::BlankCursor] = - new QGraphicsSystemCursorImage(0, 0, 0, 0, 0, 0); + new QPlatformCursorImage(0, 0, 0, 0, 0, 0); break; // 20x20 cursors case Qt::ForbiddenCursor: systemCursorTable[Qt::ForbiddenCursor] = - new QGraphicsSystemCursorImage(forbidden_bits, forbiddenm_bits, 20, 20, 10, 10); + new QPlatformCursorImage(forbidden_bits, forbiddenm_bits, 20, 20, 10, 10); break; // 32x32 cursors case Qt::WaitCursor: systemCursorTable[Qt::WaitCursor] = - new QGraphicsSystemCursorImage(wait_data_bits, wait_mask_bits, 32, 32, 15, 15); + new QPlatformCursorImage(wait_data_bits, wait_mask_bits, 32, 32, 15, 15); break; case Qt::SplitVCursor: systemCursorTable[Qt::SplitVCursor] = - new QGraphicsSystemCursorImage(vsplit_bits, vsplitm_bits, 32, 32, 15, 15); + new QPlatformCursorImage(vsplit_bits, vsplitm_bits, 32, 32, 15, 15); break; case Qt::SplitHCursor: systemCursorTable[Qt::SplitHCursor] = - new QGraphicsSystemCursorImage(hsplit_bits, hsplitm_bits, 32, 32, 15, 15); + new QPlatformCursorImage(hsplit_bits, hsplitm_bits, 32, 32, 15, 15); break; case Qt::SizeAllCursor: systemCursorTable[Qt::SizeAllCursor] = - new QGraphicsSystemCursorImage(size_all_data_bits, size_all_mask_bits, 32, 32, 15, 15); + new QPlatformCursorImage(size_all_data_bits, size_all_mask_bits, 32, 32, 15, 15); break; case Qt::PointingHandCursor: systemCursorTable[Qt::PointingHandCursor] = - new QGraphicsSystemCursorImage(phand_bits, phandm_bits, 32, 32, 0, 0); + new QPlatformCursorImage(phand_bits, phandm_bits, 32, 32, 0, 0); break; case Qt::WhatsThisCursor: systemCursorTable[Qt::WhatsThisCursor] = - new QGraphicsSystemCursorImage(whatsthis_bits, whatsthism_bits, 32, 32, 0, 0); + new QPlatformCursorImage(whatsthis_bits, whatsthism_bits, 32, 32, 0, 0); break; case Qt::BusyCursor: systemCursorTable[Qt::BusyCursor] = - new QGraphicsSystemCursorImage(busy_bits, busym_bits, 32, 32, 0, 0); + new QPlatformCursorImage(busy_bits, busym_bits, 32, 32, 0, 0); break; case Qt::OpenHandCursor: systemCursorTable[Qt::OpenHandCursor] = - new QGraphicsSystemCursorImage(openhand_bits, openhandm_bits, 16, 16, 8, 8); + new QPlatformCursorImage(openhand_bits, openhandm_bits, 16, 16, 8, 8); break; case Qt::ClosedHandCursor: systemCursorTable[Qt::ClosedHandCursor] = - new QGraphicsSystemCursorImage(closedhand_bits, closedhandm_bits, 16, 16, 8, 8); + new QPlatformCursorImage(closedhand_bits, closedhandm_bits, 16, 16, 8, 8); break; default: qWarning("Unknown system cursor %d", id); @@ -516,9 +516,9 @@ void QGraphicsSystemCursorImage::createSystemCursor(int id) Qt::ArrowCursor is used instead. */ -void QGraphicsSystemCursorImage::set(Qt::CursorShape id) +void QPlatformCursorImage::set(Qt::CursorShape id) { - QGraphicsSystemCursorImage *cursor = 0; + QPlatformCursorImage *cursor = 0; if (id >= 0 && id <= Qt::LastCursor) { if (!systemCursorTable[id]) createSystemCursor(id); @@ -546,7 +546,7 @@ void QGraphicsSystemCursorImage::set(Qt::CursorShape id) \a hy the y coordinate of the cursor's hotspot */ -void QGraphicsSystemCursorImage::set(const QImage * image, int hx, int hy) +void QPlatformCursorImage::set(const QImage * image, int hx, int hy) { hot.setX(hx); hot.setY(hy); @@ -571,7 +571,7 @@ void QGraphicsSystemCursorImage::set(const QImage * image, int hx, int hy) \a hy The Y hotspot of the cursor graphic */ -void QGraphicsSystemCursorImage::set(const uchar *data, const uchar *mask, +void QPlatformCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy) { hot.setX(hx); diff --git a/src/gui/painting/qgraphicssystemcursor_qpa.h b/src/gui/painting/qplatformcursor_qpa.h index 9c65f7f..bb8bbb7 100644 --- a/src/gui/painting/qgraphicssystemcursor_qpa.h +++ b/src/gui/painting/qplatformcursor_qpa.h @@ -52,9 +52,9 @@ QT_BEGIN_NAMESPACE // Cursor graphics management -class Q_GUI_EXPORT QGraphicsSystemCursorImage { +class Q_GUI_EXPORT QPlatformCursorImage { public: - QGraphicsSystemCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY) + QPlatformCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY) { set(data, mask, width, height, hotX, hotY); } QImage * image() { return &cursorImage; } QPoint hotspot() { return hot; } @@ -67,17 +67,17 @@ private: QPoint hot; }; -class QGraphicsSystemCursor; +class QPlatformCursor; -class QGraphicsSystemCursorPrivate { +class QPlatformCursorPrivate { public: - static QList<QWeakPointer<QGraphicsSystemCursor> > getInstances() { return instances; } - static QList<QWeakPointer<QGraphicsSystemCursor> > instances; + static QList<QWeakPointer<QPlatformCursor> > getInstances() { return instances; } + static QList<QWeakPointer<QPlatformCursor> > instances; }; -class Q_GUI_EXPORT QGraphicsSystemCursor : public QObject { +class Q_GUI_EXPORT QPlatformCursor : public QObject { public: - QGraphicsSystemCursor(QPlatformScreen *); + QPlatformCursor(QPlatformScreen *); // input methods virtual void pointerEvent(const QMouseEvent & event) { Q_UNUSED(event); } @@ -87,7 +87,7 @@ protected: QPlatformScreen* screen; // Where to request an update private: - Q_DECLARE_PRIVATE(QGraphicsSystemCursor); + Q_DECLARE_PRIVATE(QPlatformCursor); friend void qt_lite_set_cursor(QWidget * w, bool force); friend class QApplicationPrivate; }; |