QtGui/qtextcursor.h Source File
Go to the documentation of this file.
56 class QTextCursorPrivate;
64 class QTextDocumentPrivate;
74 explicit QTextCursor(QTextDocument *document);
75 QTextCursor(QTextDocumentPrivate *
p,
int pos);
76 explicit QTextCursor(QTextFrame *frame);
77 explicit QTextCursor(
const QTextBlock &block);
78 explicit QTextCursor(QTextCursorPrivate *d);
79 QTextCursor(
const QTextCursor &cursor);
80 QTextCursor &operator=(
const QTextCursor &other);
90 void setPosition(
int pos, MoveMode
mode = MoveAnchor);
92 int positionInBlock()
const;
96 void insertText(
const QString &text);
97 void insertText(
const QString &text,
const QTextCharFormat &
format);
130 bool movePosition(MoveOperation op, MoveMode = MoveAnchor,
int n = 1);
132 bool visualNavigation()
const;
133 void setVisualNavigation(
bool b);
135 void setVerticalMovementX(
int x);
136 int verticalMovementX()
const;
138 void setKeepPositionOnInsert(
bool b);
139 bool keepPositionOnInsert()
const;
142 void deletePreviousChar();
150 void select(SelectionType selection);
152 bool hasSelection()
const;
153 bool hasComplexSelection()
const;
154 void removeSelectedText();
155 void clearSelection();
156 int selectionStart()
const;
157 int selectionEnd()
const;
160 QTextDocumentFragment selection()
const;
161 void selectedTableCells(
int *firstRow,
int *numRows,
int *firstColumn,
int *numColumns)
const;
163 QTextBlock block()
const;
165 QTextCharFormat charFormat()
const;
166 void setCharFormat(
const QTextCharFormat &
format);
167 void mergeCharFormat(
const QTextCharFormat &modifier);
169 QTextBlockFormat blockFormat()
const;
170 void setBlockFormat(
const QTextBlockFormat &
format);
171 void mergeBlockFormat(
const QTextBlockFormat &modifier);
173 QTextCharFormat blockCharFormat()
const;
174 void setBlockCharFormat(
const QTextCharFormat &
format);
175 void mergeBlockCharFormat(
const QTextCharFormat &modifier);
177 bool atBlockStart()
const;
178 bool atBlockEnd()
const;
179 bool atStart()
const;
183 void insertBlock(
const QTextBlockFormat &
format);
184 void insertBlock(
const QTextBlockFormat &
format,
const QTextCharFormat &charFormat);
186 QTextList *insertList(
const QTextListFormat &
format);
189 QTextList *createList(
const QTextListFormat &
format);
191 QTextList *currentList()
const;
193 QTextTable *insertTable(
int rows,
int cols,
const QTextTableFormat &
format);
194 QTextTable *insertTable(
int rows,
int cols);
195 QTextTable *currentTable()
const;
197 QTextFrame *insertFrame(
const QTextFrameFormat &
format);
198 QTextFrame *currentFrame()
const;
200 void insertFragment(
const QTextDocumentFragment &fragment);
202 #ifndef QT_NO_TEXTHTMLPARSER
203 void insertHtml(
const QString &html);
204 #endif // QT_NO_TEXTHTMLPARSER
207 void insertImage(
const QTextImageFormat &
format);
211 void beginEditBlock();
212 void joinPreviousEditBlock();
215 bool operator!=(
const QTextCursor &rhs)
const;
216 bool operator<(
const QTextCursor &rhs)
const;
217 bool operator<=(
const QTextCursor &rhs)
const;
218 bool operator==(
const QTextCursor &rhs)
const;
219 bool operator>=(
const QTextCursor &rhs)
const;
220 bool operator>(
const QTextCursor &rhs)
const;
222 bool isCopyOf(
const QTextCursor &other)
const;
224 int blockNumber()
const;
225 int columnNumber()
const;
227 QTextDocument *document()
const;
231 friend class QTextDocumentFragmentPrivate;
232 friend class QTextCopyHelper;
233 friend class QTextControlPrivate;
240 #endif // QTEXTCURSOR_H
bool operator>(const QByteArray &a1, const QByteArray &a2)
GLenum GLsizei GLenum GLenum const GLvoid * image
bool operator<=(const QByteArray &a1, const QByteArray &a2)
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
#define QT_BEGIN_NAMESPACE
GLenum GLsizei GLenum format
bool operator!=(const QByteArray &a1, const QByteArray &a2)
GLuint const GLchar * name
bool operator>=(const QByteArray &a1, const QByteArray &a2)
bool operator<(const QByteArray &a1, const QByteArray &a2)