QtGui/qtextlayout.h Source File
Go to the documentation of this file.
74 inline bool isValid()
const {
return eng; }
79 qreal descent()
const;
84 void setWidth(qreal
w);
85 void setAscent(qreal
a);
86 void setDescent(qreal d);
88 int textPosition()
const;
90 int formatIndex()
const;
91 QTextFormat
format()
const;
115 void setFont(
const QFont &
f);
118 void setText(
const QString&
string);
124 void setPreeditArea(
int position,
const QString &text);
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;
169 void setPosition(
const QPointF &p);
171 QRectF boundingRect()
const;
173 qreal minimumWidth()
const;
174 qreal maximumWidth()
const;
176 #if !defined(QT_NO_RAWFONT)
180 QTextEngine *
engine()
const {
return d; }
181 void setFlags(
int flags);
187 friend class QPSPrinter;
188 friend class QGraphicsSimpleTextItemPrivate;
191 QRectF *brect,
int tabstops,
int* tabarray,
int tabarraylen,
207 qreal ascent()
const;
208 qreal descent()
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;
231 int xToCursor(qreal
x, CursorPosition = CursorBetweenCharacters)
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;
248 QTextLine(
int line, QTextEngine *e) : i(line), eng(e) {}
249 void layout_helper(
int numGlyphs);
251 #if !defined(QT_NO_RAWFONT)
265 #endif // QTEXTLAYOUT_H
QTextEngine * engine() const
#define QT_BEGIN_NAMESPACE
GLenum GLsizei GLenum format
GLenum GLsizei GLsizei height
GLuint GLsizei GLsizei * length
qreal cursorToX(int cursorPos, Edge edge=Leading) const
GLubyte GLubyte GLubyte a
GLubyte GLubyte GLubyte GLubyte w
QTextInlineObject(int i, QTextEngine *e)