#[repr(C)]
pub struct QTextTableCellFormat { /* private fields */ }
Expand description

The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.

C++ class: QTextTableCellFormat.

C++ documentation:

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

source

pub unsafe fn bottom_border(&self) -> c_double

Available on cpp_lib_version="5.14.0" only.

Returns the bottom border width of the table cell.

Calls C++ function: double QTextTableCellFormat::bottomBorder() const.

C++ documentation:

Returns the bottom border width of the table cell.

This function was introduced in Qt 5.14.

See also setBottomBorder().

source

pub unsafe fn bottom_border_brush(&self) -> CppBox<QBrush>

Available on cpp_lib_version="5.14.0" only.

Returns the bottom border brush of the table cell.

Calls C++ function: QBrush QTextTableCellFormat::bottomBorderBrush() const.

C++ documentation:

Returns the bottom border brush of the table cell.

This function was introduced in Qt 5.14.

See also setBottomBorderBrush().

source

pub unsafe fn bottom_border_style(&self) -> BorderStyle

Available on cpp_lib_version="5.14.0" only.

Returns the bottom border style of the table cell.

Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::bottomBorderStyle() const.

C++ documentation:

Returns the bottom border style of the table cell.

This function was introduced in Qt 5.14.

See also setBottomBorderStyle().

source

pub unsafe fn bottom_padding(&self) -> c_double

Gets the bottom padding of the table cell.

Calls C++ function: double QTextTableCellFormat::bottomPadding() const.

C++ documentation:

Gets the bottom padding of the table cell.

This function was introduced in Qt 4.4.

See also setBottomPadding(), leftPadding(), rightPadding(), and topPadding().

source

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).

C++ documentation:

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

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.

C++ documentation:

Returns true if this table cell format is valid; otherwise returns false.

This function was introduced in Qt 4.4.

source

pub unsafe fn left_border(&self) -> c_double

Available on cpp_lib_version="5.14.0" only.

Returns the left border width of the table cell.

Calls C++ function: double QTextTableCellFormat::leftBorder() const.

C++ documentation:

Returns the left border width of the table cell.

This function was introduced in Qt 5.14.

See also setLeftBorder().

source

pub unsafe fn left_border_brush(&self) -> CppBox<QBrush>

Available on cpp_lib_version="5.14.0" only.

Returns the left border brush of the table cell.

Calls C++ function: QBrush QTextTableCellFormat::leftBorderBrush() const.

C++ documentation:

Returns the left border brush of the table cell.

This function was introduced in Qt 5.14.

See also setLeftBorderBrush().

source

pub unsafe fn left_border_style(&self) -> BorderStyle

Available on cpp_lib_version="5.14.0" only.

Returns the left border style of the table cell.

Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::leftBorderStyle() const.

C++ documentation:

Returns the left border style of the table cell.

This function was introduced in Qt 5.14.

See also setLeftBorderStyle().

source

pub unsafe fn left_padding(&self) -> c_double

Gets the left padding of the table cell.

Calls C++ function: double QTextTableCellFormat::leftPadding() const.

C++ documentation:

Gets the left padding of the table cell.

This function was introduced in Qt 4.4.

See also setLeftPadding(), rightPadding(), topPadding(), and bottomPadding().

source

pub unsafe fn new() -> CppBox<QTextTableCellFormat>

Constructs a new table cell format object.

Calls C++ function: [constructor] void QTextTableCellFormat::QTextTableCellFormat().

C++ documentation:

Constructs a new table cell format object.

This function was introduced in Qt 4.4.

source

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).

C++ documentation:

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

pub unsafe fn right_border(&self) -> c_double

Available on cpp_lib_version="5.14.0" only.

Returns the right border width of the table cell.

Calls C++ function: double QTextTableCellFormat::rightBorder() const.

C++ documentation:

Returns the right border width of the table cell.

This function was introduced in Qt 5.14.

See also setRightBorder().

source

pub unsafe fn right_border_brush(&self) -> CppBox<QBrush>

Available on cpp_lib_version="5.14.0" only.

