diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpixmap_lite.cpp | 9 | ||||
-rw-r--r-- | src/gui/painting/qgraphicssystem.cpp | 14 | ||||
-rw-r--r-- | src/gui/painting/qgraphicssystem_p.h | 6 | ||||
-rw-r--r-- | src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp | 8 | ||||
-rw-r--r-- | src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h | 2 |
5 files changed, 32 insertions, 7 deletions
diff --git a/src/gui/image/qpixmap_lite.cpp b/src/gui/image/qpixmap_lite.cpp index 90761ca..d263855 100644 --- a/src/gui/image/qpixmap_lite.cpp +++ b/src/gui/image/qpixmap_lite.cpp @@ -40,13 +40,10 @@ ****************************************************************************/ #include <qpixmap.h> +#include <private/qgraphicssystem_p.h> +#include <private/qapplication_p.h> QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) { - Q_UNUSED(window); - Q_UNUSED(x); - Q_UNUSED(y); - Q_UNUSED(w); - Q_UNUSED(h); - return QPixmap(); + return QApplicationPrivate::graphicsSystem()->grabWindow(window, x, y, w, h); } diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp index 1565c45..2071127 100644 --- a/src/gui/painting/qgraphicssystem.cpp +++ b/src/gui/painting/qgraphicssystem.cpp @@ -84,11 +84,23 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ return 0; } +#ifdef Q_WS_LITE 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) {} @@ -102,4 +114,6 @@ QRect QGraphicsSystemScreen::availableGeometry() const return geometry(); } +#endif //Q_WS_LITE + QT_END_NAMESPACE diff --git a/src/gui/painting/qgraphicssystem_p.h b/src/gui/painting/qgraphicssystem_p.h index 7cc6247..ddba22d 100644 --- a/src/gui/painting/qgraphicssystem_p.h +++ b/src/gui/painting/qgraphicssystem_p.h @@ -60,6 +60,7 @@ QT_BEGIN_NAMESPACE class QPixmapFilter; +#ifdef Q_WS_LITE class Q_GUI_EXPORT QGraphicsSystemScreen : public QObject { Q_OBJECT @@ -75,6 +76,7 @@ public: virtual void setDirty(QRect) { } virtual void pointerEvent(QMouseEvent &) { } }; +#endif // Q_WS_LITE class Q_GUI_EXPORT QGraphicsSystem { @@ -84,8 +86,10 @@ public: virtual ~QGraphicsSystem() = 0; +#ifdef Q_WS_LITE virtual QList<QGraphicsSystemScreen *> screens() const; - + virtual QPixmap grabWindow(WId window, int x, int y, int width, int height) const; +#endif //### Remove this & change qpixmap.cpp & qbitmap.cpp once every platform is gaurenteed // to have a graphics system. static QPixmapData *createDefaultPixmapData(QPixmapData::PixelType type); diff --git a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp b/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp index 9cb0424..9991e75 100644 --- a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp +++ b/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp @@ -77,4 +77,12 @@ QWindowSurface *QTestLiteGraphicsSystem::createWindowSurface(QWidget *widget) co (const_cast<QTestLiteGraphicsSystem *>(this), mPrimaryScreen, widget); } + +QPixmap QTestLiteGraphicsSystem::grabWindow(WId window, int x, int y, int width, int height) const +{ + qDebug() << "grabWindow" << hex << window << dec<< x << y << width << height; + return QPixmap(); +} + + QT_END_NAMESPACE diff --git a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h b/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h index ad7f581..b2cd496 100644 --- a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h +++ b/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h @@ -75,6 +75,8 @@ public: QPixmapData *createPixmapData(QPixmapData::PixelType type) const; QWindowSurface *createWindowSurface(QWidget *widget) const; + QPixmap grabWindow(WId window, int x, int y, int width, int height) const; + QList<QGraphicsSystemScreen *> screens() const { return mScreens; } MyDisplay *xd; |