summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.h')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h
index c869095769..b4c4463e51 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.h
+++ b/src/plugins/platforms/windows/qwindowsfontengine.h
@@ -57,6 +57,7 @@
#include <QtGui/QImage>
#include <QtCore/QSharedPointer>
+#include <QtCore/QMetaType>
#include "qtwindows_additional.h"
@@ -67,10 +68,14 @@ class QWindowsFontEngineData;
class QWindowsFontEngine : public QFontEngine
{
- Q_DISABLE_COPY(QWindowsFontEngine)
+ Q_OBJECT
+ Q_PROPERTY(HFONT hFont READ hFont STORED false)
+ Q_PROPERTY(LOGFONT logFont READ logFont STORED false)
+ Q_PROPERTY(bool trueType READ trueType STORED false)
+
public:
QWindowsFontEngine(const QString &name, HFONT, bool, LOGFONT,
- QSharedPointer<QWindowsFontEngineData> fontEngineData);
+ const QSharedPointer<QWindowsFontEngineData> &fontEngineData);
~QWindowsFontEngine();
void initFontInfo(const QFontDef &request,
@@ -128,8 +133,13 @@ public:
bool getOutlineMetrics(glyph_t glyph, const QTransform &t, glyph_metrics_t *metrics) const;
- QSharedPointer<QWindowsFontEngineData> fontEngineData() const { return m_fontEngineData; }
- LOGFONT logfont() const { return m_logfont; }
+ const QSharedPointer<QWindowsFontEngineData> &fontEngineData() const { return m_fontEngineData; }
+
+ // Properties accessed by QWin32PrintEngine (QtPrintSupport)
+ LOGFONT logFont() const { return m_logfont; }
+ HFONT hFont() const { return hfont; }
+ bool trueType() const { return ttf; }
+
void setUniqueFamilyName(const QString &newName) { uniqueFamilyName = newName; }
private:
@@ -176,5 +186,8 @@ public:
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(HFONT)
+Q_DECLARE_METATYPE(LOGFONT)
+
#endif // QWINDOWSFONTENGINE_H