Returns the right border brush of the table cell.

Calls C++ function: QBrush QTextTableCellFormat::rightBorderBrush() const.

C++ documentation:

Returns the right border brush of the table cell.

This function was introduced in Qt 5.14.

See also setRightBorderBrush().

source

pub unsafe fn right_border_style(&self) -> BorderStyle

Available on cpp_lib_version="5.14.0" only.

Returns the right border style of the table cell.

Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::rightBorderStyle() const.

C++ documentation:

Returns the right border style of the table cell.

This function was introduced in Qt 5.14.

See also setRightBorderStyle().

source

pub unsafe fn right_padding(&self) -> c_double

Gets the right padding of the table cell.

Calls C++ function: double QTextTableCellFormat::rightPadding() const.

C++ documentation:

Gets the right padding of the table cell.

This function was introduced in Qt 4.4.

See also setRightPadding(), leftPadding(), topPadding(), and bottomPadding().

source

pub unsafe fn set_border(&self, width: c_double)

Available on 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).

C++ documentation:

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.

source

pub unsafe fn set_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)

Available on 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).

C++ documentation:

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.

source

pub unsafe fn set_border_style(&self, style: BorderStyle)

Available on 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).

C++ documentation:

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.

source

pub unsafe fn set_bottom_border(&self, width: c_double)

Available on cpp_lib_version="5.14.0" only.

Sets the bottom border width of the table cell.

Calls C++ function: void QTextTableCellFormat::setBottomBorder(double width).

C++ documentation:

Sets the bottom border width of the table cell.

This function was introduced in Qt 5.14.

See also bottomBorder() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_bottom_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)

Available on 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).

C++ documentation:

Sets the bottom border brush of the table cell.

This function was introduced in Qt 5.14.

See also bottomBorderBrush() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_bottom_border_style(&self, style: BorderStyle)

Available on 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).

C++ documentation:

Sets the bottom border style of the table cell.

This function was introduced in Qt 5.14.

See also bottomBorderStyle() and QTextTableFormat::setBorderCollapse.

source

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).

C++ documentation:

Sets the bottom padding of the table cell.

This function was introduced in Qt 4.4.

See also bottomPadding(), setLeftPadding(), setRightPadding(), and setTopPadding().

source

pub unsafe fn set_left_border(&self, width: c_double)

Available on cpp_lib_version="5.14.0" only.

Sets the left border width of the table cell.

Calls C++ function: void QTextTableCellFormat::setLeftBorder(double width).

C++ documentation:

Sets the left border width of the table cell.

This function was introduced in Qt 5.14.

See also leftBorder() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_left_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)

Available on 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).

C++ documentation:

Sets the left border brush of the table cell.

This function was introduced in Qt 5.14.

See also leftBorderBrush() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_left_border_style(&self, style: BorderStyle)

Available on 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).

C++ documentation:

Sets the left border style of the table cell.

This function was introduced in Qt 5.14.

See also leftBorderStyle() and QTextTableFormat::setBorderCollapse.

source

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).

C++ documentation:

Sets the left padding of the table cell.

This function was introduced in Qt 4.4.

See also leftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding().

source

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).

C++ documentation:

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().

source

pub unsafe fn set_right_border(&self, width: c_double)

Available on cpp_lib_version="5.14.0" only.

Sets the right border width of the table cell.

Calls C++ function: void QTextTableCellFormat::setRightBorder(double width).

C++ documentation:

Sets the right border width of the table cell.

This function was introduced in Qt 5.14.

See also rightBorder() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_right_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)

Available on 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).

C++ documentation:

Sets the right border brush of the table cell.

This function was introduced in Qt 5.14.

See also rightBorderBrush() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_right_border_style(&self, style: BorderStyle)

Available on 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).

C++ documentation:

Sets the right border style of the table cell.

This function was introduced in Qt 5.14.

See also rightBorderStyle() and QTextTableFormat::setBorderCollapse.

source

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).

C++ documentation:

Sets the right padding of the table cell.

This function was introduced in Qt 4.4.

