diff options
Diffstat (limited to 'src/plugins/platforms/linuxfb')
-rw-r--r-- | src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp | 24 | ||||
-rw-r--r-- | src/plugins/platforms/linuxfb/qlinuxfbintegration.h | 14 |
2 files changed, 25 insertions, 13 deletions
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index 53f48d5480..fdec574bce 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -43,18 +43,22 @@ #include "qlinuxfbscreen.h" #include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h> +#include <QtPlatformSupport/private/qgenericunixservices_p.h> #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h> + +#include <QtPlatformSupport/private/qfbvthandler_p.h> #include <QtPlatformSupport/private/qfbbackingstore_p.h> #include <QtPlatformSupport/private/qfbwindow_p.h> #include <QtPlatformSupport/private/qfbcursor_p.h> #include <QtGui/private/qguiapplication_p.h> -#include <QtGui/private/qpixmap_raster_p.h> +#include <qpa/qplatforminputcontextfactory_p.h> QT_BEGIN_NAMESPACE QLinuxFbIntegration::QLinuxFbIntegration(const QStringList ¶mList) - : m_fontDb(new QGenericUnixFontDatabase()) + : m_fontDb(new QGenericUnixFontDatabase), + m_services(new QGenericUnixServices) { m_primaryScreen = new QLinuxFbScreen(paramList); } @@ -70,6 +74,10 @@ void QLinuxFbIntegration::initialize() screenAdded(m_primaryScreen); else qWarning("linuxfb: Failed to initialize screen"); + + m_inputContext = QPlatformInputContextFactory::create(); + + m_vtHandler.reset(new QFbVtHandler); } bool QLinuxFbIntegration::hasCapability(QPlatformIntegration::Capability cap) const @@ -80,11 +88,6 @@ bool QLinuxFbIntegration::hasCapability(QPlatformIntegration::Capability cap) co } } -QPlatformPixmap *QLinuxFbIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const -{ - return new QRasterPlatformPixmap(type); -} - QPlatformBackingStore *QLinuxFbIntegration::createPlatformBackingStore(QWindow *window) const { return new QFbBackingStore(window); @@ -109,7 +112,12 @@ QList<QPlatformScreen *> QLinuxFbIntegration::screens() const QPlatformFontDatabase *QLinuxFbIntegration::fontDatabase() const { - return m_fontDb; + return m_fontDb.data(); +} + +QPlatformServices *QLinuxFbIntegration::services() const +{ + return m_services.data(); } QT_END_NAMESPACE diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h index 965a6e4642..67742ecab9 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h @@ -46,9 +46,9 @@ QT_BEGIN_NAMESPACE -class QLinuxFbIntegrationPrivate; class QAbstractEventDispatcher; class QLinuxFbScreen; +class QFbVtHandler; class QLinuxFbIntegration : public QPlatformIntegration { @@ -59,21 +59,25 @@ public: void initialize() Q_DECL_OVERRIDE; bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE; - QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const Q_DECL_OVERRIDE; QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE; QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE; + QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE; + QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE; + QPlatformServices *services() const Q_DECL_OVERRIDE; + QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE { return m_inputContext; } QList<QPlatformScreen *> screens() const; private: QLinuxFbScreen *m_primaryScreen; - QPlatformFontDatabase *m_fontDb; - + QPlatformInputContext *m_inputContext; + QScopedPointer<QPlatformFontDatabase> m_fontDb; + QScopedPointer<QPlatformServices> m_services; + QScopedPointer<QFbVtHandler> m_vtHandler; }; QT_END_NAMESPACE #endif // QLINUXFBINTEGRATION_H - |