- All Implemented Interfaces:
QtObjectInterface
Used to lay out and render text
Java wrapper for Qt class QTextLayout
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java wrapper for Qt enumQTextLayout::CursorMode
static class
QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's contentstatic enum
Java wrapper for Qt enumQTextLayout::GlyphRunRetrievalFlag
static final class
QFlags
type for enumQTextLayout.GlyphRunRetrievalFlag
-
Constructor Summary
ConstructorDescriptionSeeQTextLayout::
QTextLayout(QTextBlock) QTextLayout
(String text) QTextLayout
(String text, QFont font) Overloaded constructor forQTextLayout(java.lang.String, io.qt.gui.QFont, io.qt.gui.QPaintDevice)
withpaintdevice = null
.QTextLayout
(String text, QFont font, QPaintDevice paintdevice) QTextLayout
(String text, String font) Overloaded constructor forQTextLayout(java.lang.String, java.lang.String, io.qt.gui.QPaintDevice)
withpaintdevice = null
.QTextLayout
(String text, String font, QPaintDevice paintdevice) Overloaded constructor forQTextLayout(java.lang.String, io.qt.gui.QFont, io.qt.gui.QPaintDevice)
. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final QRectF
final boolean
final void
final void
final QTextLine
final Qt.CursorMoveStyle
final void
drawCursor
(QPainter p, QPointF pos, int cursorPosition) final void
drawCursor
(QPainter p, QPointF pos, int cursorPosition, int width) final void
drawCursor
(QPainter p, QPoint pos, int cursorPosition) Overloaded function fordrawCursor(io.qt.gui.QPainter, io.qt.core.QPointF, int)
.final void
drawCursor
(QPainter p, QPoint pos, int cursorPosition, int width) Overloaded function fordrawCursor(io.qt.gui.QPainter, io.qt.core.QPointF, int, int)
.final void
final QFont
font()
final QList<QTextLayout.FormatRange>
formats()
Overloaded function forglyphRuns(int, int)
glyphRuns
(int from) Overloaded function forglyphRuns(int, int)
withlength = -1
.glyphRuns
(int from, int length) glyphRuns
(int from, int length, QTextLayout.GlyphRunRetrievalFlag ... flags) Overloaded function forglyphRuns(int, int, io.qt.gui.QTextLayout.GlyphRunRetrievalFlags)
.glyphRuns
(int from, int length, QTextLayout.GlyphRunRetrievalFlags flags) final boolean
isValidCursorPosition
(int pos) final int
leftCursorPosition
(int oldPos) final QTextLine
lineAt
(int i) final int
final QTextLine
lineForTextPosition
(int pos) final double
final double
final int
nextCursorPosition
(int oldPos) Overloaded function fornextCursorPosition(int, io.qt.gui.QTextLayout.CursorMode)
withmode = io.qt.gui.QTextLayout.CursorMode.SkipCharacters
.final int
nextCursorPosition
(int oldPos, QTextLayout.CursorMode mode) final QPointF
position()
final int
final String
final int
previousCursorPosition
(int oldPos) Overloaded function forpreviousCursorPosition(int, io.qt.gui.QTextLayout.CursorMode)
withmode = io.qt.gui.QTextLayout.CursorMode.SkipCharacters
.final int
previousCursorPosition
(int oldPos, QTextLayout.CursorMode mode) final int
rightCursorPosition
(int oldPos) final void
setCacheEnabled
(boolean enable) final void
final void
setFlags
(int flags) SeeQTextLayout::
setFlags(int) final void
final void
Overloaded function forsetFont(io.qt.gui.QFont)
.final void
setFormats
(Collection<? extends QTextLayout.FormatRange> overrides) final void
Overloaded function forsetPosition(io.qt.core.QPointF)
.final void
final void
setPreeditArea
(int position, String text) final void
setRawFont
(QRawFont rawFont) SeeQTextLayout::
setRawFont(QRawFont) final void
final void
setTextOption
(Qt.Alignment option) Overloaded function forsetTextOption(io.qt.gui.QTextOption)
.final void
setTextOption
(QTextOption option) final String
text()
final QTextOption
Methods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QTextLayout
public QTextLayout() -
QTextLayout
- Parameters:
text
-
-
QTextLayout
- Parameters:
text
-font
-paintdevice
-
-
QTextLayout
See
QTextLayout::
QTextLayout(QTextBlock) - Parameters:
b
-
-
QTextLayout
Overloaded constructor for
QTextLayout(java.lang.String, io.qt.gui.QFont, io.qt.gui.QPaintDevice)
withpaintdevice = null
. -
QTextLayout
Overloaded constructor for
QTextLayout(java.lang.String, java.lang.String, io.qt.gui.QPaintDevice)
withpaintdevice = null
. -
QTextLayout
Overloaded constructor for
QTextLayout(java.lang.String, io.qt.gui.QFont, io.qt.gui.QPaintDevice)
.
-
-
Method Details
-
beginLayout
-
boundingRect
- Returns:
-
cacheEnabled
- Returns:
-
clearFormats
-
clearLayout
-
createLine
- Returns:
-
cursorMoveStyle
- Returns:
-
drawCursor
- Parameters:
p
-pos
-cursorPosition
-
-
drawCursor
- Parameters:
p
-pos
-cursorPosition
-width
-
-
endLayout
-
font
- Returns:
-
formats
- Returns:
-
glyphRuns
- Parameters:
from
-length
-- Returns:
-
glyphRuns
@QtUninvokable public final QList<QGlyphRun> glyphRuns(int from, int length, QTextLayout.GlyphRunRetrievalFlags flags) - Parameters:
from
-length
-flags
-- Returns:
- Since:
- This function was introduced in Qt 6.5.
-
isValidCursorPosition
- Parameters:
pos
-- Returns:
-
leftCursorPosition
- Parameters:
oldPos
-- Returns:
-
lineAt
- Parameters:
i
-- Returns:
-
lineCount
- Returns:
-
lineForTextPosition
- Parameters:
pos
-- Returns:
-
maximumWidth
- Returns:
-
minimumWidth
- Returns:
-
nextCursorPosition
- Parameters:
oldPos
-mode
-- Returns:
-
position
- Returns:
-
preeditAreaPosition
- Returns:
-
preeditAreaText
- Returns:
-
previousCursorPosition
- Parameters:
oldPos
-mode
-- Returns:
-
rightCursorPosition
- Parameters:
oldPos
-- Returns:
-
setCacheEnabled
- Parameters:
enable
-
-
setCursorMoveStyle
- Parameters:
style
-
-
setFlags
See
QTextLayout::
setFlags(int) - Parameters:
flags
-
-
setFont
- Parameters:
f
-
-
setFormats
@QtUninvokable public final void setFormats(Collection<? extends QTextLayout.FormatRange> overrides) - Parameters:
overrides
-
-
setPosition
- Parameters:
p
-
-
setPreeditArea
- Parameters:
position
-text
-
-
setRawFont
See
QTextLayout::
setRawFont(QRawFont) - Parameters:
rawFont
-
-
setText
- Parameters:
string
-
-
setTextOption
- Parameters:
option
-
-
text
- Returns:
-
textOption
- Returns:
-
drawCursor
Overloaded function for
drawCursor(io.qt.gui.QPainter, io.qt.core.QPointF, int)
. -
drawCursor
Overloaded function for
drawCursor(io.qt.gui.QPainter, io.qt.core.QPointF, int, int)
. -
glyphRuns
Overloaded function for
glyphRuns(int, int)
withlength = -1
. -
glyphRuns
-
glyphRuns
@QtUninvokable public final QList<QGlyphRun> glyphRuns(int from, int length, QTextLayout.GlyphRunRetrievalFlag ... flags) Overloaded function for
glyphRuns(int, int, io.qt.gui.QTextLayout.GlyphRunRetrievalFlags)
. -
nextCursorPosition
Overloaded function for
nextCursorPosition(int, io.qt.gui.QTextLayout.CursorMode)
withmode = io.qt.gui.QTextLayout.CursorMode.SkipCharacters
. -
previousCursorPosition
Overloaded function for
previousCursorPosition(int, io.qt.gui.QTextLayout.CursorMode)
withmode = io.qt.gui.QTextLayout.CursorMode.SkipCharacters
. -
setFont
Overloaded function for
setFont(io.qt.gui.QFont)
. -
setPosition
Overloaded function for
setPosition(io.qt.core.QPointF)
. -
setTextOption
Overloaded function for
setTextOption(io.qt.gui.QTextOption)
.
-