See also rightPadding(), setLeftPadding(), setTopPadding(), and setBottomPadding().

source

pub unsafe fn set_top_border(&self, width: c_double)

Available on cpp_lib_version="5.14.0" only.

Sets the top border width of the table cell.

Calls C++ function: void QTextTableCellFormat::setTopBorder(double width).

C++ documentation:

Sets the top border width of the table cell.

This function was introduced in Qt 5.14.

See also topBorder() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_top_border_brush(&self, brush: impl CastInto<Ref<QBrush>>)

Available on 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).

C++ documentation:

Sets the top border brush of the table cell.

This function was introduced in Qt 5.14.

See also topBorderBrush() and QTextTableFormat::setBorderCollapse.

source

pub unsafe fn set_top_border_style(&self, style: BorderStyle)

Available on 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).

C++ documentation:

Sets the top border style of the table cell.

This function was introduced in Qt 5.14.

See also topBorderStyle() and QTextTableFormat::setBorderCollapse.

source

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).

C++ documentation:

Sets the top padding of the table cell.

This function was introduced in Qt 4.4.

See also topPadding(), setLeftPadding(), setRightPadding(), and setBottomPadding().

source

pub unsafe fn top_border(&self) -> c_double

Available on cpp_lib_version="5.14.0" only.

Returns the top border width of the table cell.

Calls C++ function: double QTextTableCellFormat::topBorder() const.

C++ documentation:

Returns the top border width of the table cell.

This function was introduced in Qt 5.14.

See also setTopBorder().

source

pub unsafe fn top_border_brush(&self) -> CppBox<QBrush>

Available on cpp_lib_version="5.14.0" only.

Returns the top border brush of the table cell.

Calls C++ function: QBrush QTextTableCellFormat::topBorderBrush() const.

C++ documentation:

Returns the top border brush of the table cell.

This function was introduced in Qt 5.14.

See also setTopBorderBrush().

source

pub unsafe fn top_border_style(&self) -> BorderStyle

Available on cpp_lib_version="5.14.0" only.

Returns the top border style of the table cell.

Calls C++ function: QTextFrameFormat::BorderStyle QTextTableCellFormat::topBorderStyle() const.

C++ documentation:

Returns the top border style of the table cell.

This function was introduced in Qt 5.14.

See also setTopBorderStyle().

source

pub unsafe fn top_padding(&self) -> c_double

Gets the top padding of the table cell.

Calls C++ function: double QTextTableCellFormat::topPadding() const.

C++ documentation:

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>§

source

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.

C++ documentation:

Returns the text format’s hypertext link, or an empty string if none has been set.

See also setAnchorHref().

source

pub unsafe fn anchor_name(&self) -> CppBox<QString>

This function is deprecated. Use anchorNames() instead.

Calls C++ function: QString QTextCharFormat::anchorName() const.

C++ documentation:

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().

source

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.

C++ documentation:

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().

source

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).

C++ documentation:

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.

source

pub unsafe fn font(&self) -> CppBox<QFont>

Returns the font for this character format.

Calls C++ function: QFont QTextCharFormat::font() const.

C++ documentation:

Returns the font for this character format.

See also setFont().

source

pub unsafe fn font_capitalization(&self) -> Capitalization

Returns the current capitalization type of the font.

Calls C++ function: QFont::Capitalization QTextCharFormat::fontCapitalization() const.

C++ documentation:

Returns the current capitalization type of the font.

This function was introduced in Qt 4.4.

See also setFontCapitalization().

source

pub unsafe fn font_families(&self) -> CppBox<QVariant>

Available on 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.

C++ documentation:

Returns the text format’s font families.

This function was introduced in Qt 5.13.

See also setFontFamilies() and font().

source

pub unsafe fn font_family(&self) -> CppBox<QString>

Returns the text format's font family.

Calls C++ function: QString QTextCharFormat::fontFamily() const.

C++ documentation:

Returns the text format’s font family.

See also setFontFamily() and font().

source

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.

C++ documentation:

Returns true if the text format’s font is fixed pitch; otherwise returns false.

