summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-03-31 10:19:59 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-03-31 10:21:43 (GMT)
commit22b7de20fdc0f11d943f235227f59608a88992c8 (patch)
tree6c9fb3c6ac35fc017bbc72a5918497d6dffe7e9a
parentbf36f88b92fa95704f117124c15ef896f553939c (diff)
downloadQt-22b7de20fdc0f11d943f235227f59608a88992c8.zip
Qt-22b7de20fdc0f11d943f235227f59608a88992c8.tar.gz
Qt-22b7de20fdc0f11d943f235227f59608a88992c8.tar.bz2
Make directfb plugin work with QPlatformIntegration
-rw-r--r--src/plugins/platforms/directfb/directfb.pro (renamed from src/plugins/platforms/minimaldfb/minimaldfb.pro)14
-rw-r--r--src/plugins/platforms/directfb/main.cpp (renamed from src/plugins/platforms/minimaldfb/main.cpp)20
-rw-r--r--src/plugins/platforms/directfb/qblitter_directfb.cpp (renamed from src/plugins/platforms/minimaldfb/qblitter_directfb.cpp)1
-rw-r--r--src/plugins/platforms/directfb/qblitter_directfb.h (renamed from src/plugins/platforms/minimaldfb/qblitter_directfb.h)0
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.cpp (renamed from src/plugins/platforms/minimaldfb/qdirectfbconvenience.cpp)0
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.h (renamed from src/plugins/platforms/minimaldfb/qdirectfbconvenience.h)2
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.cpp (renamed from src/plugins/platforms/minimaldfb/qdirectfbcursor.cpp)4
-rw-r--r--src/plugins/platforms/directfb/qdirectfbcursor.h (renamed from src/plugins/platforms/minimaldfb/qdirectfbcursor.h)4
-rw-r--r--src/plugins/platforms/directfb/qdirectfbinput.cpp (renamed from src/plugins/platforms/minimaldfb/qdirectfbinput.cpp)0
-rw-r--r--src/plugins/platforms/directfb/qdirectfbinput.h (renamed from src/plugins/platforms/minimaldfb/qdirectfbinput.h)0
-rw-r--r--src/plugins/platforms/directfb/qplatformintegration_directfb.cpp (renamed from src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.cpp)22
-rw-r--r--src/plugins/platforms/directfb/qplatformintegration_directfb.h (renamed from src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.h)21
-rw-r--r--src/plugins/platforms/directfb/qwindowsurface_directfb.cpp (renamed from src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.cpp)4
-rw-r--r--src/plugins/platforms/directfb/qwindowsurface_directfb.h (renamed from src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.h)4
14 files changed, 47 insertions, 49 deletions
diff --git a/src/plugins/platforms/minimaldfb/minimaldfb.pro b/src/plugins/platforms/directfb/directfb.pro
index b6c2ea8..f8fccaa 100644
--- a/src/plugins/platforms/minimaldfb/minimaldfb.pro
+++ b/src/plugins/platforms/directfb/directfb.pro
@@ -1,6 +1,6 @@
-TARGET = qminimaldfb
+TARGET = qdirectfb
include(../../qpluginbase.pri)
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
isEmpty(DIRECTFB_LIBS) {
DIRECTFB_LIBS = -ldirectfb -lfusion -ldirect -lpthread
@@ -13,17 +13,17 @@ INCLUDEPATH += $$DIRECTFB_INCLUDEPATH
LIBS += $$DIRECTFB_LIBS
SOURCES = main.cpp \
- qgraphicssystem_minimaldfb.cpp \
- qwindowsurface_minimaldfb.cpp \
+ qplatformintegration_directfb.cpp \
+ qwindowsurface_directfb.cpp \
qblitter_directfb.cpp \
qdirectfbconvenience.cpp \
qdirectfbinput.cpp \
qdirectfbcursor.cpp
-HEADERS = qgraphicssystem_minimaldfb.h \
- qwindowsurface_minimaldfb.h \
+HEADERS = qplatformintegration_directfb.h \
+ qwindowsurface_directfb.h \
qblitter_directfb.h \
qdirectfbconvenience.h \
qdirectfbinput.h \
qdirectfbcursor.h
-target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
+target.path += $$[QT_INSTALL_PLUGINS]/platforms
INSTALLS += target
diff --git a/src/plugins/platforms/minimaldfb/main.cpp b/src/plugins/platforms/directfb/main.cpp
index fe9407c..1f0f081 100644
--- a/src/plugins/platforms/minimaldfb/main.cpp
+++ b/src/plugins/platforms/directfb/main.cpp
@@ -39,33 +39,33 @@
**
****************************************************************************/
-#include <private/qgraphicssystemplugin_p.h>
-#include "qgraphicssystem_minimaldfb.h"
+#include <QtGui/QPlatformIntegrationPlugin>
+#include "qplatformintegration_directfb.h"
QT_BEGIN_NAMESPACE
-class QDirectFbGraphicsSystemPlugin : public QGraphicsSystemPlugin
+class QDirectFbIntegrationPlugin : public QPlatformIntegrationPlugin
{
public:
QStringList keys() const;
- QGraphicsSystem *create(const QString&);
+ QPlatformIntegration *create(const QString&);
};
-QStringList QDirectFbGraphicsSystemPlugin::keys() const
+QStringList QDirectFbIntegrationPlugin::keys() const
{
QStringList list;
- list << "MinimalDfb";
+ list << "directfb";
return list;
}
-QGraphicsSystem* QDirectFbGraphicsSystemPlugin::create(const QString& system)
+QPlatformIntegration * QDirectFbIntegrationPlugin::create(const QString& system)
{
- if (system.toLower() == "minimaldfb")
- return new QDirectFbGraphicsSystem;
+ if (system.toLower() == "directfb")
+ return new QDirectFbIntegration;
return 0;
}
-Q_EXPORT_PLUGIN2(directfb, QDirectFbGraphicsSystemPlugin)
+Q_EXPORT_PLUGIN2(directfb, QDirectFbIntegrationPlugin)
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/minimaldfb/qblitter_directfb.cpp b/src/plugins/platforms/directfb/qblitter_directfb.cpp
index 070c563..08dee0a 100644
--- a/src/plugins/platforms/minimaldfb/qblitter_directfb.cpp
+++ b/src/plugins/platforms/directfb/qblitter_directfb.cpp
@@ -1,5 +1,4 @@
#include "qblitter_directfb.h"
-#include "qgraphicssystem_minimaldfb.h"
#include "qdirectfbconvenience.h"
#include <QtGui/private/qpixmap_blitter_p.h>
diff --git a/src/plugins/platforms/minimaldfb/qblitter_directfb.h b/src/plugins/platforms/directfb/qblitter_directfb.h
index 85a303a..85a303a 100644
--- a/src/plugins/platforms/minimaldfb/qblitter_directfb.h
+++ b/src/plugins/platforms/directfb/qblitter_directfb.h
diff --git a/src/plugins/platforms/minimaldfb/qdirectfbconvenience.cpp b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp
index 8594c09..8594c09 100644
--- a/src/plugins/platforms/minimaldfb/qdirectfbconvenience.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp
diff --git a/src/plugins/platforms/minimaldfb/qdirectfbconvenience.h b/src/plugins/platforms/directfb/qdirectfbconvenience.h
index 0b1a24f..ab5b3de 100644
--- a/src/plugins/platforms/minimaldfb/qdirectfbconvenience.h
+++ b/src/plugins/platforms/directfb/qdirectfbconvenience.h
@@ -37,7 +37,7 @@ public:
private:
static QDirectFbKeyMap *dfbKeymap;
- friend class QDirectFbGraphicsSystem;
+ friend class QDirectFbIntegration;
};
#endif // QDIRECTFBCONVENIENCE_H
diff --git a/src/plugins/platforms/minimaldfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
index 229a875..bb7088f 100644
--- a/src/plugins/platforms/minimaldfb/qdirectfbcursor.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp
@@ -1,11 +1,11 @@
#include "qdirectfbcursor.h"
#include "qblitter_directfb.h"
-#include "qgraphicssystem_minimaldfb.h"
+#include "qplatformintegration_directfb.h"
#include "qdirectfbconvenience.h"
#include <private/qpixmap_blitter_p.h>
-QDirectFBCursor::QDirectFBCursor(QGraphicsSystemScreen * screen) :
+QDirectFBCursor::QDirectFBCursor(QPlatformScreen* screen) :
QGraphicsSystemCursor(screen), surface(0)
{
QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, &m_layer);
diff --git a/src/plugins/platforms/minimaldfb/qdirectfbcursor.h b/src/plugins/platforms/directfb/qdirectfbcursor.h
index 064a336..1566e7c 100644
--- a/src/plugins/platforms/minimaldfb/qdirectfbcursor.h
+++ b/src/plugins/platforms/directfb/qdirectfbcursor.h
@@ -3,13 +3,13 @@
#include <QGraphicsSystemCursor>
#include <directfb.h>
-class QDirectFbGraphicsSystemScreen;
+class QDirectFbScreen;
class QDirectFbBlitter;
class QDirectFBCursor : public QGraphicsSystemCursor
{
public:
- QDirectFBCursor(QGraphicsSystemScreen *screem);
+ QDirectFBCursor(QPlatformScreen *screem);
void changeCursor(QCursor * cursor, QWidget * widget);
private:
diff --git a/src/plugins/platforms/minimaldfb/qdirectfbinput.cpp b/src/plugins/platforms/directfb/qdirectfbinput.cpp
index 74a38a4..74a38a4 100644
--- a/src/plugins/platforms/minimaldfb/qdirectfbinput.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbinput.cpp
diff --git a/src/plugins/platforms/minimaldfb/qdirectfbinput.h b/src/plugins/platforms/directfb/qdirectfbinput.h
index 31aa082..31aa082 100644
--- a/src/plugins/platforms/minimaldfb/qdirectfbinput.h
+++ b/src/plugins/platforms/directfb/qdirectfbinput.h
diff --git a/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.cpp b/src/plugins/platforms/directfb/qplatformintegration_directfb.cpp
index 212f3a9..c70bb64 100644
--- a/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.cpp
+++ b/src/plugins/platforms/directfb/qplatformintegration_directfb.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qgraphicssystem_minimaldfb.h"
-#include "qwindowsurface_minimaldfb.h"
+#include "qplatformintegration_directfb.h"
+#include "qwindowsurface_directfb.h"
#include "qblitter_directfb.h"
#include "qdirectfbconvenience.h"
#include "qdirectfbcursor.h"
@@ -54,8 +54,8 @@
QT_BEGIN_NAMESPACE
-QDirectFbGraphicsSystemScreen::QDirectFbGraphicsSystemScreen(int display)
- :QGraphicsSystemScreen()
+QDirectFbScreen::QDirectFbScreen(int display)
+ :QPlatformScreen()
{
m_layer = QDirectFbConvenience::dfbDisplayLayer(display);
m_layer->SetCooperativeLevel(m_layer,DLSCL_SHARED);
@@ -73,11 +73,11 @@ QDirectFbGraphicsSystemScreen::QDirectFbGraphicsSystemScreen(int display)
cursor = new QDirectFBCursor(this);
}
-QDirectFbGraphicsSystemScreen::~QDirectFbGraphicsSystemScreen()
+QDirectFbScreen::~QDirectFbScreen()
{
}
-QDirectFbGraphicsSystem::QDirectFbGraphicsSystem()
+QDirectFbIntegration::QDirectFbIntegration()
{
const QStringList args = QCoreApplication::arguments();
int argc = args.size();
@@ -93,11 +93,11 @@ QDirectFbGraphicsSystem::QDirectFbGraphicsSystem()
}
delete[] argv;
- mPrimaryScreen = new QDirectFbGraphicsSystemScreen(0);
- mScreens.append(mPrimaryScreen);
+ QDirectFbScreen *primaryScreen = new QDirectFbScreen(0);
+ mScreens.append(primaryScreen);
}
-QPixmapData *QDirectFbGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
+QPixmapData *QDirectFbIntegration::createPixmapData(QPixmapData::PixelType type) const
{
if (type == QPixmapData::BitmapType)
return new QRasterPixmapData(type);
@@ -105,12 +105,12 @@ QPixmapData *QDirectFbGraphicsSystem::createPixmapData(QPixmapData::PixelType ty
return new QBlittablePixmapData(type);
}
-QWindowSurface *QDirectFbGraphicsSystem::createWindowSurface(QWidget *widget) const
+QWindowSurface *QDirectFbIntegration::createWindowSurface(QWidget *widget) const
{
return new QDirectFbWindowSurface (widget);
}
-QBlittable *QDirectFbGraphicsSystem::createBlittable(const QSize &size) const
+QBlittable *QDirectFbIntegration::createBlittable(const QSize &size) const
{
return new QDirectFbBlitter(size);
}
diff --git a/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.h b/src/plugins/platforms/directfb/qplatformintegration_directfb.h
index 27bddfb..f74a81d 100644
--- a/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.h
+++ b/src/plugins/platforms/directfb/qplatformintegration_directfb.h
@@ -39,12 +39,12 @@
**
****************************************************************************/
-#ifndef QGRAPHICSSYSTEM_MINIMAL_H
-#define QGRAPHICSSYSTEM_MINIMAL_H
+#ifndef QPLATFORMINTEGRATION_DIRECTFB_H
+#define QPLATFORMINTEGRATION_DIRECTFB_H
#include "qdirectfbinput.h"
-#include <QtGui/private/qgraphicssystem_p.h>
+#include <QtGui/QPlatformIntegration>
#include <directfb.h>
#include <directfb_version.h>
@@ -52,11 +52,11 @@ QT_BEGIN_NAMESPACE
class QDirectFBCursor;
-class QDirectFbGraphicsSystemScreen : public QGraphicsSystemScreen
+class QDirectFbScreen : public QPlatformScreen
{
public:
- QDirectFbGraphicsSystemScreen(int display);
- ~QDirectFbGraphicsSystemScreen();
+ QDirectFbScreen(int display);
+ ~QDirectFbScreen();
QRect geometry() const { return m_geometry; }
int depth() const { return m_depth; }
@@ -76,22 +76,21 @@ private:
};
-class QDirectFbGraphicsSystem : public QGraphicsSystem
+class QDirectFbIntegration : public QPlatformIntegration
{
public:
- QDirectFbGraphicsSystem();
+ QDirectFbIntegration();
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
QBlittable *createBlittable(const QSize &size) const;
- QList<QGraphicsSystemScreen *> screens() const { return mScreens; }
+ QList<QPlatformScreen *> screens() const { return mScreens; }
private:
- QDirectFbGraphicsSystemScreen *mPrimaryScreen;
- QList<QGraphicsSystemScreen *> mScreens;
+ QList<QPlatformScreen *> mScreens;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.cpp b/src/plugins/platforms/directfb/qwindowsurface_directfb.cpp
index 68d5aa0..afe34b7 100644
--- a/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.cpp
+++ b/src/plugins/platforms/directfb/qwindowsurface_directfb.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qwindowsurface_minimaldfb.h"
-#include "qgraphicssystem_minimaldfb.h"
+#include "qwindowsurface_directfb.h"
+#include "qplatformintegration_directfb.h"
#include "qblitter_directfb.h"
#include "qdirectfbconvenience.h"
#include <private/qpixmap_blitter_p.h>
diff --git a/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.h b/src/plugins/platforms/directfb/qwindowsurface_directfb.h
index ca34cbf..2f31513 100644
--- a/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.h
+++ b/src/plugins/platforms/directfb/qwindowsurface_directfb.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QWINDOWSURFACE_MINIMAL_H
-#define QWINDOWSURFACE_MINIMAL_H
+#ifndef QWINDOWSURFACE_DIRECTFB_H
+#define QWINDOWSURFACE_DIRECTFB_H
#include <QtGui/private/qwindowsurface_p.h>
#include <private/qpixmap_blitter_p.h>