6#include <QtGui/qcolor.h>
7#include <QtGui/qevent.h>
8#include <QtGui/qglyphrun.h>
9#include <QtGui/qtextcursor.h>
10#include <QtGui/qtextformat.h>
11#include <QtGui/qtguiglobal.h>
13#include <QtCore/qlist.h>
14#include <QtCore/qnamespace.h>
15#include <QtCore/qobject.h>
16#include <QtCore/qrect.h>
17#include <QtCore/qstring.h>
38 inline bool isValid()
const {
return eng; }
43 qreal descent()
const;
52 int textPosition()
const;
54 int formatIndex()
const;
73 RetrieveGlyphIndexes = 0x1,
74 RetrieveGlyphPositions = 0x2,
75 RetrieveStringIndexes = 0x4,
78 DefaultRetrievalFlags = RetrieveGlyphIndexes | RetrieveGlyphPositions,
90 void setFont(
const QFont &
f);
94 void setRawFont(
const QRawFont &rawFont);
104 int preeditAreaPosition()
const;
105 QString preeditAreaText()
const;
121 void setCacheEnabled(
bool enable);
122 bool cacheEnabled()
const;
133 int lineCount()
const;
141 bool isValidCursorPosition(
int pos)
const;
142 int nextCursorPosition(
int oldPos, CursorMode
mode = SkipCharacters)
const;
143 int previousCursorPosition(
int oldPos, CursorMode
mode = SkipCharacters)
const;
144 int leftCursorPosition(
int oldPos)
const;
145 int rightCursorPosition(
int oldPos)
const;
158 qreal minimumWidth()
const;
159 qreal maximumWidth()
const;
161#if !defined(QT_NO_RAWFONT)
163# if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
169 GlyphRunRetrievalFlags
flags = DefaultRetrievalFlags)
const;
174 void setFlags(
int flags);
183 QRectF *brect,
int tabstops,
int* tabarray,
int tabarraylen,
200 qreal ascent()
const;
201 qreal descent()
const;
203 qreal leading()
const;
205 void setLeadingIncluded(
bool included);
206 bool leadingIncluded()
const;
208 qreal naturalTextWidth()
const;
209 qreal horizontalAdvance()
const;
210 QRectF naturalTextRect()
const;
222 qreal cursorToX(
int *cursorPos, Edge edge = Leading)
const;
224 int xToCursor(
qreal x, CursorPosition = CursorBetweenCharacters)
const;
227 void setNumColumns(
int columns);
228 void setNumColumns(
int columns,
qreal alignmentWidth);
233 int textStart()
const;
234 int textLength()
const;
240#if !defined(QT_NO_RAWFONT)
241# if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
The QGraphicsSimpleTextItem class provides a simple text path item that you can add to a QGraphicsSce...
The QPainter class performs low-level painting on widgets and other paint devices.
The QPalette class contains color groups for each widget state.
\inmodule QtCore\reentrant
The QRawFont class provides access to a single physical instance of a font.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QTextInlineObject(int i, QTextEngine *e)
bool isValid() const
Returns true if this inline object is valid; otherwise returns false.
QTextEngine * engine() const
CursorMode
\value SkipCharacters \value SkipWords
qreal cursorToX(int cursorPos, Edge edge=Leading) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QTextLine()
Creates an invalid line.
Edge
\value Leading \value Trailing
CursorPosition
\value CursorBetweenCharacters \value CursorOnCharacter
@ CursorBetweenCharacters
bool isValid() const
Returns true if this text line is valid; otherwise returns false.
int lineNumber() const
Returns the position of the line in the text engine.
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
n void setPosition(void) \n\
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
GLenum const void GLbitfield GLsizei numGlyphs
GLint GLsizei GLsizei GLenum format
static const QRectF boundingRect(const QPointF *points, int pointCount)
QT_BEGIN_NAMESPACE void qt_format_text(const QFont &fnt, const QRectF &_r, int tf, const QTextOption *opt, const QString &str, QRectF *brect, int tabstops, int *, int tabarraylen, QPainter *painter)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
myFilter draw(painter, QPoint(0, 0), originalPixmap)
QItemSelection * selection
[0]
insertRed setText("insert red text")
friend bool operator==(const FormatRange &lhs, const FormatRange &rhs)
\variable QTextLayout::FormatRange::start Specifies the beginning of the format range within the text...
friend bool operator!=(const FormatRange &lhs, const FormatRange &rhs)
Returns true if any of the {start}, {length}, or {format} fields in lhs and rhs contain different val...