diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-09-20 10:19:18 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-21 13:46:08 +0200 |
commit | 0992a24653eacf2f32741dce91c54980a7cefe10 (patch) | |
tree | c5c0b5527635ff26f87e0828730c29f30750614c /src/gui/text/qtextimagehandler_p.h | |
parent | bc60b6787c791be0168820c42febfdb57b5070e0 (diff) |
Export QTextImageHandler and add accessor for image
To allow optimizations in the scene graph, we export the private
QTextImageHandler class and add a function which will fetch
a given image when required, or return the cached image in the
document resources.
Task-number: QTBUG-20917
Change-Id: If45e51b0d9a267bc198623165e7a2cc1fb2b961f
Reviewed-on: http://codereview.qt-project.org/5227
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/gui/text/qtextimagehandler_p.h')
-rw-r--r-- | src/gui/text/qtextimagehandler_p.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qtextimagehandler_p.h b/src/gui/text/qtextimagehandler_p.h index 8285328da9..8a14a46d5f 100644 --- a/src/gui/text/qtextimagehandler_p.h +++ b/src/gui/text/qtextimagehandler_p.h @@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE class QTextImageFormat; -class QTextImageHandler : public QObject, - public QTextObjectInterface +class Q_GUI_EXPORT QTextImageHandler : public QObject, + public QTextObjectInterface { Q_OBJECT Q_INTERFACES(QTextObjectInterface) @@ -70,9 +70,10 @@ public: virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format); virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format); + QImage image(QTextDocument *doc, const QTextImageFormat &imageFormat); typedef QImage (*ExternalImageLoaderFunction)(const QString &name, const QString &context); - static Q_GUI_EXPORT ExternalImageLoaderFunction externalLoader; //this is needed by Qt3Support + static ExternalImageLoaderFunction externalLoader; //this is needed by Qt3Support }; QT_END_NAMESPACE |