4#include <QtCore/qlist.h>
5#include <QtCore/qvarlengtharray.h>
6#include <QtGui/qcolor.h>
7#include <QtGui/qglyphrun.h>
8#include <QtGui/qimage.h>
9#include <QtGui/qtextdocument.h>
10#include <QtGui/qtextlayout.h>
14#ifndef QQUICKTEXTNODEENGINE_P_H
15#define QQUICKTEXTNODEENGINE_P_H
113 : m_currentTextDirection(
Qt::LeftToRight)
114 , m_hasSelection(
false)
115 , m_hasContents(
false)
126 processCurrentLine();
133 m_currentTextDirection = textDirection;
137 const QBrush &borderBrush);
146 int textPos,
int fragmentEnd,
147 int selectionStart,
int selectionEnd);
156 int selectionStart,
int selectionEnd);
159 int selectionStart,
int selectionEnd);
169 m_selectionColor = selectionColor;
174 m_selectedTextColor = selectedTextColor;
179 m_textColor = textColor;
184 m_anchorColor = anchorColor;
196 struct TextDecoration
198 TextDecoration() : selectionState(
Unselected) {}
213 void processCurrentLine();
221 QColor m_selectedTextColor;
235 bool m_hasSelection : 1;
236 bool m_hasContents : 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
void addSelectedGlyphs(const QGlyphRun &glyphRun)
void addUnselectedGlyphs(const QGlyphRun &glyphRun)
void addTextObject(const QTextBlock &block, const QPointF &position, const QTextCharFormat &format, SelectionState selectionState, QTextDocument *textDocument, int pos, QTextFrameFormat::Position layoutPosition=QTextFrameFormat::InFlow)
void addToSceneGraph(QQuickTextNode *parent, QQuickText::TextStyle style=QQuickText::Normal, const QColor &styleColor=QColor())
void mergeProcessedNodes(QList< BinaryTreeNode * > *regularNodes, QList< BinaryTreeNode * > *imageNodes)
void addTextBlock(QTextDocument *, const QTextBlock &, const QPointF &position, const QColor &textColor, const QColor &anchorColor, int selectionStart, int selectionEnd, const QRectF &viewport=QRectF())
void addGlyphsInRange(int rangeStart, int rangeEnd, const QColor &color, const QColor &backgroundColor, const QColor &underlineColor, int selectionStart, int selectionEnd)
void setTextColor(const QColor &textColor)
QTextLine currentLine() const
void setCurrentLine(const QTextLine ¤tLine)
int addText(const QTextBlock &block, const QTextCharFormat &charFormat, const QColor &textColor, const QVarLengthArray< QTextLayout::FormatRange > &colorChanges, int textPos, int fragmentEnd, int selectionStart, int selectionEnd)
void setAnchorColor(const QColor &anchorColor)
void addImage(const QRectF &rect, const QImage &image, qreal ascent, SelectionState selectionState, QTextFrameFormat::Position layoutPosition)
void addBorder(const QRectF &rect, qreal border, QTextFrameFormat::BorderStyle borderStyle, const QBrush &borderBrush)
void setPosition(const QPointF &position)
void setSelectionColor(const QColor &selectionColor)
void addFrameDecorations(QTextDocument *document, QTextFrame *frame)
void setCurrentTextDirection(Qt::LayoutDirection textDirection)
void addGlyphsForRanges(const QVarLengthArray< QTextLayout::FormatRange > &ranges, int start, int end, int selectionStart, int selectionEnd)
void setSelectedTextColor(const QColor &selectedTextColor)
\inmodule QtCore\reentrant
\reentrant \inmodule QtGui
Position
This enum describes how a frame is located relative to the surrounding text.
bool isValid() const
Returns true if this text line is valid; otherwise returns false.
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
view viewport() -> scroll(dx, dy, deviceRect)
bool operator==(const BinaryTreeNodeKey &otherKey) const
QQuickDefaultClipNode * clipNode
SelectionState selectionState
QList< QPair< int, int > > ranges
static void insert(QVarLengthArray< BinaryTreeNode, 16 > *binaryTree, const QRectF &rect, const QImage &image, qreal ascent, SelectionState selectionState)
QQuickDefaultClipNode * clipNode
static void inOrder(const QVarLengthArray< BinaryTreeNode, 16 > &binaryTree, QVarLengthArray< int > *sortedIndexes, int currentIndex=0)
BinaryTreeNode(const QRectF &brect, const QImage &i, SelectionState selState, qreal a)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent