Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtextimagehandler.cpp File Reference

(ab2f4ef8fad82fd07dac8768b8dcb94b11b271b6)

#include "qtextimagehandler_p.h"
#include <qguiapplication.h>
#include <qtextformat.h>
#include <qpainter.h>
#include <qdebug.h>
#include <qfile.h>
#include <private/qtextengine_p.h>
#include <qpalette.h>
#include <qthread.h>
#include <limits>
#include "moc_qtextimagehandler_p.cpp"
+ Include dependency graph for qtextimagehandler.cpp:

Go to the source code of this file.

Functions

static QString findAtNxFileOrResource (const QString &baseFileName, qreal targetDevicePixelRatio, qreal *sourceDevicePixelRatio)
 
static QUrl fromLocalfileOrResources (QString path)
 
template<typename T >
static T getAs (QTextDocument *doc, const QTextImageFormat &format, const qreal devicePixelRatio=1.0)
 
template<typename T >
static QSize getSize (QTextDocument *doc, const QTextImageFormat &format)
 

Function Documentation

◆ findAtNxFileOrResource()

static QString findAtNxFileOrResource ( const QString & baseFileName,
qreal targetDevicePixelRatio,
qreal * sourceDevicePixelRatio )
inlinestatic

Definition at line 21 of file qtextimagehandler.cpp.

References QUrl::isLocalFile(), qt_findAtNxFile(), QString::sliced(), QUrl::toLocalFile(), and url.

Referenced by getAs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromLocalfileOrResources()

static QUrl fromLocalfileOrResources ( QString path)
inlinestatic

Definition at line 40 of file qtextimagehandler.cpp.

Referenced by getAs().

+ Here is the caller graph for this function:

◆ getAs()

template<typename T >
static T getAs ( QTextDocument * doc,
const QTextImageFormat & format,
const qreal devicePixelRatio = 1.0 )
static

Definition at line 48 of file qtextimagehandler.cpp.

References QTextDocument::addResource(), findAtNxFileOrResource(), fromLocalfileOrResources(), QTextDocument::ImageResource, QTextDocument::resource(), and url.

+ Here is the call graph for this function:

◆ getSize()

template<typename T >
static QSize getSize ( QTextDocument * doc,
const QTextImageFormat & format )
static