diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-03-31 09:41:39 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-03-31 11:32:07 +0200 |
commit | a93f6b21f636df4840f86099c76d287afb978001 (patch) | |
tree | dc85d58ebc1ac7ee9d653157f42242cbc379a636 /src/gui/painting/qgraphicssystem.cpp | |
parent | a31270b5fc88460d6923ac1f2b5b6e90da59c9c8 (diff) |
Refactoring GraphicsSystem to QPlatformIntegration
QPlatformIntegration is the "main" integration class which needs to be
subclassed.
This is done so that we don't pollute GraphicsSystem with functionality
that really does not belong there.
In lighthouse applications needs now to be started with
-platform some_platform
Diffstat (limited to 'src/gui/painting/qgraphicssystem.cpp')
-rw-r--r-- | src/gui/painting/qgraphicssystem.cpp | 54 |
1 files changed, 5 insertions, 49 deletions
diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp index ebc504bfb9..c9866ae631 100644 --- a/src/gui/painting/qgraphicssystem.cpp +++ b/src/gui/painting/qgraphicssystem.cpp @@ -51,9 +51,7 @@ # include <private/qpixmap_mac_p.h> #endif #ifdef Q_WS_LITE -# include <private/qpixmap_raster_p.h> -# include <qapplication.h> -# include <qdesktopwidget.h> +# include <QtGui/private/qapplication_p.h> #endif #ifdef Q_WS_S60 # include <private/qpixmap_s60_p.h> @@ -65,6 +63,9 @@ QGraphicsSystem::~QGraphicsSystem() { } +QBlittable *QGraphicsSystem::createBlittable(const QSize &) const +{ return 0; } + QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType type) { #ifdef Q_WS_QWS @@ -77,7 +78,7 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ #elif defined(Q_WS_MAC) return new QMacPixmapData(type); #elif defined(Q_WS_LITE) - return new QRasterPixmapData(type); + return QApplicationPrivate::platformIntegration()->createPixmapData(type); #elif defined(Q_WS_S60) return new QS60PixmapData(type); #elif !defined(Q_WS_QWS) @@ -86,49 +87,4 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ return 0; } -#ifdef Q_WS_LITE -QWidget *QGraphicsSystemScreen::topLevelAt(const QPoint & pos) const -{ - QWidgetList list = QApplication::topLevelWidgets(); - for (int i = list.size()-1; i >= 0; --i) { - QWidget *w = list[i]; - //### mask is ignored - if (w != QApplication::desktop() && w->isVisible() && w->geometry().contains(pos)) - return w; - } - - return 0; -} - -QList<QGraphicsSystemScreen *> QGraphicsSystem::screens() const -{ - return QList<QGraphicsSystemScreen *>(); -} - -QPixmap QGraphicsSystem::grabWindow(WId window, int x, int y, int width, int height) const -{ - Q_UNUSED(window); - Q_UNUSED(x); - Q_UNUSED(y); - Q_UNUSED(width); - Q_UNUSED(height); - return QPixmap(); -} - - -QGraphicsSystemScreen::QGraphicsSystemScreen(QObject *parent) - : QObject(parent) -{} - -QGraphicsSystemScreen::~QGraphicsSystemScreen() -{ -} - -QRect QGraphicsSystemScreen::availableGeometry() const -{ - return geometry(); -} - -#endif //Q_WS_LITE - QT_END_NAMESPACE |