Struct qt_gui::QTextTableCellFormat
source · #[repr(C)]pub struct QTextTableCellFormat { /* private fields */ }
Expand description
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
C++ class: QTextTableCellFormat
.
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
The table cell format of a table cell in a document specifies the visual properties of the table cell.
The padding properties of a table cell are controlled by setLeftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding(). All the paddings can be set at once using setPadding().
Implementations§
source§impl QTextTableCellFormat
impl QTextTableCellFormat
sourcepub unsafe fn bottom_border(&self) -> c_double
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn bottom_border(&self) -> c_double
cpp_lib_version="5.14.0"
only.Returns the bottom border width of the table cell.
Calls C++ function: double QTextTableCellFormat::bottomBorder() const
.
Returns the bottom border width of the table cell.
This function was introduced in Qt 5.14.
See also setBottomBorder().
sourcepub unsafe fn bottom_border_brush(&self) -> CppBox<QBrush>
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn bottom_border_brush(&self) -> CppBox<QBrush>
cpp_lib_version="5.14.0"
only.Returns the bottom border brush of the table cell.
Calls C++ function: QBrush QTextTableCellFormat::bottomBorderBrush() const
.
Returns the bottom border brush of the table cell.
This function was introduced in Qt 5.14.
See also setBottomBorderBrush().
sourcepub unsafe fn bottom_border_style(&self) -> BorderStyle
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn bottom_border_style(&self) -> BorderStyle
cpp_lib_version="5.14.0"
only.Returns the bottom border style of the table cell.
Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::bottomBorderStyle() const
.
Returns the bottom border style of the table cell.
This function was introduced in Qt 5.14.
See also setBottomBorderStyle().
sourcepub unsafe fn bottom_padding(&self) -> c_double
pub unsafe fn bottom_padding(&self) -> c_double
Gets the bottom padding of the table cell.
Calls C++ function: double QTextTableCellFormat::bottomPadding() const
.
Gets the bottom padding of the table cell.
This function was introduced in Qt 4.4.
See also setBottomPadding(), leftPadding(), rightPadding(), and topPadding().
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QTextTableCellFormat>>
) -> Ref<QTextTableCellFormat>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QTextTableCellFormat>> ) -> Ref<QTextTableCellFormat>
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
Calls C++ function: QTextTableCellFormat& QTextTableCellFormat::operator=(const QTextTableCellFormat& other)
.
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
The table cell format of a table cell in a document specifies the visual properties of the table cell.
The padding properties of a table cell are controlled by setLeftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding(). All the paddings can be set at once using setPadding().
sourcepub unsafe fn is_valid(&self) -> bool
pub unsafe fn is_valid(&self) -> bool
Returns true
if this table cell format is valid; otherwise returns false
.
Calls C++ function: bool QTextTableCellFormat::isValid() const
.
Returns true
if this table cell format is valid; otherwise returns false
.
This function was introduced in Qt 4.4.
sourcepub unsafe fn left_border(&self) -> c_double
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn left_border(&self) -> c_double
cpp_lib_version="5.14.0"
only.Returns the left border width of the table cell.
Calls C++ function: double QTextTableCellFormat::leftBorder() const
.
Returns the left border width of the table cell.
This function was introduced in Qt 5.14.
See also setLeftBorder().
sourcepub unsafe fn left_border_brush(&self) -> CppBox<QBrush>
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn left_border_brush(&self) -> CppBox<QBrush>
cpp_lib_version="5.14.0"
only.Returns the left border brush of the table cell.
Calls C++ function: QBrush QTextTableCellFormat::leftBorderBrush() const
.
Returns the left border brush of the table cell.
This function was introduced in Qt 5.14.
See also setLeftBorderBrush().
sourcepub unsafe fn left_border_style(&self) -> BorderStyle
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn left_border_style(&self) -> BorderStyle
cpp_lib_version="5.14.0"
only.Returns the left border style of the table cell.
Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::leftBorderStyle() const
.
Returns the left border style of the table cell.
This function was introduced in Qt 5.14.
See also setLeftBorderStyle().
sourcepub unsafe fn left_padding(&self) -> c_double
pub unsafe fn left_padding(&self) -> c_double
Gets the left padding of the table cell.
Calls C++ function: double QTextTableCellFormat::leftPadding() const
.
Gets the left padding of the table cell.
This function was introduced in Qt 4.4.
See also setLeftPadding(), rightPadding(), topPadding(), and bottomPadding().
sourcepub unsafe fn new() -> CppBox<QTextTableCellFormat>
pub unsafe fn new() -> CppBox<QTextTableCellFormat>
Constructs a new table cell format object.
Calls C++ function: [constructor] void QTextTableCellFormat::QTextTableCellFormat()
.
Constructs a new table cell format object.
This function was introduced in Qt 4.4.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QTextTableCellFormat>>
) -> CppBox<QTextTableCellFormat>
pub unsafe fn new_copy( other: impl CastInto<Ref<QTextTableCellFormat>> ) -> CppBox<QTextTableCellFormat>
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
Calls C++ function: [constructor] void QTextTableCellFormat::QTextTableCellFormat(const QTextTableCellFormat& other)
.
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
The table cell format of a table cell in a document specifies the visual properties of the table cell.
The padding properties of a table cell are controlled by setLeftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding(). All the paddings can be set at once using setPadding().
sourcepub unsafe fn right_border(&self) -> c_double
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn right_border(&self) -> c_double
cpp_lib_version="5.14.0"
only.Returns the right border width of the table cell.
Calls C++ function: double QTextTableCellFormat::rightBorder() const
.
Returns the right border width of the table cell.
This function was introduced in Qt 5.14.
See also setRightBorder().
sourcepub unsafe fn right_border_brush(&self) -> CppBox<QBrush>
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn right_border_brush(&self) -> CppBox<QBrush>
cpp_lib_version="5.14.0"
only.Returns the right border brush of the table cell.
Calls C++ function: QBrush QTextTableCellFormat::rightBorderBrush() const
.
Returns the right border brush of the table cell.
This function was introduced in Qt 5.14.
See also setRightBorderBrush().
sourcepub unsafe fn right_border_style(&self) -> BorderStyle
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn right_border_style(&self) -> BorderStyle
cpp_lib_version="5.14.0"
only.Returns the right border style of the table cell.
Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::rightBorderStyle() const
.
Returns the right border style of the table cell.
This function was introduced in Qt 5.14.
See also setRightBorderStyle().
sourcepub unsafe fn right_padding(&self) -> c_double
pub unsafe fn right_padding(&self) -> c_double
Gets the right padding of the table cell.
Calls C++ function: double QTextTableCellFormat::rightPadding() const
.
Gets the right padding of the table cell.
This function was introduced in Qt 4.4.
See also setRightPadding(), leftPadding(), topPadding(), and bottomPadding().
sourcepub unsafe fn set_border(&self, width: c_double)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_border(&self, width: c_double)
cpp_lib_version="5.14.0"
only.Sets the left, right, top, and bottom border width of the table cell.
Calls C++ function: void QTextTableCellFormat::setBorder(double width)
.
Sets the left, right, top, and bottom border width of the table cell.
This function was introduced in Qt 5.14.
See also setLeftBorder(), setRightBorder(), setTopBorder(), setBottomBorder(), and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
cpp_lib_version="5.14.0"
only.Sets the left, right, top, and bottom border brush of the table cell.
Calls C++ function: void QTextTableCellFormat::setBorderBrush(const QBrush& brush)
.
Sets the left, right, top, and bottom border brush of the table cell.
This function was introduced in Qt 5.14.
See also setLeftBorderBrush(), setRightBorderBrush(), setTopBorderBrush(), setBottomBorderBrush(), and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_border_style(&self, style: BorderStyle)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_border_style(&self, style: BorderStyle)
cpp_lib_version="5.14.0"
only.Sets the left, right, top, and bottom border style of the table cell.
Calls C++ function: void QTextTableCellFormat::setBorderStyle(QTextFrameFormat::BorderStyle style)
.
Sets the left, right, top, and bottom border style of the table cell.
This function was introduced in Qt 5.14.
See also setLeftBorderStyle(), setRightBorderStyle(), setTopBorderStyle(), setBottomBorderStyle(), and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_bottom_border(&self, width: c_double)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_bottom_border(&self, width: c_double)
cpp_lib_version="5.14.0"
only.Sets the bottom border width of the table cell.
Calls C++ function: void QTextTableCellFormat::setBottomBorder(double width)
.
Sets the bottom border width of the table cell.
This function was introduced in Qt 5.14.
See also bottomBorder() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_bottom_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_bottom_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
cpp_lib_version="5.14.0"
only.Sets the bottom border brush of the table cell.
Calls C++ function: void QTextTableCellFormat::setBottomBorderBrush(const QBrush& brush)
.
Sets the bottom border brush of the table cell.
This function was introduced in Qt 5.14.
See also bottomBorderBrush() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_bottom_border_style(&self, style: BorderStyle)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_bottom_border_style(&self, style: BorderStyle)
cpp_lib_version="5.14.0"
only.Sets the bottom border style of the table cell.
Calls C++ function: void QTextTableCellFormat::setBottomBorderStyle(QTextFrameFormat::BorderStyle style)
.
Sets the bottom border style of the table cell.
This function was introduced in Qt 5.14.
See also bottomBorderStyle() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_bottom_padding(&self, padding: c_double)
pub unsafe fn set_bottom_padding(&self, padding: c_double)
Sets the bottom padding of the table cell.
Calls C++ function: void QTextTableCellFormat::setBottomPadding(double padding)
.
Sets the bottom padding of the table cell.
This function was introduced in Qt 4.4.
See also bottomPadding(), setLeftPadding(), setRightPadding(), and setTopPadding().
sourcepub unsafe fn set_left_border(&self, width: c_double)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_left_border(&self, width: c_double)
cpp_lib_version="5.14.0"
only.Sets the left border width of the table cell.
Calls C++ function: void QTextTableCellFormat::setLeftBorder(double width)
.
Sets the left border width of the table cell.
This function was introduced in Qt 5.14.
See also leftBorder() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_left_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_left_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
cpp_lib_version="5.14.0"
only.Sets the left border brush of the table cell.
Calls C++ function: void QTextTableCellFormat::setLeftBorderBrush(const QBrush& brush)
.
Sets the left border brush of the table cell.
This function was introduced in Qt 5.14.
See also leftBorderBrush() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_left_border_style(&self, style: BorderStyle)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_left_border_style(&self, style: BorderStyle)
cpp_lib_version="5.14.0"
only.Sets the left border style of the table cell.
Calls C++ function: void QTextTableCellFormat::setLeftBorderStyle(QTextFrameFormat::BorderStyle style)
.
Sets the left border style of the table cell.
This function was introduced in Qt 5.14.
See also leftBorderStyle() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_left_padding(&self, padding: c_double)
pub unsafe fn set_left_padding(&self, padding: c_double)
Sets the left padding of the table cell.
Calls C++ function: void QTextTableCellFormat::setLeftPadding(double padding)
.
Sets the left padding of the table cell.
This function was introduced in Qt 4.4.
See also leftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding().
sourcepub unsafe fn set_padding(&self, padding: c_double)
pub unsafe fn set_padding(&self, padding: c_double)
Sets the left, right, top, and bottom padding of the table cell.
Calls C++ function: void QTextTableCellFormat::setPadding(double padding)
.
Sets the left, right, top, and bottom padding of the table cell.
This function was introduced in Qt 4.4.
See also setLeftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding().
sourcepub unsafe fn set_right_border(&self, width: c_double)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_right_border(&self, width: c_double)
cpp_lib_version="5.14.0"
only.Sets the right border width of the table cell.
Calls C++ function: void QTextTableCellFormat::setRightBorder(double width)
.
Sets the right border width of the table cell.
This function was introduced in Qt 5.14.
See also rightBorder() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_right_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_right_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
cpp_lib_version="5.14.0"
only.Sets the right border brush of the table cell.
Calls C++ function: void QTextTableCellFormat::setRightBorderBrush(const QBrush& brush)
.
Sets the right border brush of the table cell.
This function was introduced in Qt 5.14.
See also rightBorderBrush() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_right_border_style(&self, style: BorderStyle)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_right_border_style(&self, style: BorderStyle)
cpp_lib_version="5.14.0"
only.Sets the right border style of the table cell.
Calls C++ function: void QTextTableCellFormat::setRightBorderStyle(QTextFrameFormat::BorderStyle style)
.
Sets the right border style of the table cell.
This function was introduced in Qt 5.14.
See also rightBorderStyle() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_right_padding(&self, padding: c_double)
pub unsafe fn set_right_padding(&self, padding: c_double)
Sets the right padding of the table cell.
Calls C++ function: void QTextTableCellFormat::setRightPadding(double padding)
.
Sets the right padding of the table cell.
This function was introduced in Qt 4.4.
See also rightPadding(), setLeftPadding(), setTopPadding(), and setBottomPadding().
sourcepub unsafe fn set_top_border(&self, width: c_double)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_top_border(&self, width: c_double)
cpp_lib_version="5.14.0"
only.Sets the top border width of the table cell.
Calls C++ function: void QTextTableCellFormat::setTopBorder(double width)
.
Sets the top border width of the table cell.
This function was introduced in Qt 5.14.
See also topBorder() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_top_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_top_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)
cpp_lib_version="5.14.0"
only.Sets the top border brush of the table cell.
Calls C++ function: void QTextTableCellFormat::setTopBorderBrush(const QBrush& brush)
.
Sets the top border brush of the table cell.
This function was introduced in Qt 5.14.
See also topBorderBrush() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_top_border_style(&self, style: BorderStyle)
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn set_top_border_style(&self, style: BorderStyle)
cpp_lib_version="5.14.0"
only.Sets the top border style of the table cell.
Calls C++ function: void QTextTableCellFormat::setTopBorderStyle(QTextFrameFormat::BorderStyle style)
.
Sets the top border style of the table cell.
This function was introduced in Qt 5.14.
See also topBorderStyle() and QTextTableFormat::setBorderCollapse.
sourcepub unsafe fn set_top_padding(&self, padding: c_double)
pub unsafe fn set_top_padding(&self, padding: c_double)
Sets the top padding of the table cell.
Calls C++ function: void QTextTableCellFormat::setTopPadding(double padding)
.
Sets the top padding of the table cell.
This function was introduced in Qt 4.4.
See also topPadding(), setLeftPadding(), setRightPadding(), and setBottomPadding().
sourcepub unsafe fn top_border(&self) -> c_double
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn top_border(&self) -> c_double
cpp_lib_version="5.14.0"
only.Returns the top border width of the table cell.
Calls C++ function: double QTextTableCellFormat::topBorder() const
.
Returns the top border width of the table cell.
This function was introduced in Qt 5.14.
See also setTopBorder().
sourcepub unsafe fn top_border_brush(&self) -> CppBox<QBrush>
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn top_border_brush(&self) -> CppBox<QBrush>
cpp_lib_version="5.14.0"
only.Returns the top border brush of the table cell.
Calls C++ function: QBrush QTextTableCellFormat::topBorderBrush() const
.
Returns the top border brush of the table cell.
This function was introduced in Qt 5.14.
See also setTopBorderBrush().
sourcepub unsafe fn top_border_style(&self) -> BorderStyle
Available on cpp_lib_version="5.14.0"
only.
pub unsafe fn top_border_style(&self) -> BorderStyle
cpp_lib_version="5.14.0"
only.Returns the top border style of the table cell.
Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::topBorderStyle() const
.
Returns the top border style of the table cell.
This function was introduced in Qt 5.14.
See also setTopBorderStyle().
sourcepub unsafe fn top_padding(&self) -> c_double
pub unsafe fn top_padding(&self) -> c_double
Gets the top padding of the table cell.
Calls C++ function: double QTextTableCellFormat::topPadding() const
.
Gets the top padding of the table cell.
This function was introduced in Qt 4.4.
See also setTopPadding(), leftPadding(), rightPadding(), and bottomPadding().
Methods from Deref<Target = QTextCharFormat>§
sourcepub unsafe fn anchor_href(&self) -> CppBox<QString>
pub unsafe fn anchor_href(&self) -> CppBox<QString>
Returns the text format's hypertext link, or an empty string if none has been set.
Calls C++ function: QString QTextCharFormat::anchorHref() const
.
Returns the text format’s hypertext link, or an empty string if none has been set.
See also setAnchorHref().
sourcepub unsafe fn anchor_name(&self) -> CppBox<QString>
pub unsafe fn anchor_name(&self) -> CppBox<QString>
This function is deprecated. Use anchorNames() instead.
Calls C++ function: QString QTextCharFormat::anchorName() const
.
This function is deprecated. Use anchorNames() instead.
Returns the anchor name associated with this text format, or an empty string if none has been set. If the anchor name is set, text with this format can be the destination of a hypertext link.
See also setAnchorName().
sourcepub unsafe fn anchor_names(&self) -> CppBox<QStringList>
pub unsafe fn anchor_names(&self) -> CppBox<QStringList>
Returns the anchor names associated with this text format, or an empty string list if none has been set. If the anchor names are set, text with this format can be the destination of a hypertext link.
Calls C++ function: QStringList QTextCharFormat::anchorNames() const
.
Returns the anchor names associated with this text format, or an empty string list if none has been set. If the anchor names are set, text with this format can be the destination of a hypertext link.
This function was introduced in Qt 4.3.
See also setAnchorNames().
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QTextCharFormat>>
) -> Ref<QTextCharFormat>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QTextCharFormat>> ) -> Ref<QTextCharFormat>
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
Calls C++ function: QTextCharFormat& QTextCharFormat::operator=(const QTextCharFormat& other)
.
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
The character format of text in a document specifies the visual properties of the text, as well as information about its role in a hypertext document.
The font used can be set by supplying a font to the setFont() function, and each aspect of its appearance can be adjusted to give the desired effect. setFontFamily() and setFontPointSize() define the font's family (e.g. Times) and printed size; setFontWeight() and setFontItalic() provide control over the style of the font. setFontUnderline(), setFontOverline(), setFontStrikeOut(), and setFontFixedPitch() provide additional effects for text.
The color is set with setForeground(). If the text is intended to be used as an anchor (for hyperlinks), this can be enabled with setAnchor(). The setAnchorHref() and setAnchorNames() functions are used to specify the information about the hyperlink's destination and the anchor's name.
sourcepub unsafe fn font(&self) -> CppBox<QFont>
pub unsafe fn font(&self) -> CppBox<QFont>
Returns the font for this character format.
Calls C++ function: QFont QTextCharFormat::font() const
.
Returns the font for this character format.
See also setFont().
sourcepub unsafe fn font_capitalization(&self) -> Capitalization
pub unsafe fn font_capitalization(&self) -> Capitalization
Returns the current capitalization type of the font.
Calls C++ function: QFont::Capitalization QTextCharFormat::fontCapitalization() const
.
Returns the current capitalization type of the font.
This function was introduced in Qt 4.4.
See also setFontCapitalization().
sourcepub unsafe fn font_families(&self) -> CppBox<QVariant>
Available on cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn font_families(&self) -> CppBox<QVariant>
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the text format's font families.
Calls C++ function: QVariant QTextCharFormat::fontFamilies() const
.
Returns the text format’s font families.
This function was introduced in Qt 5.13.
See also setFontFamilies() and font().
sourcepub unsafe fn font_family(&self) -> CppBox<QString>
pub unsafe fn font_family(&self) -> CppBox<QString>
Returns the text format's font family.
Calls C++ function: QString QTextCharFormat::fontFamily() const
.
Returns the text format’s font family.
See also setFontFamily() and font().
sourcepub unsafe fn font_fixed_pitch(&self) -> bool
pub unsafe fn font_fixed_pitch(&self) -> bool
Returns true
if the text format's font is fixed pitch; otherwise returns false
.
Calls C++ function: bool QTextCharFormat::fontFixedPitch() const
.
Returns true
if the text format’s font is fixed pitch; otherwise returns false
.
See also setFontFixedPitch() and font().
sourcepub unsafe fn font_hinting_preference(&self) -> HintingPreference
pub unsafe fn font_hinting_preference(&self) -> HintingPreference
Returns the hinting preference set for this text format.
Calls C++ function: QFont::HintingPreference QTextCharFormat::fontHintingPreference() const
.
Returns the hinting preference set for this text format.
This function was introduced in Qt 4.8.
See also setFontHintingPreference(), font(), and QFont::hintingPreference().
sourcepub unsafe fn font_italic(&self) -> bool
pub unsafe fn font_italic(&self) -> bool
Returns true
if the text format's font is italic; otherwise returns false
.
Calls C++ function: bool QTextCharFormat::fontItalic() const
.
Returns true
if the text format’s font is italic; otherwise returns false
.
See also setFontItalic() and font().
sourcepub unsafe fn font_kerning(&self) -> bool
pub unsafe fn font_kerning(&self) -> bool
Returns true
if the font kerning is enabled.
Calls C++ function: bool QTextCharFormat::fontKerning() const
.
Returns true
if the font kerning is enabled.
This function was introduced in Qt 4.5.
See also setFontKerning() and font().
sourcepub unsafe fn font_letter_spacing(&self) -> c_double
pub unsafe fn font_letter_spacing(&self) -> c_double
Returns the current letter spacing.
Calls C++ function: double QTextCharFormat::fontLetterSpacing() const
.
Returns the current letter spacing.
This function was introduced in Qt 4.4.
See also setFontLetterSpacing(), setFontLetterSpacingType(), and fontLetterSpacingType().
sourcepub unsafe fn font_letter_spacing_type(&self) -> SpacingType
pub unsafe fn font_letter_spacing_type(&self) -> SpacingType
Returns the letter spacing type of this format..
Calls C++ function: QFont::SpacingType QTextCharFormat::fontLetterSpacingType() const
.
Returns the letter spacing type of this format..
This function was introduced in Qt 5.0.
See also setFontLetterSpacingType(), setFontLetterSpacing(), and fontLetterSpacing().
sourcepub unsafe fn font_overline(&self) -> bool
pub unsafe fn font_overline(&self) -> bool
Returns true
if the text format's font is overlined; otherwise returns false
.
Calls C++ function: bool QTextCharFormat::fontOverline() const
.
Returns true
if the text format’s font is overlined; otherwise returns false
.
See also setFontOverline() and font().
sourcepub unsafe fn font_point_size(&self) -> c_double
pub unsafe fn font_point_size(&self) -> c_double
Returns the font size used to display text in this format.
Calls C++ function: double QTextCharFormat::fontPointSize() const
.
Returns the font size used to display text in this format.
See also setFontPointSize() and font().
sourcepub unsafe fn font_stretch(&self) -> c_int
pub unsafe fn font_stretch(&self) -> c_int
Returns the current font stretching.
Calls C++ function: int QTextCharFormat::fontStretch() const
.
Returns the current font stretching.
This function was introduced in Qt 5.0.
See also setFontStretch().
sourcepub unsafe fn font_strike_out(&self) -> bool
pub unsafe fn font_strike_out(&self) -> bool
Returns true
if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false
.
Calls C++ function: bool QTextCharFormat::fontStrikeOut() const
.
Returns true
if the text format’s font is struck out (has a horizontal line drawn through it); otherwise returns false
.
See also setFontStrikeOut() and font().
sourcepub unsafe fn font_style_hint(&self) -> StyleHint
pub unsafe fn font_style_hint(&self) -> StyleHint
Returns the font style hint.
Calls C++ function: QFont::StyleHint QTextCharFormat::fontStyleHint() const
.
Returns the font style hint.
This function was introduced in Qt 4.5.
See also setFontStyleHint() and font().
sourcepub unsafe fn font_style_name(&self) -> CppBox<QVariant>
Available on cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn font_style_name(&self) -> CppBox<QVariant>
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Returns the text format's font style name.
Calls C++ function: QVariant QTextCharFormat::fontStyleName() const
.
Returns the text format’s font style name.
This function was introduced in Qt 5.13.
See also setFontStyleName(), font(), and QFont::styleName().
sourcepub unsafe fn font_style_strategy(&self) -> StyleStrategy
pub unsafe fn font_style_strategy(&self) -> StyleStrategy
Returns the current font style strategy.
Calls C++ function: QFont::StyleStrategy QTextCharFormat::fontStyleStrategy() const
.
Returns the current font style strategy.
This function was introduced in Qt 4.5.
See also setFontStyleStrategy() and font().
sourcepub unsafe fn font_underline(&self) -> bool
pub unsafe fn font_underline(&self) -> bool
Returns true
if the text format's font is underlined; otherwise returns false
.
Calls C++ function: bool QTextCharFormat::fontUnderline() const
.
Returns true
if the text format’s font is underlined; otherwise returns false
.
See also setFontUnderline() and font().
sourcepub unsafe fn font_weight(&self) -> c_int
pub unsafe fn font_weight(&self) -> c_int
Returns the text format's font weight.
Calls C++ function: int QTextCharFormat::fontWeight() const
.
Returns the text format’s font weight.
See also setFontWeight(), font(), and QFont::Weight.
sourcepub unsafe fn font_word_spacing(&self) -> c_double
pub unsafe fn font_word_spacing(&self) -> c_double
Returns the current word spacing value.
Calls C++ function: double QTextCharFormat::fontWordSpacing() const
.
Returns the current word spacing value.
This function was introduced in Qt 4.4.
See also setFontWordSpacing().
sourcepub unsafe fn is_anchor(&self) -> bool
pub unsafe fn is_anchor(&self) -> bool
Returns true
if the text is formatted as an anchor; otherwise returns false
.
Calls C++ function: bool QTextCharFormat::isAnchor() const
.
Returns true
if the text is formatted as an anchor; otherwise returns false
.
See also setAnchor(), setAnchorHref(), and setAnchorNames().
sourcepub unsafe fn is_valid(&self) -> bool
pub unsafe fn is_valid(&self) -> bool
Returns true
if this character format is valid; otherwise returns false.
Calls C++ function: bool QTextCharFormat::isValid() const
.
Returns true
if this character format is valid; otherwise returns false.
sourcepub unsafe fn set_anchor(&self, anchor: bool)
pub unsafe fn set_anchor(&self, anchor: bool)
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally. (Anchors are hyperlinks which are often shown underlined and in a different color from plain text.)
Calls C++ function: void QTextCharFormat::setAnchor(bool anchor)
.
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally. (Anchors are hyperlinks which are often shown underlined and in a different color from plain text.)
The way the text is rendered is independent of whether or not the format has a valid anchor defined. Use setAnchorHref(), and optionally setAnchorNames() to create a hypertext link.
See also isAnchor().
sourcepub unsafe fn set_anchor_href(&self, value: impl CastInto<Ref<QString>>)
pub unsafe fn set_anchor_href(&self, value: impl CastInto<Ref<QString>>)
Sets the hypertext link for the text format to the given value. This is typically a URL like "http://example.com/index.html".
Calls C++ function: void QTextCharFormat::setAnchorHref(const QString& value)
.
Sets the hypertext link for the text format to the given value. This is typically a URL like “http://example.com/index.html”.
The anchor will be displayed with the value as its display text; if you want to display different text call setAnchorNames().
To format the text as a hypertext link use setAnchor().
See also anchorHref().
sourcepub unsafe fn set_anchor_name(&self, name: impl CastInto<Ref<QString>>)
pub unsafe fn set_anchor_name(&self, name: impl CastInto<Ref<QString>>)
This function is deprecated. Use setAnchorNames() instead.
Calls C++ function: void QTextCharFormat::setAnchorName(const QString& name)
.
This function is deprecated. Use setAnchorNames() instead.
Sets the text format's anchor name. For the anchor to work as a hyperlink, the destination must be set with setAnchorHref() and the anchor must be enabled with setAnchor().
See also anchorName().
sourcepub unsafe fn set_anchor_names(&self, names: impl CastInto<Ref<QStringList>>)
pub unsafe fn set_anchor_names(&self, names: impl CastInto<Ref<QStringList>>)
Sets the text format's anchor names. For the anchor to work as a hyperlink, the destination must be set with setAnchorHref() and the anchor must be enabled with setAnchor().
Calls C++ function: void QTextCharFormat::setAnchorNames(const QStringList& names)
.
Sets the text format’s anchor names. For the anchor to work as a hyperlink, the destination must be set with setAnchorHref() and the anchor must be enabled with setAnchor().
This function was introduced in Qt 4.3.
See also anchorNames().
sourcepub unsafe fn set_font_2a(
&self,
font: impl CastInto<Ref<QFont>>,
behavior: FontPropertiesInheritanceBehavior
)
pub unsafe fn set_font_2a( &self, font: impl CastInto<Ref<QFont>>, behavior: FontPropertiesInheritanceBehavior )
Sets the text format's font.
Calls C++ function: void QTextCharFormat::setFont(const QFont& font, QTextCharFormat::FontPropertiesInheritanceBehavior behavior)
.
Sets the text format’s font.
If behavior is QTextCharFormat::FontPropertiesAll, the font property that has not been explicitly set is treated like as it were set with default value; If behavior is QTextCharFormat::FontPropertiesSpecifiedOnly, the font property that has not been explicitly set is ignored and the respective property value remains unchanged.
This function was introduced in Qt 5.3.
See also font().
sourcepub unsafe fn set_font_1a(&self, font: impl CastInto<Ref<QFont>>)
pub unsafe fn set_font_1a(&self, font: impl CastInto<Ref<QFont>>)
This is an overloaded function.
Calls C++ function: void QTextCharFormat::setFont(const QFont& font)
.
sourcepub unsafe fn set_font_capitalization(&self, capitalization: Capitalization)
pub unsafe fn set_font_capitalization(&self, capitalization: Capitalization)
Sets the capitalization of the text that apppears in this font to capitalization.
Calls C++ function: void QTextCharFormat::setFontCapitalization(QFont::Capitalization capitalization)
.
Sets the capitalization of the text that apppears in this font to capitalization.
A font's capitalization makes the text appear in the selected capitalization mode.
This function was introduced in Qt 4.4.
See also fontCapitalization().
sourcepub unsafe fn set_font_families(
&self,
families: impl CastInto<Ref<QStringList>>
)
Available on cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn set_font_families( &self, families: impl CastInto<Ref<QStringList>> )
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Sets the text format's font families.
Calls C++ function: void QTextCharFormat::setFontFamilies(const QStringList& families)
.
Sets the text format’s font families.
This function was introduced in Qt 5.13.
See also fontFamilies() and setFont().
sourcepub unsafe fn set_font_family(&self, family: impl CastInto<Ref<QString>>)
pub unsafe fn set_font_family(&self, family: impl CastInto<Ref<QString>>)
Sets the text format's font family.
Calls C++ function: void QTextCharFormat::setFontFamily(const QString& family)
.
Sets the text format’s font family.
See also fontFamily() and setFont().
sourcepub unsafe fn set_font_fixed_pitch(&self, fixed_pitch: bool)
pub unsafe fn set_font_fixed_pitch(&self, fixed_pitch: bool)
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used.
Calls C++ function: void QTextCharFormat::setFontFixedPitch(bool fixedPitch)
.
If fixedPitch is true, sets the text format’s font to be fixed pitch; otherwise a non-fixed pitch font is used.
See also fontFixedPitch() and setFont().
sourcepub unsafe fn set_font_hinting_preference(
&self,
hinting_preference: HintingPreference
)
pub unsafe fn set_font_hinting_preference( &self, hinting_preference: HintingPreference )
Sets the hinting preference of the text format's font to be hintingPreference.
Calls C++ function: void QTextCharFormat::setFontHintingPreference(QFont::HintingPreference hintingPreference)
.
Sets the hinting preference of the text format’s font to be hintingPreference.
This function was introduced in Qt 4.8.
See also fontHintingPreference(), setFont(), and QFont::setHintingPreference().
sourcepub unsafe fn set_font_italic(&self, italic: bool)
pub unsafe fn set_font_italic(&self, italic: bool)
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic.
Calls C++ function: void QTextCharFormat::setFontItalic(bool italic)
.
If italic is true, sets the text format’s font to be italic; otherwise the font will be non-italic.
See also fontItalic() and setFont().
sourcepub unsafe fn set_font_kerning(&self, enable: bool)
pub unsafe fn set_font_kerning(&self, enable: bool)
Enables kerning for this font if enable is true; otherwise disables it.
Calls C++ function: void QTextCharFormat::setFontKerning(bool enable)
.
Enables kerning for this font if enable is true; otherwise disables it.
When kerning is enabled, glyph metrics do not add up anymore, even for Latin text. In other words, the assumption that width('a') + width('b') is equal to width("ab") is not neccesairly true.
This function was introduced in Qt 4.5.
See also fontKerning() and setFont().
sourcepub unsafe fn set_font_letter_spacing(&self, spacing: c_double)
pub unsafe fn set_font_letter_spacing(&self, spacing: c_double)
Sets the letter spacing of this format to the given spacing. The meaning of the value depends on the font letter spacing type.
Calls C++ function: void QTextCharFormat::setFontLetterSpacing(double spacing)
.
Sets the letter spacing of this format to the given spacing. The meaning of the value depends on the font letter spacing type.
For percentage spacing a value of 100 indicates default spacing; a value of 200 doubles the amount of space a letter takes.
This function was introduced in Qt 4.4.
See also fontLetterSpacing(), setFontLetterSpacingType(), and fontLetterSpacingType().
sourcepub unsafe fn set_font_letter_spacing_type(
&self,
letter_spacing_type: SpacingType
)
pub unsafe fn set_font_letter_spacing_type( &self, letter_spacing_type: SpacingType )
Sets the letter spacing type of this format to letterSpacingType.
Calls C++ function: void QTextCharFormat::setFontLetterSpacingType(QFont::SpacingType letterSpacingType)
.
Sets the letter spacing type of this format to letterSpacingType.
This function was introduced in Qt 5.0.
See also fontLetterSpacingType(), setFontLetterSpacing(), and fontLetterSpacing().
sourcepub unsafe fn set_font_overline(&self, overline: bool)
pub unsafe fn set_font_overline(&self, overline: bool)
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined.
Calls C++ function: void QTextCharFormat::setFontOverline(bool overline)
.
If overline is true, sets the text format’s font to be overlined; otherwise the font is displayed non-overlined.
See also fontOverline() and setFont().
sourcepub unsafe fn set_font_point_size(&self, size: c_double)
pub unsafe fn set_font_point_size(&self, size: c_double)
Sets the text format's font size.
Calls C++ function: void QTextCharFormat::setFontPointSize(double size)
.
Sets the text format’s font size.
See also fontPointSize() and setFont().
sourcepub unsafe fn set_font_stretch(&self, factor: c_int)
pub unsafe fn set_font_stretch(&self, factor: c_int)
Sets the stretch factor for the font to factor.
Calls C++ function: void QTextCharFormat::setFontStretch(int factor)
.
Sets the stretch factor for the font to factor.
The stretch factor changes the width of all characters in the font by factor percent. For example, setting factor to 150 results in all characters in the font being 1.5 times (ie. 150%) wider. The default stretch factor is 100. The minimum stretch factor is 1, and the maximum stretch factor is 4000.
The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts.
This function was introduced in Qt 5.0.
See also fontStretch().
sourcepub unsafe fn set_font_strike_out(&self, strike_out: bool)
pub unsafe fn set_font_strike_out(&self, strike_out: bool)
If strikeOut is true, sets the text format's font with strike-out enabled (with a horizontal line through it); otherwise it is displayed without strikeout.
Calls C++ function: void QTextCharFormat::setFontStrikeOut(bool strikeOut)
.
If strikeOut is true, sets the text format’s font with strike-out enabled (with a horizontal line through it); otherwise it is displayed without strikeout.
See also fontStrikeOut() and setFont().
sourcepub unsafe fn set_font_style_hint_2a(
&self,
hint: StyleHint,
strategy: StyleStrategy
)
pub unsafe fn set_font_style_hint_2a( &self, hint: StyleHint, strategy: StyleStrategy )
Sets the font style hint and strategy.
Calls C++ function: void QTextCharFormat::setFontStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy = …)
.
Sets the font style hint and strategy.
Qt does not support style hints on X11 since this information is not provided by the window system.
This function was introduced in Qt 4.5.
See also fontStyleHint(), setFont(), and QFont::setStyleHint().
sourcepub unsafe fn set_font_style_hint_1a(&self, hint: StyleHint)
pub unsafe fn set_font_style_hint_1a(&self, hint: StyleHint)
Sets the font style hint and strategy.
Calls C++ function: void QTextCharFormat::setFontStyleHint(QFont::StyleHint hint)
.
Sets the font style hint and strategy.
Qt does not support style hints on X11 since this information is not provided by the window system.
This function was introduced in Qt 4.5.
See also fontStyleHint(), setFont(), and QFont::setStyleHint().
sourcepub unsafe fn set_font_style_name(
&self,
style_name: impl CastInto<Ref<QString>>
)
Available on cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn set_font_style_name( &self, style_name: impl CastInto<Ref<QString>> )
cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Sets the text format's font styleName.
Calls C++ function: void QTextCharFormat::setFontStyleName(const QString& styleName)
.
Sets the text format’s font styleName.
This function was introduced in Qt 5.13.
See also fontStyleName(), setFont(), and QFont::setStyleName().
sourcepub unsafe fn set_font_style_strategy(&self, strategy: StyleStrategy)
pub unsafe fn set_font_style_strategy(&self, strategy: StyleStrategy)
Sets the font style strategy.
Calls C++ function: void QTextCharFormat::setFontStyleStrategy(QFont::StyleStrategy strategy)
.
Sets the font style strategy.
This function was introduced in Qt 4.5.
See also fontStyleStrategy(), setFont(), and QFont::setStyleStrategy().
sourcepub unsafe fn set_font_underline(&self, underline: bool)
pub unsafe fn set_font_underline(&self, underline: bool)
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined.
Calls C++ function: void QTextCharFormat::setFontUnderline(bool underline)
.
If underline is true, sets the text format’s font to be underlined; otherwise it is displayed non-underlined.
See also fontUnderline() and setFont().
sourcepub unsafe fn set_font_weight(&self, weight: c_int)
pub unsafe fn set_font_weight(&self, weight: c_int)
Sets the text format's font weight to weight.
Calls C++ function: void QTextCharFormat::setFontWeight(int weight)
.
Sets the text format’s font weight to weight.
See also fontWeight(), setFont(), and QFont::Weight.
sourcepub unsafe fn set_font_word_spacing(&self, spacing: c_double)
pub unsafe fn set_font_word_spacing(&self, spacing: c_double)
Sets the word spacing of this format to the given spacing, in pixels.
Calls C++ function: void QTextCharFormat::setFontWordSpacing(double spacing)
.
Sets the word spacing of this format to the given spacing, in pixels.
This function was introduced in Qt 4.4.
See also fontWordSpacing().
sourcepub unsafe fn set_table_cell_column_span(&self, table_cell_column_span: c_int)
pub unsafe fn set_table_cell_column_span(&self, table_cell_column_span: c_int)
Calls C++ function: void QTextCharFormat::setTableCellColumnSpan(int tableCellColumnSpan)
.
sourcepub unsafe fn set_table_cell_row_span(&self, table_cell_row_span: c_int)
pub unsafe fn set_table_cell_row_span(&self, table_cell_row_span: c_int)
Calls C++ function: void QTextCharFormat::setTableCellRowSpan(int tableCellRowSpan)
.
sourcepub unsafe fn set_text_outline(&self, pen: impl CastInto<Ref<QPen>>)
pub unsafe fn set_text_outline(&self, pen: impl CastInto<Ref<QPen>>)
Sets the pen used to draw the outlines of characters to the given pen.
Calls C++ function: void QTextCharFormat::setTextOutline(const QPen& pen)
.
Sets the pen used to draw the outlines of characters to the given pen.
See also textOutline().
sourcepub unsafe fn set_tool_tip(&self, tip: impl CastInto<Ref<QString>>)
pub unsafe fn set_tool_tip(&self, tip: impl CastInto<Ref<QString>>)
Sets the tool tip for a fragment of text to the given text.
Calls C++ function: void QTextCharFormat::setToolTip(const QString& tip)
.
Sets the tool tip for a fragment of text to the given text.
This function was introduced in Qt 4.3.
See also toolTip().
sourcepub unsafe fn set_underline_color(&self, color: impl CastInto<Ref<QColor>>)
pub unsafe fn set_underline_color(&self, color: impl CastInto<Ref<QColor>>)
Sets the underline color used for the characters with this format to the color specified.
Calls C++ function: void QTextCharFormat::setUnderlineColor(const QColor& color)
.
Sets the underline color used for the characters with this format to the color specified.
See also underlineColor().
sourcepub unsafe fn set_underline_style(&self, style: UnderlineStyle)
pub unsafe fn set_underline_style(&self, style: UnderlineStyle)
Sets the style of underlining the text to style.
Calls C++ function: void QTextCharFormat::setUnderlineStyle(QTextCharFormat::UnderlineStyle style)
.
Sets the style of underlining the text to style.
This function was introduced in Qt 4.2.
See also underlineStyle().
sourcepub unsafe fn set_vertical_alignment(&self, alignment: VerticalAlignment)
pub unsafe fn set_vertical_alignment(&self, alignment: VerticalAlignment)
Sets the vertical alignment used for the characters with this format to the alignment specified.
Calls C++ function: void QTextCharFormat::setVerticalAlignment(QTextCharFormat::VerticalAlignment alignment)
.
Sets the vertical alignment used for the characters with this format to the alignment specified.
See also verticalAlignment().
sourcepub unsafe fn table_cell_column_span(&self) -> c_int
pub unsafe fn table_cell_column_span(&self) -> c_int
Calls C++ function: int QTextCharFormat::tableCellColumnSpan() const
.
sourcepub unsafe fn table_cell_row_span(&self) -> c_int
pub unsafe fn table_cell_row_span(&self) -> c_int
Calls C++ function: int QTextCharFormat::tableCellRowSpan() const
.
sourcepub unsafe fn text_outline(&self) -> CppBox<QPen>
pub unsafe fn text_outline(&self) -> CppBox<QPen>
Returns the pen used to draw the outlines of characters in this format.
Calls C++ function: QPen QTextCharFormat::textOutline() const
.
Returns the pen used to draw the outlines of characters in this format.
See also setTextOutline().
sourcepub unsafe fn tool_tip(&self) -> CppBox<QString>
pub unsafe fn tool_tip(&self) -> CppBox<QString>
Returns the tool tip that is displayed for a fragment of text.
Calls C++ function: QString QTextCharFormat::toolTip() const
.
Returns the tool tip that is displayed for a fragment of text.
This function was introduced in Qt 4.3.
See also setToolTip().
sourcepub unsafe fn underline_color(&self) -> CppBox<QColor>
pub unsafe fn underline_color(&self) -> CppBox<QColor>
Returns the color used to underline the characters with this format.
Calls C++ function: QColor QTextCharFormat::underlineColor() const
.
Returns the color used to underline the characters with this format.
See also setUnderlineColor().
sourcepub unsafe fn underline_style(&self) -> UnderlineStyle
pub unsafe fn underline_style(&self) -> UnderlineStyle
Returns the style of underlining the text.
Calls C++ function: QTextCharFormat::UnderlineStyle QTextCharFormat::underlineStyle() const
.
Returns the style of underlining the text.
This function was introduced in Qt 4.2.
See also setUnderlineStyle().
sourcepub unsafe fn vertical_alignment(&self) -> VerticalAlignment
pub unsafe fn vertical_alignment(&self) -> VerticalAlignment
Returns the vertical alignment used for characters with this format.
Calls C++ function: QTextCharFormat::VerticalAlignment QTextCharFormat::verticalAlignment() const
.
Returns the vertical alignment used for characters with this format.
See also setVerticalAlignment().
Methods from Deref<Target = QTextFormat>§
sourcepub unsafe fn background(&self) -> CppBox<QBrush>
pub unsafe fn background(&self) -> CppBox<QBrush>
Returns the brush used to paint the document's background.
Calls C++ function: QBrush QTextFormat::background() const
.
Returns the brush used to paint the document’s background.
See also setBackground(), clearBackground(), and foreground().
sourcepub unsafe fn bool_property(&self, property_id: c_int) -> bool
pub unsafe fn bool_property(&self, property_id: c_int) -> bool
Returns the value of the property specified by propertyId. If the property isn't of QTextFormat::Bool type, false is returned instead.
Calls C++ function: bool QTextFormat::boolProperty(int propertyId) const
.
Returns the value of the property specified by propertyId. If the property isn’t of QTextFormat::Bool type, false is returned instead.
See also setProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn brush_property(&self, property_id: c_int) -> CppBox<QBrush>
pub unsafe fn brush_property(&self, property_id: c_int) -> CppBox<QBrush>
Returns the value of the property given by propertyId; if the property isn't of QVariant::Brush type, Qt::NoBrush is returned instead.
Calls C++ function: QBrush QTextFormat::brushProperty(int propertyId) const
.
Returns the value of the property given by propertyId; if the property isn’t of QVariant::Brush type, Qt::NoBrush is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn clear_background(&self)
pub unsafe fn clear_background(&self)
Clears the brush used to paint the document's background. The default brush will be used.
Calls C++ function: void QTextFormat::clearBackground()
.
Clears the brush used to paint the document’s background. The default brush will be used.
See also background(), setBackground(), and clearForeground().
sourcepub unsafe fn clear_foreground(&self)
pub unsafe fn clear_foreground(&self)
Clears the brush used to paint the document's foreground. The default brush will be used.
Calls C++ function: void QTextFormat::clearForeground()
.
Clears the brush used to paint the document’s foreground. The default brush will be used.
See also foreground(), setForeground(), and clearBackground().
sourcepub unsafe fn clear_property(&self, property_id: c_int)
pub unsafe fn clear_property(&self, property_id: c_int)
Clears the value of the property given by propertyId
Calls C++ function: void QTextFormat::clearProperty(int propertyId)
.
Clears the value of the property given by propertyId
See also Property.
sourcepub unsafe fn color_property(&self, property_id: c_int) -> CppBox<QColor>
pub unsafe fn color_property(&self, property_id: c_int) -> CppBox<QColor>
Returns the value of the property given by propertyId; if the property isn't of QVariant::Color type, an invalid color is returned instead.
Calls C++ function: QColor QTextFormat::colorProperty(int propertyId) const
.
Returns the value of the property given by propertyId; if the property isn’t of QVariant::Color type, an invalid color is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn copy_from(
&self,
rhs: impl CastInto<Ref<QTextFormat>>
) -> Ref<QTextFormat>
pub unsafe fn copy_from( &self, rhs: impl CastInto<Ref<QTextFormat>> ) -> Ref<QTextFormat>
Assigns the other text format to this text format, and returns a reference to this text format.
Calls C++ function: QTextFormat& QTextFormat::operator=(const QTextFormat& rhs)
.
Assigns the other text format to this text format, and returns a reference to this text format.
sourcepub unsafe fn double_property(&self, property_id: c_int) -> c_double
pub unsafe fn double_property(&self, property_id: c_int) -> c_double
Returns the value of the property specified by propertyId. If the property isn't of QVariant::Double or QMetaType::Float type, 0 is returned instead.
Calls C++ function: double QTextFormat::doubleProperty(int propertyId) const
.
Returns the value of the property specified by propertyId. If the property isn’t of QVariant::Double or QMetaType::Float type, 0 is returned instead.
See also setProperty(), boolProperty(), intProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn foreground(&self) -> CppBox<QBrush>
pub unsafe fn foreground(&self) -> CppBox<QBrush>
Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
Calls C++ function: QBrush QTextFormat::foreground() const
.
Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
See also setForeground(), clearForeground(), and background().
sourcepub unsafe fn has_property(&self, property_id: c_int) -> bool
pub unsafe fn has_property(&self, property_id: c_int) -> bool
Returns true
if the text format has a property with the given propertyId; otherwise returns false
.
Calls C++ function: bool QTextFormat::hasProperty(int propertyId) const
.
Returns true
if the text format has a property with the given propertyId; otherwise returns false
.
See also properties() and Property.
sourcepub unsafe fn int_property(&self, property_id: c_int) -> c_int
pub unsafe fn int_property(&self, property_id: c_int) -> c_int
Returns the value of the property specified by propertyId. If the property is not of QTextFormat::Integer type, 0 is returned instead.
Calls C++ function: int QTextFormat::intProperty(int propertyId) const
.
Returns the value of the property specified by propertyId. If the property is not of QTextFormat::Integer type, 0 is returned instead.
See also setProperty(), boolProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn is_block_format(&self) -> bool
pub unsafe fn is_block_format(&self) -> bool
Returns true
if this text format is a BlockFormat
; otherwise returns false
.
Calls C++ function: bool QTextFormat::isBlockFormat() const
.
Returns true
if this text format is a BlockFormat
; otherwise returns false
.
sourcepub unsafe fn is_char_format(&self) -> bool
pub unsafe fn is_char_format(&self) -> bool
Returns true
if this text format is a CharFormat
; otherwise returns false
.
Calls C++ function: bool QTextFormat::isCharFormat() const
.
Returns true
if this text format is a CharFormat
; otherwise returns false
.
sourcepub unsafe fn is_empty(&self) -> bool
pub unsafe fn is_empty(&self) -> bool
Returns true if the format does not store any properties; false otherwise.
Calls C++ function: bool QTextFormat::isEmpty() const
.
Returns true if the format does not store any properties; false otherwise.
This function was introduced in Qt 5.3.
See also propertyCount() and properties().
sourcepub unsafe fn is_frame_format(&self) -> bool
pub unsafe fn is_frame_format(&self) -> bool
Returns true
if this text format is a FrameFormat
; otherwise returns false
.
Calls C++ function: bool QTextFormat::isFrameFormat() const
.
Returns true
if this text format is a FrameFormat
; otherwise returns false
.
sourcepub unsafe fn is_image_format(&self) -> bool
pub unsafe fn is_image_format(&self) -> bool
Returns true
if this text format is an image format; otherwise returns false
.
Calls C++ function: bool QTextFormat::isImageFormat() const
.
Returns true
if this text format is an image format; otherwise returns false
.
sourcepub unsafe fn is_list_format(&self) -> bool
pub unsafe fn is_list_format(&self) -> bool
Returns true
if this text format is a ListFormat
; otherwise returns false
.
Calls C++ function: bool QTextFormat::isListFormat() const
.
Returns true
if this text format is a ListFormat
; otherwise returns false
.
sourcepub unsafe fn is_table_cell_format(&self) -> bool
pub unsafe fn is_table_cell_format(&self) -> bool
Returns true
if this text format is a TableCellFormat
; otherwise returns false
.
Calls C++ function: bool QTextFormat::isTableCellFormat() const
.
Returns true
if this text format is a TableCellFormat
; otherwise returns false
.
This function was introduced in Qt 4.4.
sourcepub unsafe fn is_table_format(&self) -> bool
pub unsafe fn is_table_format(&self) -> bool
Returns true
if this text format is a TableFormat
; otherwise returns false
.
Calls C++ function: bool QTextFormat::isTableFormat() const
.
Returns true
if this text format is a TableFormat
; otherwise returns false
.
sourcepub unsafe fn is_valid(&self) -> bool
pub unsafe fn is_valid(&self) -> bool
Returns true
if the format is valid (i.e. is not InvalidFormat); otherwise returns false
.
Calls C++ function: bool QTextFormat::isValid() const
.
Returns true
if the format is valid (i.e. is not InvalidFormat); otherwise returns false
.
sourcepub unsafe fn layout_direction(&self) -> LayoutDirection
pub unsafe fn layout_direction(&self) -> LayoutDirection
Returns the document's layout direction.
Calls C++ function: Qt::LayoutDirection QTextFormat::layoutDirection() const
.
Returns the document’s layout direction.
See also setLayoutDirection().
sourcepub unsafe fn length_property(&self, property_id: c_int) -> CppBox<QTextLength>
pub unsafe fn length_property(&self, property_id: c_int) -> CppBox<QTextLength>
Returns the value of the property given by propertyId.
Calls C++ function: QTextLength QTextFormat::lengthProperty(int propertyId) const
.
Returns the value of the property given by propertyId.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn length_vector_property(
&self,
property_id: c_int
) -> CppBox<QVectorOfQTextLength>
pub unsafe fn length_vector_property( &self, property_id: c_int ) -> CppBox<QVectorOfQTextLength>
Returns the value of the property given by propertyId. If the property isn't of QTextFormat::LengthVector type, an empty length vector is returned instead.
Calls C++ function: QVector<QTextLength> QTextFormat::lengthVectorProperty(int propertyId) const
.
Returns the value of the property given by propertyId. If the property isn’t of QTextFormat::LengthVector type, an empty length vector is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), and Property.
sourcepub unsafe fn merge(&self, other: impl CastInto<Ref<QTextFormat>>)
pub unsafe fn merge(&self, other: impl CastInto<Ref<QTextFormat>>)
Merges the other format with this format; where there are conflicts the other format takes precedence.
Calls C++ function: void QTextFormat::merge(const QTextFormat& other)
.
Merges the other format with this format; where there are conflicts the other format takes precedence.
sourcepub unsafe fn object_index(&self) -> c_int
pub unsafe fn object_index(&self) -> c_int
Returns the index of the format object, or -1 if the format object is invalid.
Calls C++ function: int QTextFormat::objectIndex() const
.
Returns the index of the format object, or -1 if the format object is invalid.
See also setObjectIndex().
sourcepub unsafe fn object_type(&self) -> c_int
pub unsafe fn object_type(&self) -> c_int
Returns the text format's object type.
Calls C++ function: int QTextFormat::objectType() const
.
Returns the text format’s object type.
See also ObjectTypes and setObjectType().
sourcepub unsafe fn pen_property(&self, property_id: c_int) -> CppBox<QPen>
pub unsafe fn pen_property(&self, property_id: c_int) -> CppBox<QPen>
Returns the value of the property given by propertyId; if the property isn't of QVariant::Pen type, Qt::NoPen is returned instead.
Calls C++ function: QPen QTextFormat::penProperty(int propertyId) const
.
Returns the value of the property given by propertyId; if the property isn’t of QVariant::Pen type, Qt::NoPen is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn properties(&self) -> CppBox<QMapOfIntQVariant>
pub unsafe fn properties(&self) -> CppBox<QMapOfIntQVariant>
Returns a map with all properties of this text format.
Calls C++ function: QMap<int, QVariant> QTextFormat::properties() const
.
Returns a map with all properties of this text format.
sourcepub unsafe fn property(&self, property_id: c_int) -> CppBox<QVariant>
pub unsafe fn property(&self, property_id: c_int) -> CppBox<QVariant>
Returns the property specified by the given propertyId.
Calls C++ function: QVariant QTextFormat::property(int propertyId) const
.
Returns the property specified by the given propertyId.
See also setProperty() and Property.
sourcepub unsafe fn property_count(&self) -> c_int
pub unsafe fn property_count(&self) -> c_int
Returns the number of properties stored in the format.
Calls C++ function: int QTextFormat::propertyCount() const
.
Returns the number of properties stored in the format.
This function was introduced in Qt 4.3.
sourcepub unsafe fn set_background(&self, brush: impl CastInto<Ref<QBrush>>)
pub unsafe fn set_background(&self, brush: impl CastInto<Ref<QBrush>>)
Sets the brush use to paint the document's background to the brush specified.
Calls C++ function: void QTextFormat::setBackground(const QBrush& brush)
.
Sets the brush use to paint the document’s background to the brush specified.
See also background(), clearBackground(), and setForeground().
sourcepub unsafe fn set_foreground(&self, brush: impl CastInto<Ref<QBrush>>)
pub unsafe fn set_foreground(&self, brush: impl CastInto<Ref<QBrush>>)
Sets the foreground brush to the specified brush. The foreground brush is mostly used to render text.
Calls C++ function: void QTextFormat::setForeground(const QBrush& brush)
.
Sets the foreground brush to the specified brush. The foreground brush is mostly used to render text.
See also foreground(), clearForeground(), and setBackground().
sourcepub unsafe fn set_layout_direction(&self, direction: LayoutDirection)
pub unsafe fn set_layout_direction(&self, direction: LayoutDirection)
Sets the document's layout direction to the specified direction.
Calls C++ function: void QTextFormat::setLayoutDirection(Qt::LayoutDirection direction)
.
Sets the document’s layout direction to the specified direction.
See also layoutDirection().
sourcepub unsafe fn set_object_index(&self, object: c_int)
pub unsafe fn set_object_index(&self, object: c_int)
Sets the format object's object index.
Calls C++ function: void QTextFormat::setObjectIndex(int object)
.
Sets the format object’s object index.
See also objectIndex().
sourcepub unsafe fn set_object_type(&self, type_: c_int)
pub unsafe fn set_object_type(&self, type_: c_int)
Sets the text format's object type to type.
Calls C++ function: void QTextFormat::setObjectType(int type)
.
Sets the text format’s object type to type.
See also ObjectTypes and objectType().
sourcepub unsafe fn set_property_int_q_variant(
&self,
property_id: c_int,
value: impl CastInto<Ref<QVariant>>
)
pub unsafe fn set_property_int_q_variant( &self, property_id: c_int, value: impl CastInto<Ref<QVariant>> )
Sets the property specified by the propertyId to the given value.
Calls C++ function: void QTextFormat::setProperty(int propertyId, const QVariant& value)
.
sourcepub unsafe fn set_property_int_q_vector_of_q_text_length(
&self,
property_id: c_int,
lengths: impl CastInto<Ref<QVectorOfQTextLength>>
)
pub unsafe fn set_property_int_q_vector_of_q_text_length( &self, property_id: c_int, lengths: impl CastInto<Ref<QVectorOfQTextLength>> )
Sets the value of the property given by propertyId to value.
Calls C++ function: void QTextFormat::setProperty(int propertyId, const QVector<QTextLength>& lengths)
.
Sets the value of the property given by propertyId to value.
See also lengthVectorProperty() and Property.
sourcepub unsafe fn string_property(&self, property_id: c_int) -> CppBox<QString>
pub unsafe fn string_property(&self, property_id: c_int) -> CppBox<QString>
Returns the value of the property given by propertyId; if the property isn't of QVariant::String type, an empty string is returned instead.
Calls C++ function: QString QTextFormat::stringProperty(int propertyId) const
.
Returns the value of the property given by propertyId; if the property isn’t of QVariant::String type, an empty string is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
sourcepub unsafe fn swap(&self, other: impl CastInto<Ref<QTextFormat>>)
pub unsafe fn swap(&self, other: impl CastInto<Ref<QTextFormat>>)
Swaps this text format with other. This function is very fast and never fails.
Calls C++ function: void QTextFormat::swap(QTextFormat& other)
.
Swaps this text format with other. This function is very fast and never fails.
This function was introduced in Qt 5.0.
sourcepub unsafe fn to_block_format(&self) -> CppBox<QTextBlockFormat>
pub unsafe fn to_block_format(&self) -> CppBox<QTextBlockFormat>
Returns this format as a block format.
Calls C++ function: QTextBlockFormat QTextFormat::toBlockFormat() const
.
Returns this format as a block format.
sourcepub unsafe fn to_char_format(&self) -> CppBox<QTextCharFormat>
pub unsafe fn to_char_format(&self) -> CppBox<QTextCharFormat>
Returns this format as a character format.
Calls C++ function: QTextCharFormat QTextFormat::toCharFormat() const
.
Returns this format as a character format.
sourcepub unsafe fn to_frame_format(&self) -> CppBox<QTextFrameFormat>
pub unsafe fn to_frame_format(&self) -> CppBox<QTextFrameFormat>
Returns this format as a frame format.
Calls C++ function: QTextFrameFormat QTextFormat::toFrameFormat() const
.
Returns this format as a frame format.
sourcepub unsafe fn to_image_format(&self) -> CppBox<QTextImageFormat>
pub unsafe fn to_image_format(&self) -> CppBox<QTextImageFormat>
Returns this format as an image format.
Calls C++ function: QTextImageFormat QTextFormat::toImageFormat() const
.
Returns this format as an image format.
sourcepub unsafe fn to_list_format(&self) -> CppBox<QTextListFormat>
pub unsafe fn to_list_format(&self) -> CppBox<QTextListFormat>
Returns this format as a list format.
Calls C++ function: QTextListFormat QTextFormat::toListFormat() const
.
Returns this format as a list format.
sourcepub unsafe fn to_q_variant(&self) -> CppBox<QVariant>
pub unsafe fn to_q_variant(&self) -> CppBox<QVariant>
sourcepub unsafe fn to_table_cell_format(&self) -> CppBox<QTextTableCellFormat>
pub unsafe fn to_table_cell_format(&self) -> CppBox<QTextTableCellFormat>
Returns this format as a table cell format.
Calls C++ function: QTextTableCellFormat QTextFormat::toTableCellFormat() const
.
Returns this format as a table cell format.
This function was introduced in Qt 4.4.
sourcepub unsafe fn to_table_format(&self) -> CppBox<QTextTableFormat>
pub unsafe fn to_table_format(&self) -> CppBox<QTextTableFormat>
Returns this format as a table format.
Calls C++ function: QTextTableFormat QTextFormat::toTableFormat() const
.
Returns this format as a table format.
sourcepub unsafe fn type_(&self) -> c_int
pub unsafe fn type_(&self) -> c_int
Returns the type of this format.
Calls C++ function: int QTextFormat::type() const
.
Returns the type of this format.
See also FormatType.
Trait Implementations§
source§impl CppDeletable for QTextTableCellFormat
impl CppDeletable for QTextTableCellFormat
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
Calls C++ function: [destructor] void QTextTableCellFormat::~QTextTableCellFormat()
.
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.
The table cell format of a table cell in a document specifies the visual properties of the table cell.
The padding properties of a table cell are controlled by setLeftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding(). All the paddings can be set at once using setPadding().
source§impl Deref for QTextTableCellFormat
impl Deref for QTextTableCellFormat
source§fn deref(&self) -> &QTextCharFormat
fn deref(&self) -> &QTextCharFormat
Calls C++ function: QTextCharFormat* static_cast<QTextCharFormat*>(QTextTableCellFormat* ptr)
.
§type Target = QTextCharFormat
type Target = QTextCharFormat
source§impl StaticDowncast<QTextTableCellFormat> for QTextCharFormat
impl StaticDowncast<QTextTableCellFormat> for QTextCharFormat
source§unsafe fn static_downcast(
ptr: Ptr<QTextCharFormat>
) -> Ptr<QTextTableCellFormat>
unsafe fn static_downcast( ptr: Ptr<QTextCharFormat> ) -> Ptr<QTextTableCellFormat>
Calls C++ function: QTextTableCellFormat* static_cast<QTextTableCellFormat*>(QTextCharFormat* ptr)
.
source§impl StaticDowncast<QTextTableCellFormat> for QTextFormat
impl StaticDowncast<QTextTableCellFormat> for QTextFormat
source§unsafe fn static_downcast(ptr: Ptr<QTextFormat>) -> Ptr<QTextTableCellFormat>
unsafe fn static_downcast(ptr: Ptr<QTextFormat>) -> Ptr<QTextTableCellFormat>
Calls C++ function: QTextTableCellFormat* static_cast<QTextTableCellFormat*>(QTextFormat* ptr)
.
source§impl StaticUpcast<QTextCharFormat> for QTextTableCellFormat
impl StaticUpcast<QTextCharFormat> for QTextTableCellFormat
source§unsafe fn static_upcast(ptr: Ptr<QTextTableCellFormat>) -> Ptr<QTextCharFormat>
unsafe fn static_upcast(ptr: Ptr<QTextTableCellFormat>) -> Ptr<QTextCharFormat>
Calls C++ function: QTextCharFormat* static_cast<QTextCharFormat*>(QTextTableCellFormat* ptr)
.
source§impl StaticUpcast<QTextFormat> for QTextTableCellFormat
impl StaticUpcast<QTextFormat> for QTextTableCellFormat
source§unsafe fn static_upcast(ptr: Ptr<QTextTableCellFormat>) -> Ptr<QTextFormat>
unsafe fn static_upcast(ptr: Ptr<QTextTableCellFormat>) -> Ptr<QTextFormat>
Calls C++ function: QTextFormat* static_cast<QTextFormat*>(QTextTableCellFormat* ptr)
.