See also setFontFixedPitch() and font().

source

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.

C++ documentation:

Returns the hinting preference set for this text format.

This function was introduced in Qt 4.8.

See also setFontHintingPreference(), font(), and QFont::hintingPreference().

source

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.

C++ documentation:

Returns true if the text format’s font is italic; otherwise returns false.

See also setFontItalic() and font().

source

pub unsafe fn font_kerning(&self) -> bool

Returns true if the font kerning is enabled.

Calls C++ function: bool QTextCharFormat::fontKerning() const.

C++ documentation:

Returns true if the font kerning is enabled.

This function was introduced in Qt 4.5.

See also setFontKerning() and font().

source

pub unsafe fn font_letter_spacing(&self) -> c_double

Returns the current letter spacing.

Calls C++ function: double QTextCharFormat::fontLetterSpacing() const.

C++ documentation:

Returns the current letter spacing.

This function was introduced in Qt 4.4.

See also setFontLetterSpacing(), setFontLetterSpacingType(), and fontLetterSpacingType().

source

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.

C++ documentation:

Returns the letter spacing type of this format..

This function was introduced in Qt 5.0.

See also setFontLetterSpacingType(), setFontLetterSpacing(), and fontLetterSpacing().

source

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.

C++ documentation:

Returns true if the text format’s font is overlined; otherwise returns false.

See also setFontOverline() and font().

source

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.

C++ documentation:

Returns the font size used to display text in this format.

See also setFontPointSize() and font().

source

pub unsafe fn font_stretch(&self) -> c_int

Returns the current font stretching.

Calls C++ function: int QTextCharFormat::fontStretch() const.

C++ documentation:

Returns the current font stretching.

This function was introduced in Qt 5.0.

See also setFontStretch().

source

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.

C++ documentation:

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().

source

pub unsafe fn font_style_hint(&self) -> StyleHint

Returns the font style hint.

Calls C++ function: QFont::StyleHint QTextCharFormat::fontStyleHint() const.

C++ documentation:

Returns the font style hint.

This function was introduced in Qt 4.5.

See also setFontStyleHint() and font().

source

pub unsafe fn font_style_name(&self) -> CppBox<QVariant>

Available on 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.

C++ documentation:

Returns the text format’s font style name.

This function was introduced in Qt 5.13.

See also setFontStyleName(), font(), and QFont::styleName().

source

pub unsafe fn font_style_strategy(&self) -> StyleStrategy

Returns the current font style strategy.

Calls C++ function: QFont::StyleStrategy QTextCharFormat::fontStyleStrategy() const.

C++ documentation:

Returns the current font style strategy.

This function was introduced in Qt 4.5.

See also setFontStyleStrategy() and font().

source

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.

C++ documentation:

Returns true if the text format’s font is underlined; otherwise returns false.

See also setFontUnderline() and font().

source

pub unsafe fn font_weight(&self) -> c_int

Returns the text format's font weight.

Calls C++ function: int QTextCharFormat::fontWeight() const.

C++ documentation:

Returns the text format’s font weight.

See also setFontWeight(), font(), and QFont::Weight.

source

pub unsafe fn font_word_spacing(&self) -> c_double

Returns the current word spacing value.

Calls C++ function: double QTextCharFormat::fontWordSpacing() const.

C++ documentation:

Returns the current word spacing value.

This function was introduced in Qt 4.4.

See also setFontWordSpacing().

source

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.

C++ documentation:

Returns true if the text is formatted as an anchor; otherwise returns false.

See also setAnchor(), setAnchorHref(), and setAnchorNames().

source

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.

C++ documentation:

Returns true if this character format is valid; otherwise returns false.

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

This is an overloaded function.

Sets the text format's font.

See also font().

source

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).

C++ documentation:

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().

source

pub 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.

Sets the text format's font families.

Calls C++ function: void QTextCharFormat::setFontFamilies(const QStringList& families).

C++ documentation:

Sets the text format’s font families.

This function was introduced in Qt 5.13.

See also fontFamilies() and setFont().

source

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).

C++ documentation:

