- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Comparable<QTextCursor>
Offers an API to access and modify QTextDocuments
Java wrapper for Qt class QTextCursor
Either each QTextCursor
object or the QTextDocument
object should be explicitly disposed by calling dispose()
to avoid crashes during garbage collection.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java wrapper for Qt enumQTextCursor::MoveMode
static enum
Java wrapper for Qt enumQTextCursor::MoveOperation
static final class
Result type forselectedTableCells()
.static enum
Java wrapper for Qt enumQTextCursor::SelectionType
-
Constructor Summary
ConstructorDescriptionQTextCursor
(QTextBlock block) QTextCursor
(QTextCursor cursor) QTextCursor
(QTextDocument document) QTextCursor
(QTextFrame frame) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
anchor()
final void
assign
(QTextCursor other) final boolean
final boolean
final boolean
atEnd()
final boolean
atStart()
final void
final QTextBlock
block()
final QTextCharFormat
final QTextBlockFormat
final int
final QTextCharFormat
final void
clone()
Creates and returns a copy of this object.final int
int
compareTo
(QTextCursor other) final QTextList
createList
(QTextListFormat format) final QTextList
createList
(QTextListFormat.Style style) final QTextFrame
final QTextList
final QTextTable
final void
final void
final QTextDocument
document()
final void
final boolean
equals
(QTextCursor rhs) boolean
final boolean
int
hashCode()
Returns the objects's hash code computed byqHash(QTextCursor)
.final boolean
final void
final void
insertBlock
(QTextBlockFormat format) final void
insertBlock
(QTextBlockFormat format, QTextCharFormat charFormat) final void
insertFragment
(QTextDocumentFragment fragment) final QTextFrame
insertFrame
(QTextFrameFormat format) final void
insertHtml
(String html) final void
insertImage
(QImage image) Overloaded function forinsertImage(io.qt.gui.QImage, java.lang.String)
withname = (String)null
.final void
insertImage
(QImage image, String name) final void
insertImage
(QTextImageFormat format) final void
insertImage
(QTextImageFormat format, QTextFrameFormat.Position alignment) final void
insertImage
(String name) final QTextList
insertList
(QTextListFormat format) final QTextList
insertList
(QTextListFormat.Style style) final void
insertMarkdown
(String markdown) Overloaded function forinsertMarkdown(java.lang.String, io.qt.gui.QTextDocument.MarkdownFeatures)
withfeatures = new io.qt.gui.QTextDocument.MarkdownFeatures(20236)
.final void
insertMarkdown
(String markdown, QTextDocument.MarkdownFeature ... features) Overloaded function forinsertMarkdown(java.lang.String, io.qt.gui.QTextDocument.MarkdownFeatures)
.final void
insertMarkdown
(String markdown, QTextDocument.MarkdownFeatures features) final QTextTable
insertTable
(int rows, int cols) final QTextTable
insertTable
(int rows, int cols, QTextTableFormat format) final void
insertText
(String text) final void
insertText
(String text, QTextCharFormat format) final boolean
isCopyOf
(QTextCursor other) final boolean
isNull()
final void
final boolean
final void
mergeBlockCharFormat
(QTextCharFormat modifier) final void
mergeBlockFormat
(QTextBlockFormat modifier) final void
mergeCharFormat
(QTextCharFormat modifier) final boolean
Overloaded function formovePosition(io.qt.gui.QTextCursor.MoveOperation, io.qt.gui.QTextCursor.MoveMode, int)
final boolean
Overloaded function formovePosition(io.qt.gui.QTextCursor.MoveOperation, io.qt.gui.QTextCursor.MoveMode, int)
withn = 1
.final boolean
movePosition
(QTextCursor.MoveOperation op, QTextCursor.MoveMode arg__2, int n) final int
position()
final int
final void
final void
select
(QTextCursor.SelectionType selection) final String
final QTextDocumentFragment
final int
final int
final void
setBlockCharFormat
(QTextCharFormat format) final void
setBlockFormat
(QTextBlockFormat format) final void
setCharFormat
(QTextCharFormat format) final void
setKeepPositionOnInsert
(boolean b) final void
setPosition
(int pos) Overloaded function forsetPosition(int, io.qt.gui.QTextCursor.MoveMode)
withmode = io.qt.gui.QTextCursor.MoveMode.MoveAnchor
.final void
setPosition
(int pos, QTextCursor.MoveMode mode) final void
setVerticalMovementX
(int x) final void
setVisualNavigation
(boolean b) final void
swap
(QTextCursor other) final int
final boolean
Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QTextCursor
public QTextCursor() -
QTextCursor
- Parameters:
block
-
-
QTextCursor
- Parameters:
cursor
-
-
QTextCursor
- Parameters:
document
-
-
QTextCursor
- Parameters:
frame
-
-
-
Method Details
-
anchor
- Returns:
-
atBlockEnd
- Returns:
-
atBlockStart
- Returns:
-
atEnd
- Returns:
-
atStart
- Returns:
-
beginEditBlock
-
block
- Returns:
-
blockCharFormat
- Returns:
-
blockFormat
- Returns:
-
blockNumber
- Returns:
-
charFormat
- Returns:
-
clearSelection
-
columnNumber
- Returns:
-
createList
- Parameters:
format
-- Returns:
-
createList
- Parameters:
style
-- Returns:
-
currentFrame
- Returns:
-
currentList
- Returns:
-
currentTable
- Returns:
-
deleteChar
-
deletePreviousChar
-
document
- Returns:
-
endEditBlock
-
hasComplexSelection
- Returns:
-
hasSelection
- Returns:
-
insertBlock
-
insertBlock
- Parameters:
format
-
-
insertBlock
- Parameters:
format
-charFormat
-
-
insertFragment
- Parameters:
fragment
-
-
insertFrame
- Parameters:
format
-- Returns:
-
insertHtml
- Parameters:
html
-
-
insertImage
- Parameters:
image
-name
-
-
insertImage
- Parameters:
name
-
-
insertImage
- Parameters:
format
-
-
insertImage
@QtUninvokable public final void insertImage(QTextImageFormat format, QTextFrameFormat.Position alignment) - Parameters:
format
-alignment
-
-
insertList
- Parameters:
format
-- Returns:
-
insertList
- Parameters:
style
-- Returns:
-
insertMarkdown
@QtUninvokable public final void insertMarkdown(String markdown, QTextDocument.MarkdownFeatures features) - Parameters:
markdown
-features
-- Since:
- This function was introduced in Qt 6.4.
-
insertTable
- Parameters:
rows
-cols
-- Returns:
-
insertTable
- Parameters:
rows
-cols
-format
-- Returns:
-
insertText
- Parameters:
text
-
-
insertText
- Parameters:
text
-format
-
-
isCopyOf
- Parameters:
other
-- Returns:
-
isNull
- Returns:
-
joinPreviousEditBlock
-
keepPositionOnInsert
- Returns:
-
mergeBlockCharFormat
- Parameters:
modifier
-
-
mergeBlockFormat
- Parameters:
modifier
-
-
mergeCharFormat
- Parameters:
modifier
-
-
movePosition
@QtUninvokable public final boolean movePosition(QTextCursor.MoveOperation op, QTextCursor.MoveMode arg__2, int n) - Parameters:
op
-arg__2
-n
-- Returns:
-
assign
- Parameters:
other
-
-
equals
- Parameters:
rhs
-- Returns:
-
position
- Returns:
-
positionInBlock
- Returns:
-
removeSelectedText
-
select
- Parameters:
selection
-
-
selectedTableCells
-
selectedText
- Returns:
-
selection
- Returns:
-
selectionEnd
- Returns:
-
selectionStart
- Returns:
-
setBlockCharFormat
- Parameters:
format
-
-
setBlockFormat
- Parameters:
format
-
-
setCharFormat
- Parameters:
format
-
-
setKeepPositionOnInsert
- Parameters:
b
-
-
setPosition
- Parameters:
pos
-mode
-
-
setVerticalMovementX
- Parameters:
x
-
-
swap
- Parameters:
other
-
-
verticalMovementX
- Returns:
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<QTextCursor>
-
hashCode
Returns the objects's hash code computed byqHash(QTextCursor)
. -
clone
Creates and returns a copy of this object.
-
insertImage
Overloaded function for
insertImage(io.qt.gui.QImage, java.lang.String)
withname = (String)null
. -
insertMarkdown
Overloaded function for
insertMarkdown(java.lang.String, io.qt.gui.QTextDocument.MarkdownFeatures)
withfeatures = new io.qt.gui.QTextDocument.MarkdownFeatures(20236)
. -
insertMarkdown
@QtUninvokable public final void insertMarkdown(String markdown, QTextDocument.MarkdownFeature ... features) Overloaded function for
insertMarkdown(java.lang.String, io.qt.gui.QTextDocument.MarkdownFeatures)
. -
movePosition
@QtUninvokable public final boolean movePosition(QTextCursor.MoveOperation op, QTextCursor.MoveMode arg__2) Overloaded function for
movePosition(io.qt.gui.QTextCursor.MoveOperation, io.qt.gui.QTextCursor.MoveMode, int)
withn = 1
. -
movePosition
Overloaded function for
movePosition(io.qt.gui.QTextCursor.MoveOperation, io.qt.gui.QTextCursor.MoveMode, int)
with:
arg__2 = io.qt.gui.QTextCursor.MoveMode.MoveAnchor
n = 1
-
setPosition
Overloaded function for
setPosition(int, io.qt.gui.QTextCursor.MoveMode)
withmode = io.qt.gui.QTextCursor.MoveMode.MoveAnchor
.
-