summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qvfb
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-20 10:33:33 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-09-02 13:25:37 (GMT)
commit5e7fdcc7a4a2bb070ad7ece920ac5db81e3e6f77 (patch)
tree5a67130cd7144084adceed7c5e1697e650cee20f /src/plugins/platforms/qvfb
parentde66ffa4d7d057f0c782edc45374ad58322a0c4c (diff)
downloadQt-5e7fdcc7a4a2bb070ad7ece920ac5db81e3e6f77.zip
Qt-5e7fdcc7a4a2bb070ad7ece920ac5db81e3e6f77.tar.gz
Qt-5e7fdcc7a4a2bb070ad7ece920ac5db81e3e6f77.tar.bz2
Initial pluggable fontdatabase
QPlatformFontDatabase added. QPlatformIntegration now has a new virtual function: QPlatformDatabase::fontDatabase() const. Most unix platform plugins wants to follow the pattern implemented in directfb, linuxfb, vnc etc. In the pro file do: include(../fontdatabases/genericunix/genericunix.pri) In the QPlatformIntegration class do: and instansiate a QGenericFontDatabase in the constructor and return it in the getter function.
Diffstat (limited to 'src/plugins/platforms/qvfb')
-rw-r--r--src/plugins/platforms/qvfb/qvfb.pro2
-rw-r--r--src/plugins/platforms/qvfb/qvfbintegration.cpp8
-rw-r--r--src/plugins/platforms/qvfb/qvfbintegration.h3
3 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/platforms/qvfb/qvfb.pro b/src/plugins/platforms/qvfb/qvfb.pro
index a560755..d2b332a 100644
--- a/src/plugins/platforms/qvfb/qvfb.pro
+++ b/src/plugins/platforms/qvfb/qvfb.pro
@@ -7,5 +7,7 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
SOURCES = main.cpp qvfbintegration.cpp qvfbwindowsurface.cpp
HEADERS = qvfbintegration.h qvfbwindowsurface.h
+include(../fontdatabases/genericunix/genericunix.pri)
+
target.path += $$[QT_INSTALL_PLUGINS]/platforms
INSTALLS += target
diff --git a/src/plugins/platforms/qvfb/qvfbintegration.cpp b/src/plugins/platforms/qvfb/qvfbintegration.cpp
index a50763a..0cc3938 100644
--- a/src/plugins/platforms/qvfb/qvfbintegration.cpp
+++ b/src/plugins/platforms/qvfb/qvfbintegration.cpp
@@ -62,6 +62,8 @@
#include <QApplication>
#include <QWindowSystemInterface>
+#include "qgenericunixfontdatabase.h"
+
QT_BEGIN_NAMESPACE
@@ -409,6 +411,7 @@ QImage *QVFbScreen::screenImage()
}
QVFbIntegration::QVFbIntegration(const QStringList &paramList)
+ : mFontDb(new QGenericUnixFontDatabase())
{
int displayId = 0;
if (paramList.length() > 0)
@@ -435,6 +438,11 @@ QPlatformWindow *QVFbIntegration::createPlatformWindow(QWidget *widget, WId) con
return new QVFbWindow(mPrimaryScreen, widget);
}
+QPlatformFontDatabase *QVFbIntegration::fontDatabase() const
+{
+ return mFontDb;
+}
+
QT_END_NAMESPACE
#include "qvfbintegration.moc"
diff --git a/src/plugins/platforms/qvfb/qvfbintegration.h b/src/plugins/platforms/qvfb/qvfbintegration.h
index e46e0da..198a45c 100644
--- a/src/plugins/platforms/qvfb/qvfbintegration.h
+++ b/src/plugins/platforms/qvfb/qvfbintegration.h
@@ -84,9 +84,12 @@ public:
QList<QPlatformScreen *> screens() const { return mScreens; }
+ QPlatformFontDatabase *fontDatabase() const;
+
private:
QVFbScreen *mPrimaryScreen;
QList<QPlatformScreen *> mScreens;
+ QPlatformFontDatabase *mFontDb;
};