Sets the text format’s font family.

See also fontFamily() and setFont().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

Sets the letter spacing type of this format to letterSpacingType.

This function was introduced in Qt 5.0.

See also fontLetterSpacingType(), setFontLetterSpacing(), and fontLetterSpacing().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

Sets the text format’s font size.

See also fontPointSize() and setFont().

source

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).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

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 = …).

C++ documentation:

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().

source

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).

C++ documentation:

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().

source

pub 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.

Sets the text format's font styleName.

Calls C++ function: void QTextCharFormat::setFontStyleName(const QString& styleName).

C++ documentation:

Sets the text format’s font styleName.

This function was introduced in Qt 5.13.

See also fontStyleName(), setFont(), and QFont::setStyleName().

source

pub unsafe fn set_font_style_strategy(&self, strategy: StyleStrategy)

Sets the font style strategy.

Calls C++ function: void QTextCharFormat::setFontStyleStrategy(QFont::StyleStrategy strategy).

C++ documentation:

Sets the font style strategy.

This function was introduced in Qt 4.5.

See also fontStyleStrategy(), setFont(), and QFont::setStyleStrategy().

source

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).

C++ documentation:

If underline is true, sets the text format’s font to be underlined; otherwise it is displayed non-underlined.

See also fontUnderline() and setFont().

source

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).

C++ documentation:

Sets the text format’s font weight to weight.

See also fontWeight(), setFont(), and QFont::Weight.

source

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).

C++ documentation:

Sets the word spacing of this format to the given spacing, in pixels.

This function was introduced in Qt 4.4.

See also fontWordSpacing().

source

pub unsafe fn set_table_cell_column_span(&self, table_cell_column_span: c_int)

Calls C++ function: void QTextCharFormat::setTableCellColumnSpan(int tableCellColumnSpan).

source

pub unsafe fn set_table_cell_row_span(&self, table_cell_row_span: c_int)

Calls C++ function: void QTextCharFormat::setTableCellRowSpan(int tableCellRowSpan).

source

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).

C++ documentation:

Sets the pen used to draw the outlines of characters to the given pen.

See also textOutline().

source

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).

C++ documentation:

Sets the tool tip for a fragment of text to the given text.

This function was introduced in Qt 4.3.

See also toolTip().

source

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).

C++ documentation:

Sets the underline color used for the characters with this format to the color specified.

See also underlineColor().

source

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).

C++ documentation:

Sets the style of underlining the text to style.

This function was introduced in Qt 4.2.

See also underlineStyle().

source

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).

C++ documentation:

Sets the vertical alignment used for the characters with this format to the alignment specified.

See also verticalAlignment().

source

pub unsafe fn table_cell_column_span(&self) -> c_int

Calls C++ function: int QTextCharFormat::tableCellColumnSpan() const.

source

pub unsafe fn table_cell_row_span(&self) -> c_int

Calls C++ function: int QTextCharFormat::tableCellRowSpan() const.

source

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.

C++ documentation:

Returns the pen used to draw the outlines of characters in this format.

See also setTextOutline().

source

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.

C++ documentation:

Returns the tool tip that is displayed for a fragment of text.

This function was introduced in Qt 4.3.

See also setToolTip().

source

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.

C++ documentation:

Returns the color used to underline the characters with this format.

See also setUnderlineColor().

source

pub unsafe fn underline_style(&self) -> UnderlineStyle

Returns the style of underlining the text.

Calls C++ function: QTextCharFormat::UnderlineStyle QTextCharFormat::underlineStyle() const.

C++ documentation:

Returns the style of underlining the text.

This function was introduced in Qt 4.2.

See also setUnderlineStyle().

source

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.

C++ documentation:

Returns the vertical alignment used for characters with this format.

See also setVerticalAlignment().

Methods from Deref<Target = QTextFormat>§

source

pub unsafe fn background(&self) -> CppBox<QBrush>

Returns the brush used to paint the document's background.

Calls C++ function: QBrush QTextFormat::background() const.

C++ documentation:

Returns the brush used to paint the document’s background.

See also setBackground(), clearBackground(), and foreground().

source

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.

C++ documentation:

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.

source

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.

C++ documentation:

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.

source

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().

C++ documentation:

Clears the brush used to paint the document’s background. The default brush will be used.

See also background(), setBackground(), and clearForeground().

source

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().

C++ documentation:

Clears the brush used to paint the document’s foreground. The default brush will be used.

See also foreground(), setForeground(), and clearBackground().

source

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).

C++ documentation:

Clears the value of the property given by propertyId

See also Property.

source

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.

C++ documentation:

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.

source

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).

C++ documentation:

Assigns the other text format to this text format, and returns a reference to this text format.

source

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.

C++ documentation:

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.

source

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.

C++ documentation:

Returns the brush used to render foreground details, such as text, frame outlines, and table borders.

See also setForeground(), clearForeground(), and background().

source

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.

C++ documentation:

Returns true if the text format has a property with the given propertyId; otherwise returns false.

See also properties() and Property.

source

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.

C++ documentation:

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.

source

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.

C++ documentation:

Returns true if this text format is a BlockFormat; otherwise returns false.

source

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.

C++ documentation:

Returns true if this text format is a CharFormat; otherwise returns false.

source

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.

C++ documentation:

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().

source

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.

C++ documentation:

Returns true if this text format is a FrameFormat; otherwise returns false.

source

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.

C++ documentation:

Returns true if this text format is an image format; otherwise returns false.

source

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.

C++ documentation:

Returns true if this text format is a ListFormat; otherwise returns false.

source

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.

C++ documentation:

Returns true if this text format is a TableCellFormat; otherwise returns false.

This function was introduced in Qt 4.4.

source

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.

C++ documentation:

Returns true if this text format is a TableFormat; otherwise returns false.

source

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.

C++ documentation:

Returns true if the format is valid (i.e. is not InvalidFormat); otherwise returns false.

source

pub unsafe fn layout_direction(&self) -> LayoutDirection

Returns the document's layout direction.

Calls C++ function: Qt::LayoutDirection QTextFormat::layoutDirection() const.

C++ documentation:

Returns the document’s layout direction.

See also setLayoutDirection().

source

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.

C++ documentation:

Returns the value of the property given by propertyId.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthVectorProperty(), and Property.

source

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.

C++ documentation:

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.

source

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).

C++ documentation:

Merges the other format with this format; where there are conflicts the other format takes precedence.

source

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.

C++ documentation:

Returns the index of the format object, or -1 if the format object is invalid.

See also setObjectIndex().

source

pub unsafe fn object_type(&self) -> c_int

Returns the text format's object type.

Calls C++ function: int QTextFormat::objectType() const.

C++ documentation:

Returns the text format’s object type.

See also ObjectTypes and setObjectType().

source

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.

C++ documentation:

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.

source

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.

C++ documentation:

Returns a map with all properties of this text format.

source

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.

C++ documentation:

Returns the property specified by the given propertyId.

See also setProperty() and Property.

source

pub unsafe fn property_count(&self) -> c_int

Returns the number of properties stored in the format.

Calls C++ function: int QTextFormat::propertyCount() const.

C++ documentation:

Returns the number of properties stored in the format.

This function was introduced in Qt 4.3.

source

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).

C++ documentation:

Sets the brush use to paint the document’s background to the brush specified.

See also background(), clearBackground(), and setForeground().

source

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).

C++ documentation:

Sets the foreground brush to the specified brush. The foreground brush is mostly used to render text.

See also foreground(), clearForeground(), and setBackground().

source

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).

C++ documentation:

Sets the document’s layout direction to the specified direction.

See also layoutDirection().

source

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).

C++ documentation:

Sets the format object’s object index.

See also objectIndex().

source

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).

C++ documentation:

Sets the text format’s object type to type.

See also ObjectTypes and objectType().

source

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).

C++ documentation:

Sets the property specified by the propertyId to the given value.

See also property() and Property.

source

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).

C++ documentation:

Sets the value of the property given by propertyId to value.

