Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquicktextdocument_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKTEXTDOCUMENT_P_H
5#define QQUICKTEXTDOCUMENT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qhash.h>
19#include <QtCore/qvariant.h>
20#include <QtGui/qimage.h>
21#include <QtGui/qtextdocument.h>
22#include <QtGui/qabstracttextdocumentlayout.h>
23#include <QtGui/qtextlayout.h>
24#include <QtCore/private/qglobal_p.h>
25
27
28class QQuickItem;
29class QQuickPixmap;
30class QQmlContext;
31
33{
36public:
39
40 int resourcesLoading() const { return outstanding; }
41
42 QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
43 void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
44
45 QImage image(const QTextImageFormat &format) const;
46
47public Q_SLOTS:
48 void clearResources();
49
52
53protected:
54 QVariant loadResource(int type, const QUrl &name) override;
55
56 QQuickPixmap *loadPixmap(QQmlContext *context, const QUrl &name);
57
58private Q_SLOTS:
59 void requestFinished();
60
61private:
63
64 int outstanding;
65 static QSet<QUrl> errors;
66};
67
68namespace QtPrivate {
70{
71public:
73 {
74 return format(pos);
75 }
76};
77} // namespace QtPrivate
78
80
81#endif // QQUICKDOCUMENT_P_H
\inmodule QtCore
Definition qhash.h:818
\inmodule QtGui
Definition qimage.h:37
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
\inmodule QtCore\reentrant
Definition qrect.h:483
Definition qset.h:18
\inmodule QtCore
Definition qsize.h:207
\reentrant \inmodule QtGui
virtual Q_INVOKABLE QVariant loadResource(int type, const QUrl &name)
Loads data of the specified type from the resource with the given name.
\reentrant
Definition qtextformat.h:90
The QTextObjectInterface class allows drawing of custom text objects in \l{QTextDocument}s.
virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format)=0
Draws this text object using the specified painter.
virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format)=0
The intrinsicSize() function returns the size of the text object represented by format in the given d...
\inmodule QtCore
Definition qurl.h:94
\inmodule QtCore
Definition qvariant.h:64
QTextCharFormat formatAccessor(int pos)
rect
[4]
Combined button and popup list for selecting options.
\macro QT_NAMESPACE
Definition image.cpp:4
static void * context
GLenum type
GLuint name
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat p
[1]
#define Q_AUTOTEST_EXPORT
#define Q_OBJECT
#define Q_INTERFACES(x)
#define Q_SLOTS
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent