Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qsgtextnode.h
Go to the documentation of this file.
1
// Copyright (C) 2023 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
QSGTEXTNODE_H
5
#
define
QSGTEXTNODE_H
6
7
#
include
<
QtGui
/
qtextlayout
.
h
>
8
#
include
<
QtQuick
/
qsgnode
.
h
>
9
#
include
<
QtQuick
/
qsgtexture
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
class
Q_QUICK_EXPORT
QSGTextNode
:
public
QSGTransformNode
14
{
15
public
:
16
~QSGTextNode() override;
17
18
// Should match the TextStyle in qquicktext_p.h
19
enum
TextStyle : quint8
20
{
21
Normal,
22
Outline,
23
Raised,
24
Sunken
25
};
26
27
// Should match the RenderType in qquicktext_p.h
28
enum
RenderType: quint8
29
{
30
QtRendering,
31
NativeRendering,
32
CurveRendering
33
};
34
35
virtual
void
setColor(QColor color) = 0;
36
virtual
QColor color()
const
= 0;
37
38
virtual
void
setTextStyle(TextStyle textStyle) = 0;
39
virtual
TextStyle textStyle() = 0;
40
41
virtual
void
setStyleColor(QColor styleColor) = 0;
42
virtual
QColor styleColor()
const
= 0;
43
44
virtual
void
setLinkColor(QColor linkColor) = 0;
45
virtual
QColor linkColor()
const
= 0;
46
47
virtual
void
setSelectionColor(QColor selectionColor) = 0;
48
virtual
QColor selectionColor()
const
= 0;
49
50
virtual
void
setSelectionTextColor(QColor selectionTextColor) = 0;
51
virtual
QColor selectionTextColor()
const
= 0;
52
53
virtual
void
setRenderType(RenderType renderType) = 0;
54
virtual
RenderType renderType()
const
= 0;
55
56
virtual
void
setRenderTypeQuality(
int
renderTypeQuality) = 0;
57
virtual
int
renderTypeQuality()
const
= 0;
58
59
virtual
void
setFiltering(QSGTexture::Filtering) = 0;
60
virtual
QSGTexture::Filtering filtering()
const
= 0;
61
62
virtual
void
clear() = 0;
63
64
virtual
void
setViewport(
const
QRectF &viewport) = 0;
65
virtual
QRectF viewport()
const
= 0;
66
67
// ### Qt 7: add color as an optional argument; think about what else might be missing
68
void
addTextLayout(QPointF position,
69
QTextLayout *layout,
70
int
selectionStart = -1,
71
int
selectionCount = -1,
72
int
lineStart = 0,
73
int
lineCount = -1)
74
{
75
doAddTextLayout(position, layout, selectionStart, selectionCount, lineStart, lineCount);
76
}
77
78
void
addTextDocument(QPointF position,
79
QTextDocument *document,
80
int
selectionStart = -1,
81
int
selectionCount = -1)
82
{
83
doAddTextDocument(position, document, selectionStart, selectionCount);
84
}
85
86
private
:
87
virtual
void
doAddTextLayout(QPointF position,
88
QTextLayout *layout,
89
int
selectionStart,
90
int
selectionCount,
91
int
lineStart,
92
int
lineCount) = 0;
93
virtual
void
doAddTextDocument(QPointF position,
94
QTextDocument *document,
95
int
selectionStart,
96
int
selectionCount) = 0;
97
98
};
99
100
QT_END_NAMESPACE
101
102
#
endif
// QSGTEXTNODE_H
QQuickTextNodeEngine
Definition
qquicktextnodeengine_p.h:37
QQuickTextPrivate
Definition
qquicktext_p_p.h:34
QSGInternalTextNode
\inmodule QtQuick
Definition
qsginternaltextnode_p.h:46
QSGTextNode
The QSGTextNode class is a class for drawing text layouts and text documents in the Qt Quick scene gr...
Definition
qsgtextnode.h:14
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Q_STATIC_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
QQUICKTEXT_LARGETEXT_THRESHOLD
#define QQUICKTEXT_LARGETEXT_THRESHOLD
Definition
qquicktext.cpp:45
positionInlineImage
static void positionInlineImage(QQuickStyledTextImgTag *image, int textPos, const QTextLine &line)
Definition
qquicktext.cpp:733
getLinks_helper
static void getLinks_helper(const QTextLayout *layout, QList< QQuickTextPrivate::LinkDesc > *links)
Definition
qquicktext.cpp:3067
qtdeclarative
src
quick
scenegraph
util
qsgtextnode.h
Generated on
for Qt by
1.18.0