See also lengthVectorProperty() and Property.

source

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.

C++ documentation:

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.

source

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).

C++ documentation:

Swaps this text format with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

source

pub unsafe fn to_block_format(&self) -> CppBox<QTextBlockFormat>

Returns this format as a block format.

Calls C++ function: QTextBlockFormat QTextFormat::toBlockFormat() const.

C++ documentation:

Returns this format as a block format.

source

pub unsafe fn to_char_format(&self) -> CppBox<QTextCharFormat>

Returns this format as a character format.

Calls C++ function: QTextCharFormat QTextFormat::toCharFormat() const.

C++ documentation:

Returns this format as a character format.

source

pub unsafe fn to_frame_format(&self) -> CppBox<QTextFrameFormat>

Returns this format as a frame format.

Calls C++ function: QTextFrameFormat QTextFormat::toFrameFormat() const.

C++ documentation:

Returns this format as a frame format.

source

pub unsafe fn to_image_format(&self) -> CppBox<QTextImageFormat>

Returns this format as an image format.

Calls C++ function: QTextImageFormat QTextFormat::toImageFormat() const.

C++ documentation:

Returns this format as an image format.

source

pub unsafe fn to_list_format(&self) -> CppBox<QTextListFormat>

Returns this format as a list format.

Calls C++ function: QTextListFormat QTextFormat::toListFormat() const.

C++ documentation:

Returns this format as a list format.

source

pub unsafe fn to_q_variant(&self) -> CppBox<QVariant>

Returns the text format as a QVariant

Calls C++ function: QVariant QTextFormat::operator QVariant() const.

C++ documentation:

Returns the text format as a QVariant

source

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.

C++ documentation:

Returns this format as a table cell format.

This function was introduced in Qt 4.4.

source

pub unsafe fn to_table_format(&self) -> CppBox<QTextTableFormat>

Returns this format as a table format.

Calls C++ function: QTextTableFormat QTextFormat::toTableFormat() const.

C++ documentation:

Returns this format as a table format.

source

pub unsafe fn type_(&self) -> c_int

Returns the type of this format.

Calls C++ function: int QTextFormat::type() const.

C++ documentation:

Returns the type of this format.

See also FormatType.

Trait Implementations§

source§

impl CppDeletable for QTextTableCellFormat

source§

unsafe fn delete(&self)

The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument.

Calls C++ function: [destructor] void QTextTableCellFormat::~QTextTableCellFormat().

C++ documentation:

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

source§

fn deref(&self) -> &QTextCharFormat

Calls C++ function: QTextCharFormat* static_cast<QTextCharFormat*>(QTextTableCellFormat* ptr).

§

type Target = QTextCharFormat

The resulting type after dereferencing.
source§

impl StaticDowncast<QTextTableCellFormat> for QTextCharFormat

source§

unsafe fn static_downcast( ptr: Ptr<QTextCharFormat> ) -> Ptr<QTextTableCellFormat>

Calls C++ function: QTextTableCellFormat* static_cast<QTextTableCellFormat*>(QTextCharFormat* ptr).

source§

impl StaticDowncast<QTextTableCellFormat> for QTextFormat

source§

unsafe fn static_downcast(ptr: Ptr<QTextFormat>) -> Ptr<QTextTableCellFormat>

Calls C++ function: QTextTableCellFormat* static_cast<QTextTableCellFormat*>(QTextFormat* ptr).

source§

impl StaticUpcast<QTextCharFormat> for QTextTableCellFormat

source§

unsafe fn static_upcast(ptr: Ptr<QTextTableCellFormat>) -> Ptr<QTextCharFormat>

Calls C++ function: QTextCharFormat* static_cast<QTextCharFormat*>(QTextTableCellFormat* ptr).

source§

impl StaticUpcast<QTextFormat> for QTextTableCellFormat

source§

unsafe fn static_upcast(ptr: Ptr<QTextTableCellFormat>) -> Ptr<QTextFormat>

Calls C++ function: QTextFormat* static_cast<QTextFormat*>(QTextTableCellFormat* ptr).

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.