44 #include <QtCore/qstring.h> 45 #include <QtCore/qnamespace.h> 46 #include <QtCore/qrect.h> 47 #include <QtCore/qvector.h> 48 #include <QtGui/qcolor.h> 49 #include <QtCore/qobject.h> 50 #include <QtGui/qevent.h> 51 #include <QtGui/qtextformat.h> 52 #include <QtGui/qglyphrun.h> 53 #include <QtGui/qtextcursor.h> 74 inline bool isValid()
const {
return eng; }
79 qreal descent()
const;
84 void setWidth(
qreal w);
88 int textPosition()
const;
90 int formatIndex()
const;
115 void setFont(
const QFont &f);
118 void setText(
const QString&
string);
125 int preeditAreaPosition()
const;
126 QString preeditAreaText()
const;
135 void clearAdditionalFormats();
137 void setCacheEnabled(
bool enable);
138 bool cacheEnabled()
const;
149 int lineCount()
const;
151 QTextLine lineForTextPosition(
int pos)
const;
157 bool isValidCursorPosition(
int pos)
const;
158 int nextCursorPosition(
int oldPos,
CursorMode mode = SkipCharacters)
const;
159 int previousCursorPosition(
int oldPos,
CursorMode mode = SkipCharacters)
const;
160 int leftCursorPosition(
int oldPos)
const;
161 int rightCursorPosition(
int oldPos)
const;
165 void drawCursor(
QPainter *p,
const QPointF &pos,
int cursorPosition)
const;
166 void drawCursor(
QPainter *p,
const QPointF &pos,
int cursorPosition,
int width)
const;
169 void setPosition(
const QPointF &p);
173 qreal minimumWidth()
const;
174 qreal maximumWidth()
const;
176 #if !defined(QT_NO_RAWFONT) 181 void setFlags(
int flags);
191 QRectF *brect,
int tabstops,
int* tabarray,
int tabarraylen,
207 qreal ascent()
const;
208 qreal descent()
const;
209 qreal height()
const;
210 qreal leading()
const;
212 void setLeadingIncluded(
bool included);
213 bool leadingIncluded()
const;
215 qreal naturalTextWidth()
const;
216 qreal horizontalAdvance()
const;
217 QRectF naturalTextRect()
const;
229 qreal cursorToX(
int *cursorPos,
Edge edge = Leading)
const;
233 void setLineWidth(
qreal width);
234 void setNumColumns(
int columns);
235 void setNumColumns(
int columns,
qreal alignmentWidth);
237 void setPosition(
const QPointF &pos);
240 int textStart()
const;
241 int textLength()
const;
249 void layout_helper(
int numGlyphs);
251 #if !defined(QT_NO_RAWFONT) 265 #endif // QTEXTLAYOUT_H The QPainter class performs low-level painting on widgets and other paint devices.
QTextEngine * engine() const
The QTextLayout::FormatRange structure is used to apply extra formatting information for a specified ...
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
#define QT_END_NAMESPACE
This macro expands to.
QTextInlineObject(int i, QTextEngine *e)
Creates a new inline object for the item at position i in the text engine e.
The QPointF class defines a point in the plane using floating point precision.
The QTextLine class represents a line of text inside a QTextLayout.
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
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.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
long ASN1_INTEGER_get ASN1_INTEGER * a
int start
Specifies the beginning of the format range within the text layout's text.
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
bool isValid() const
Returns true if this text line is valid; otherwise returns false.
static const QRectF boundingRect(const QPointF *points, int pointCount)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QTextFormat class provides formatting information for a QTextDocument.
int lineNumber() const
Returns the position of the line in the text engine.
QTextLayout(QTextEngine *e)
The QTextBlock class provides a container for text fragments in a QTextDocument.
The QRegion class specifies a clip region for a painter.
The QTextFragment class holds a piece of text in a QTextDocument with a single QTextCharFormat.
The QGraphicsSimpleTextItem class provides a simple text path item that you can add to a QGraphicsSce...
The QTextLayout class is used to lay out and render text.
CursorMoveStyle
This enum describes the movement style available to text cursors.
The QTextInlineObject class represents an inline object in a QTextLayout.
The QFont class specifies a font used for drawing text.
The QRect class defines a rectangle in the plane using integer precision.
The QTextOption class provides a description of general rich text properties.
int length
Specifies the numer of characters the format range spans.
QTextCharFormat format
Specifies the format to apply.
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)
bool isValid() const
Returns true if this inline object is valid; otherwise returns false.
QTextLine(int line, QTextEngine *e)
The QList class is a template class that provides lists.
The QPalette class contains color groups for each widget state.