11#include <QtQml/qqmlinfo.h>
12#include <QtQml/qqmlcontext.h>
13#include <QtQuick/private/qquickpixmapcache_p.h>
60 return d->document.data();
93void QQuickTextDocumentWithImageResources::requestFinished()
96 if (outstanding == 0) {
105 if (
format.isImageFormat()) {
114 if (!hasWidth || !hasHeight) {
117 if (
image.isNull()) {
161 if (
iter == m_resources.
end()) {
165 if (
p->isLoading()) {
166 p->connectFinished(
this,
SLOT(requestFinished()));
190QSet<QUrl> QQuickTextDocumentWithImageResources::errors;
194#include "moc_qquicktextdocument.cpp"
195#include "moc_qquicktextdocument_p.cpp"
void registerHandler(int objectType, QObject *component)
Registers the given component as a handler for items of the given objectType.
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QPainter class performs low-level painting on widgets and other paint devices.
The QQmlContext class defines a context within a QML engine.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QPointer< QTextDocument > document
QVariant loadResource(int type, const QUrl &name) override
Loads data of the specified type from the resource with the given name.
void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override
Draws this text object using the specified painter.
QQuickTextDocumentWithImageResources(QQuickItem *parent)
QImage image(const QTextImageFormat &format) const
virtual ~QQuickTextDocumentWithImageResources()
QQuickPixmap * loadPixmap(QQmlContext *context, const QUrl &name)
QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override
The intrinsicSize() function returns the size of the text object represented by format in the given d...
The QQuickTextDocument class provides access to the QTextDocument of QQuickTextEdit....
QQuickTextDocument(QQuickItem *parent)
Constructs a QQuickTextDocument object with parent as the parent object.
QTextDocument * textDocument() const
Returns a pointer to the QTextDocument object.
\inmodule QtCore\reentrant
bool contains(const T &value) const
iterator insert(const T &value)
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
\reentrant \inmodule QtGui
QAbstractTextDocumentLayout * documentLayout() const
Returns the document layout for this document.
QSizeF size
the actual size of the document. This is equivalent to documentLayout()->documentSize();
void baseUrlChanged(const QUrl &url)
QVariant resource(int type, const QUrl &name) const
Returns data of the specified type from the resource with the given name.
void setUndoRedoEnabled(bool enable)
QUrl baseUrl
the base URL used to resolve relative resource URLs within the document.
virtual Q_INVOKABLE QVariant loadResource(int type, const QUrl &name)
Loads data of the specified type from the resource with the given name.
void markContentsDirty(int from, int length)
Marks the contents specified by the given position and length as "dirty", informing the document that...
int characterCount() const
QTextImageFormat toImageFormat() const
Returns this format as an image format.
bool hasProperty(int propertyId) const
Returns true if the text format has a property with the given propertyId; otherwise returns false.
qreal width() const
Returns the width of the rectangle occupied by the image.
qreal height() const
Returns the height of the rectangle occupied by the image.
QString name() const
Returns the name of the image.
QUrl resolved(const QUrl &relative) const
Returns the result of the merge of this URL with relative.
bool isNull() const
Returns true if this is a null variant, false otherwise.
qDeleteAll(list.begin(), list.end())
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
int qRound(qfloat16 d) noexcept
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
QQmlContext * qmlContext(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
QUrl url("example.com")
[constructor-url-reference]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent