4#ifndef QSGINTERNALTEXTNODE_P_H
5#define QSGINTERNALTEXTNODE_P_H
22#include <QtGui/qcolor.h>
23#include <QtGui/qtextlayout.h>
24#include <QtCore/qvarlengtharray.h>
25#include <QtCore/qscopedpointer.h>
62 m_textStyle = textStyle;
72 m_styleColor = styleColor;
82 m_linkColor = linkColor;
92 m_selectionColor = selectionColor;
97 return m_selectionColor;
102 m_selectionTextColor = selectionTextColor;
107 return m_selectionTextColor;
112 m_renderTypeQuality = renderTypeQuality;
116 return m_renderTypeQuality;
121 m_renderType = renderType;
131 m_filtering = filtering;
155 void clear()
override;
161 QPair<int, int>
renderedLineRange()
const {
return { m_firstLineInViewport, m_firstLinePastViewport }; }
169 int lineCount)
override;
174 int selectionEnd)
override;
178 QList<QSGTexture *> m_textures;
180 RenderType m_renderType = QtRendering;
181 TextStyle m_textStyle =
Normal;
189 int m_renderTypeQuality = -1;
190 int m_firstLineInViewport = -1;
191 int m_firstLinePastViewport = -1;
The QColor class provides colors based on RGB, HSV or CMYK values.
The QGlyphRun class provides direct access to the internal glyphs in a font.
\inmodule QtCore\reentrant
The QRawFont class provides access to a single physical instance of a font.
\inmodule QtCore\reentrant
The QSGClipNode class implements the clipping functionality in the scene graph.
The QSGContext holds the scene graph entry points for one QML engine.
QColor linkColor() const override
Returns the color of hyperlinks in the text.
void setSelectionTextColor(QColor selectionTextColor) override
Sets the color of the selection text to selectionTextColor when any part of the text is marked as sel...
void setTextStyle(TextStyle textStyle) override
Sets the style of the rendered text to textStyle.
QColor selectionColor() const override
Returns the color of the selection background when any part of the text is marked as selected.
QPair< int, int > renderedLineRange() const
RenderType renderType() const override
Returns the type of glyph node used for rendering the text.
void setLinkColor(QColor linkColor) override
Sets the color of or hyperlinks to linkColor in the text.
QSGInternalRectangleNode * cursorNode() const
TextStyle textStyle() override
Returns the style of the rendered text.
void setFiltering(QSGTexture::Filtering filtering) override
Sets the sampling mode used when scaling images that are part of the displayed text to filtering.
void setRenderType(RenderType renderType) override
Sets the type of glyph node in use to renderType.
QSGTexture::Filtering filtering() const override
Returns the sampling mode used when scaling images that are part of the displayed text.
static bool isComplexRichText(QTextDocument *)
void setRenderTypeQuality(int renderTypeQuality) override
If the \l renderType() in use supports it, set the quality to use when rendering the text.
int renderTypeQuality() const override
Returns the render type quality of the node.
QRectF viewport() const override
Returns the current viewport set for this QSGTextNode.
QColor selectionTextColor() const override
Returns the color of the selection text when any part of the text is marked as selected.
void setStyleColor(QColor styleColor) override
Sets the style color to use when rendering the text to styleColor.
void setColor(QColor color) override
Sets the main color to use when rendering the text to color.
void setViewport(const QRectF &viewport) override
Sets the bounding rect of the viewport where the text is displayed to viewport.
void setSelectionColor(QColor selectionColor) override
Sets the color of the selection background to color when any part of the text is marked as selected.
QColor color() const override
Returns the main color used when rendering the text.
QColor styleColor() const override
Returns the style color used when rendering the text.
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
The QSGTextNode class is a class for drawing text layouts and text documents in the Qt Quick scene gr...
RenderType
This enum type describes type of glyph node used for rendering the text.
TextStyle
This enum type describes styles that can be applied to text rendering.
Filtering
Specifies how sampling of texels should filter when texture coordinates are not pixel aligned.
\reentrant \inmodule QtGui
Combined button and popup list for selecting options.
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
item setCursor(Qt::IBeamCursor)
[1]
view viewport() -> scroll(dx, dy, deviceRect)