diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-04-12 14:55:56 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-04-12 16:31:22 (GMT) |
commit | 3a8b3299d7c956e3a9f4733bc7d459757081bdc2 (patch) | |
tree | e5241db3c0ea77a8c3a4489ccc7dd47742e48a50 /src/plugins/platforms/linuxfb | |
parent | a87d8966946c47e234b8d5268c287ac96f1ea4c4 (diff) | |
download | Qt-3a8b3299d7c956e3a9f4733bc7d459757081bdc2.zip Qt-3a8b3299d7c956e3a9f4733bc7d459757081bdc2.tar.gz Qt-3a8b3299d7c956e3a9f4733bc7d459757081bdc2.tar.bz2 |
Make LinuxFb work
Diffstat (limited to 'src/plugins/platforms/linuxfb')
-rw-r--r-- | src/plugins/platforms/linuxfb/linuxfb.pro | 4 | ||||
-rw-r--r-- | src/plugins/platforms/linuxfb/main.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp | 16 | ||||
-rw-r--r-- | src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h | 11 |
4 files changed, 26 insertions, 13 deletions
diff --git a/src/plugins/platforms/linuxfb/linuxfb.pro b/src/plugins/platforms/linuxfb/linuxfb.pro index 031b843..2633a10 100644 --- a/src/plugins/platforms/linuxfb/linuxfb.pro +++ b/src/plugins/platforms/linuxfb/linuxfb.pro @@ -1,12 +1,12 @@ TARGET = qlinuxfbgraphicssystem include(../../qpluginbase.pri) -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms SOURCES = main.cpp qgraphicssystem_linuxfb.cpp HEADERS = qgraphicssystem_linuxfb.h include(../fb_base/fb_base.pri) -target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems +target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/linuxfb/main.cpp b/src/plugins/platforms/linuxfb/main.cpp index 4d03fe5..15305ed 100644 --- a/src/plugins/platforms/linuxfb/main.cpp +++ b/src/plugins/platforms/linuxfb/main.cpp @@ -39,16 +39,16 @@ ** ****************************************************************************/ -#include <private/qgraphicssystemplugin_p.h> +#include <QPlatformIntegrationPlugin> #include "qgraphicssystem_linuxfb.h" QT_BEGIN_NAMESPACE -class QLinuxFbGraphicsSystemPlugin : public QGraphicsSystemPlugin +class QLinuxFbGraphicsSystemPlugin : public QPlatformIntegrationPlugin { public: QStringList keys() const; - QGraphicsSystem *create(const QString&); + QPlatformIntegration *create(const QString&); }; QStringList QLinuxFbGraphicsSystemPlugin::keys() const @@ -58,7 +58,7 @@ QStringList QLinuxFbGraphicsSystemPlugin::keys() const return list; } -QGraphicsSystem* QLinuxFbGraphicsSystemPlugin::create(const QString& system) +QPlatformIntegration* QLinuxFbGraphicsSystemPlugin::create(const QString& system) { if (system.toLower() == "linuxfb") return new QLinuxFbGraphicsSystem; diff --git a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp index 44960bb..cca567c 100644 --- a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp +++ b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp @@ -786,16 +786,28 @@ QPixmapData *QLinuxFbGraphicsSystem::createPixmapData(QPixmapData::PixelType typ return new QRasterPixmapData(type); } -QWindowSurface *QLinuxFbGraphicsSystem::createWindowSurface(QWidget *widget) const +QWindowSurface *QLinuxFbGraphicsSystem::createWindowSurfaceForWindow(QWidget *widget, WId) const { if (widget->windowType() == Qt::Desktop) return 0; // Don't create an explicit window surface for the destkop. QGraphicsSystemFbWindowSurface * surface = new QGraphicsSystemFbWindowSurface(mPrimaryScreen, widget); - mPrimaryScreen->addWindowSurface(surface); return surface; } + + +QPlatformWindow *QLinuxFbGraphicsSystem::createPlatformWindow(QWidget *widget, WId /*winId*/) const +{ + QFbWindow *w = new QFbWindow(mPrimaryScreen, widget); + mPrimaryScreen->addWindow(w); + return w; +} + + + + + QLinuxFbGraphicsSystemScreen::QLinuxFbGraphicsSystemScreen(uchar * d, int w, int h, int lstep, QImage::Format screenFormat) : compositePainter(0) { diff --git a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h index cc8ce7e..873b463 100644 --- a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h +++ b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h @@ -42,7 +42,7 @@ #ifndef QGRAPHICSSYSTEM_LINUXFB_H #define QGRAPHICSSYSTEM_LINUXFB_H -#include <QtGui/private/qgraphicssystem_p.h> +#include <QPlatformIntegration> #include "../fb_base/fb_base.h" QT_BEGIN_NAMESPACE @@ -70,20 +70,21 @@ struct fb_cmap; struct fb_var_screeninfo; struct fb_fix_screeninfo; -class QLinuxFbGraphicsSystem : public QGraphicsSystem +class QLinuxFbGraphicsSystem : public QPlatformIntegration { public: QLinuxFbGraphicsSystem(); ~QLinuxFbGraphicsSystem(); QPixmapData *createPixmapData(QPixmapData::PixelType type) const; - QWindowSurface *createWindowSurface(QWidget *widget) const; + QPlatformWindow *createPlatformWindow(QWidget *widget, WId WinId) const; + QWindowSurface *createWindowSurfaceForWindow(QWidget *widget, WId WinId) const; - QList<QGraphicsSystemScreen *> screens() const { return mScreens; } + QList<QPlatformScreen *> screens() const { return mScreens; } private: QLinuxFbGraphicsSystemScreen *mPrimaryScreen; - QList<QGraphicsSystemScreen *> mScreens; + QList<QPlatformScreen *> mScreens; QLinuxFbGraphicsSystemPrivate *d_ptr; enum PixelType { NormalPixel, BGRPixel }; |