summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/vnc
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/vnc
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/vnc')
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.cpp8
-rw-r--r--src/plugins/platforms/vnc/qvncintegration.h4
-rw-r--r--src/plugins/platforms/vnc/vnc.pro1
3 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/platforms/vnc/qvncintegration.cpp b/src/plugins/platforms/vnc/qvncintegration.cpp
index 331c16a..b36ff33 100644
--- a/src/plugins/platforms/vnc/qvncintegration.cpp
+++ b/src/plugins/platforms/vnc/qvncintegration.cpp
@@ -49,6 +49,7 @@
#include <QtGui/QPainter>
#include <QtCore/QTimer>
+#include "qgenericunixfontdatabase.h"
QVNCScreen::QVNCScreen(QRect screenSize, int screenId)
: QFbScreen::QFbScreen()
@@ -100,7 +101,7 @@ static void usage()
}
QVNCIntegration::QVNCIntegration(const QStringList& paramList)
- : virtualDesktop(false)
+ : virtualDesktop(false), fontDb(new QGenericUnixFontDatabase())
{
int sizeX = defaultWidth();
int sizeY = defaultHeight();
@@ -234,3 +235,8 @@ void QVNCIntegration::moveToScreen(QWidget *window, int screen)
window->platformWindow()->setGeometry(window->geometry()); // this should be unified elsewhere
newScreen->addWindow(static_cast<QFbWindow *>(window->platformWindow()));
}
+
+QPlatformFontDatabase *QVNCIntegration::fontDatabase() const
+{
+ return fontDb;
+}
diff --git a/src/plugins/platforms/vnc/qvncintegration.h b/src/plugins/platforms/vnc/qvncintegration.h
index 241993d..dfc0e6b 100644
--- a/src/plugins/platforms/vnc/qvncintegration.h
+++ b/src/plugins/platforms/vnc/qvncintegration.h
@@ -45,6 +45,7 @@
#include "qvnccursor.h"
#include "../fb_base/fb_base.h"
#include <QPlatformIntegration>
+#include "qgenericunixfontdatabase.h"
QT_BEGIN_NAMESPACE
@@ -91,10 +92,13 @@ public:
bool isVirtualDesktop() { return virtualDesktop; }
void moveToScreen(QWidget *window, int screen);
+ QPlatformFontDatabase *fontDatabase() const;
+
private:
QVNCScreen *mPrimaryScreen;
QList<QPlatformScreen *> mScreens;
bool virtualDesktop;
+ QPlatformFontDatabase *fontDb;
};
diff --git a/src/plugins/platforms/vnc/vnc.pro b/src/plugins/platforms/vnc/vnc.pro
index 65824a2..6c448f5 100644
--- a/src/plugins/platforms/vnc/vnc.pro
+++ b/src/plugins/platforms/vnc/vnc.pro
@@ -13,6 +13,7 @@ HEADERS += qvnccursor.h
SOURCES += qvnccursor.cpp
include(../fb_base/fb_base.pri)
+include(../fontdatabases/genericunix/genericunix.pri)
target.path += $$[QT_INSTALL_PLUGINS]/platforms