[][src]Struct qt_gui::QTextImageFormat

#[repr(C)]pub struct QTextImageFormat { /* fields omitted */ }

The QTextImageFormat class provides formatting information for images in a QTextDocument.

C++ class: QTextImageFormat.

C++ documentation:

The QTextImageFormat class provides formatting information for images in a QTextDocument.

Inline images are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER) which has an associated QTextImageFormat. The image format specifies a name with setName() that is used to locate the image. The size of the rectangle that the image will occupy is specified using setWidth() and setHeight().

Images can be supplied in any format for which Qt has an image reader, so SVG drawings can be included alongside PNG, TIFF and other bitmap formats.

Methods

impl QTextImageFormat[src]

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QTextImageFormat>>
) -> Ref<QTextImageFormat>
[src]

The QTextImageFormat class provides formatting information for images in a QTextDocument.

Calls C++ function: QTextImageFormat& QTextImageFormat::operator=(const QTextImageFormat& other).

C++ documentation:

The QTextImageFormat class provides formatting information for images in a QTextDocument.

Inline images are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER) which has an associated QTextImageFormat. The image format specifies a name with setName() that is used to locate the image. The size of the rectangle that the image will occupy is specified using setWidth() and setHeight().

Images can be supplied in any format for which Qt has an image reader, so SVG drawings can be included alongside PNG, TIFF and other bitmap formats.

pub unsafe fn height(&self) -> c_double[src]

Returns the height of the rectangle occupied by the image.

Calls C++ function: double QTextImageFormat::height() const.

C++ documentation:

Returns the height of the rectangle occupied by the image.

See also width() and setHeight().

pub unsafe fn is_valid(&self) -> bool[src]

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

Calls C++ function: bool QTextImageFormat::isValid() const.

C++ documentation:

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

pub unsafe fn name(&self) -> CppBox<QString>[src]

Returns the name of the image. The name refers to an entry in the application's resources file.

Calls C++ function: QString QTextImageFormat::name() const.

C++ documentation:

Returns the name of the image. The name refers to an entry in the application's resources file.

See also setName().

pub unsafe fn new() -> CppBox<QTextImageFormat>[src]

Creates a new image format object.

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

C++ documentation:

Creates a new image format object.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QTextImageFormat>>
) -> CppBox<QTextImageFormat>
[src]

The QTextImageFormat class provides formatting information for images in a QTextDocument.

Calls C++ function: [constructor] void QTextImageFormat::QTextImageFormat(const QTextImageFormat& other).

C++ documentation:

The QTextImageFormat class provides formatting information for images in a QTextDocument.

Inline images are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER) which has an associated QTextImageFormat. The image format specifies a name with setName() that is used to locate the image. The size of the rectangle that the image will occupy is specified using setWidth() and setHeight().

Images can be supplied in any format for which Qt has an image reader, so SVG drawings can be included alongside PNG, TIFF and other bitmap formats.

pub unsafe fn quality(&self) -> c_int[src]

This is supported on cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns the value set by setQuality().

Calls C++ function: int QTextImageFormat::quality() const.

C++ documentation:

Returns the value set by setQuality().

This function was introduced in Qt 5.12.

See also setQuality().

pub unsafe fn set_height(&self, height: c_double)[src]

Sets the height of the rectangle occupied by the image.

Calls C++ function: void QTextImageFormat::setHeight(double height).

C++ documentation:

Sets the height of the rectangle occupied by the image.

See also height() and setWidth().

pub unsafe fn set_name(&self, name: impl CastInto<Ref<QString>>)[src]

Sets the name of the image. The name is used to locate the image in the application's resources.

Calls C++ function: void QTextImageFormat::setName(const QString& name).

C++ documentation:

Sets the name of the image. The name is used to locate the image in the application's resources.

See also name().

pub unsafe fn set_quality_1a(&self, quality: c_int)[src]

This is supported on cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Sets the quality that should be used by exporters when exporting the image. QTextDocumentWriter will export jpg images with the quality set here when exporting to ODF files if quality is set to a value between 0 and 100. Or it will export png images if quality is set to 100 (default) or greater.

Calls C++ function: void QTextImageFormat::setQuality(int quality = …).

C++ documentation:

Sets the quality that should be used by exporters when exporting the image. QTextDocumentWriter will export jpg images with the quality set here when exporting to ODF files if quality is set to a value between 0 and 100. Or it will export png images if quality is set to 100 (default) or greater.

This function was introduced in Qt 5.12.

See also quality().

pub unsafe fn set_quality_0a(&self)[src]

This is supported on cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Sets the quality that should be used by exporters when exporting the image. QTextDocumentWriter will export jpg images with the quality set here when exporting to ODF files if quality is set to a value between 0 and 100. Or it will export png images if quality is set to 100 (default) or greater.

Calls C++ function: void QTextImageFormat::setQuality().

C++ documentation:

Sets the quality that should be used by exporters when exporting the image. QTextDocumentWriter will export jpg images with the quality set here when exporting to ODF files if quality is set to a value between 0 and 100. Or it will export png images if quality is set to 100 (default) or greater.

This function was introduced in Qt 5.12.

See also quality().

pub unsafe fn set_width(&self, width: c_double)[src]

Sets the width of the rectangle occupied by the image.

Calls C++ function: void QTextImageFormat::setWidth(double width).

C++ documentation:

Sets the width of the rectangle occupied by the image.

See also width() and setHeight().

pub unsafe fn width(&self) -> c_double[src]

Returns the width of the rectangle occupied by the image.

Calls C++ function: double QTextImageFormat::width() const.

C++ documentation:

Returns the width of the rectangle occupied by the image.

See also height() and setWidth().

Methods from Deref<Target = QTextCharFormat>

pub unsafe fn anchor_href(&self) -> CppBox<QString>[src]

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

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

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

pub unsafe fn anchor_names(&self) -> CppBox<QStringList>[src]

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

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QTextCharFormat>>
) -> Ref<QTextCharFormat>
[src]

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.

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

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

pub unsafe fn font_capitalization(&self) -> Capitalization[src]

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

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

This is supported 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().

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

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

pub unsafe fn font_fixed_pitch(&self) -> bool[src]

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

pub unsafe fn font_hinting_preference(&self) -> HintingPreference[src]

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

pub unsafe fn font_italic(&self) -> bool[src]

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

pub unsafe fn font_kerning(&self) -> bool[src]

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

pub unsafe fn font_letter_spacing(&self) -> c_double[src]

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

pub unsafe fn font_letter_spacing_type(&self) -> SpacingType[src]

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

pub unsafe fn font_overline(&self) -> bool[src]

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

pub unsafe fn font_point_size(&self) -> c_double[src]

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

pub unsafe fn font_stretch(&self) -> c_int[src]

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

pub unsafe fn font_strike_out(&self) -> bool[src]

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

pub unsafe fn font_style_hint(&self) -> StyleHint[src]

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

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

This is supported 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().

pub unsafe fn font_style_strategy(&self) -> StyleStrategy[src]

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

pub unsafe fn font_underline(&self) -> bool[src]

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

pub unsafe fn font_weight(&self) -> c_int[src]

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.

pub unsafe fn font_word_spacing(&self) -> c_double[src]

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

pub unsafe fn is_anchor(&self) -> bool[src]

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

pub unsafe fn is_valid(&self) -> bool[src]

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.

pub unsafe fn set_anchor(&self, anchor: bool)[src]

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

pub unsafe fn set_anchor_href(&self, value: impl CastInto<Ref<QString>>)[src]

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

pub unsafe fn set_anchor_name(&self, name: impl CastInto<Ref<QString>>)[src]

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

pub unsafe fn set_anchor_names(&self, names: impl CastInto<Ref<QStringList>>)[src]

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

pub unsafe fn set_font_2a(
    &self,
    font: impl CastInto<Ref<QFont>>,
    behavior: FontPropertiesInheritanceBehavior
)
[src]

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

pub unsafe fn set_font_1a(&self, font: impl CastInto<Ref<QFont>>)[src]

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

pub unsafe fn set_font_capitalization(&self, capitalization: Capitalization)[src]

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

pub unsafe fn set_font_families(
    &self,
    families: impl CastInto<Ref<QStringList>>
)
[src]

This is supported 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().

pub unsafe fn set_font_family(&self, family: impl CastInto<Ref<QString>>)[src]

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

pub unsafe fn set_font_fixed_pitch(&self, fixed_pitch: bool)[src]

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

pub unsafe fn set_font_hinting_preference(
    &self,
    hinting_preference: HintingPreference
)
[src]

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

pub unsafe fn set_font_italic(&self, italic: bool)[src]

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

pub unsafe fn set_font_kerning(&self, enable: bool)[src]

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

pub unsafe fn set_font_letter_spacing(&self, spacing: c_double)[src]

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

pub unsafe fn set_font_letter_spacing_type(
    &self,
    letter_spacing_type: SpacingType
)
[src]

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

pub unsafe fn set_font_overline(&self, overline: bool)[src]

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

pub unsafe fn set_font_point_size(&self, size: c_double)[src]

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

pub unsafe fn set_font_stretch(&self, factor: c_int)[src]

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

pub unsafe fn set_font_strike_out(&self, strike_out: bool)[src]

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

pub unsafe fn set_font_style_hint_2a(
    &self,
    hint: StyleHint,
    strategy: StyleStrategy
)
[src]

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

pub unsafe fn set_font_style_hint_1a(&self, hint: StyleHint)[src]

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

pub unsafe fn set_font_style_name(
    &self,
    style_name: impl CastInto<Ref<QString>>
)
[src]

This is supported 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().

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

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

pub unsafe fn set_font_underline(&self, underline: bool)[src]

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

pub unsafe fn set_font_weight(&self, weight: c_int)[src]

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.

pub unsafe fn set_font_word_spacing(&self, spacing: c_double)[src]

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

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

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

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

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

pub unsafe fn set_text_outline(&self, pen: impl CastInto<Ref<QPen>>)[src]

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

pub unsafe fn set_tool_tip(&self, tip: impl CastInto<Ref<QString>>)[src]

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

pub unsafe fn set_underline_color(&self, color: impl CastInto<Ref<QColor>>)[src]

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

pub unsafe fn set_underline_style(&self, style: UnderlineStyle)[src]

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

pub unsafe fn set_vertical_alignment(&self, alignment: VerticalAlignment)[src]

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

pub unsafe fn table_cell_column_span(&self) -> c_int[src]

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

pub unsafe fn table_cell_row_span(&self) -> c_int[src]

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

pub unsafe fn text_outline(&self) -> CppBox<QPen>[src]

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

pub unsafe fn tool_tip(&self) -> CppBox<QString>[src]

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

pub unsafe fn underline_color(&self) -> CppBox<QColor>[src]

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

pub unsafe fn underline_style(&self) -> UnderlineStyle[src]

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

pub unsafe fn vertical_alignment(&self) -> VerticalAlignment[src]

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

Trait Implementations

impl CppDeletable for QTextImageFormat[src]

unsafe fn delete(&self)[src]

The QTextImageFormat class provides formatting information for images in a QTextDocument.

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

C++ documentation:

The QTextImageFormat class provides formatting information for images in a QTextDocument.

Inline images are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER) which has an associated QTextImageFormat. The image format specifies a name with setName() that is used to locate the image. The size of the rectangle that the image will occupy is specified using setWidth() and setHeight().

Images can be supplied in any format for which Qt has an image reader, so SVG drawings can be included alongside PNG, TIFF and other bitmap formats.

impl Deref for QTextImageFormat[src]

type Target = QTextCharFormat

The resulting type after dereferencing.

fn deref(&self) -> &QTextCharFormat[src]

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

impl StaticDowncast<QTextImageFormat> for QTextCharFormat[src]

unsafe fn static_downcast(ptr: Ptr<QTextCharFormat>) -> Ptr<QTextImageFormat>[src]

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

impl StaticDowncast<QTextImageFormat> for QTextFormat[src]

unsafe fn static_downcast(ptr: Ptr<QTextFormat>) -> Ptr<QTextImageFormat>[src]

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

impl StaticUpcast<QTextCharFormat> for QTextImageFormat[src]

unsafe fn static_upcast(ptr: Ptr<QTextImageFormat>) -> Ptr<QTextCharFormat>[src]

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

impl StaticUpcast<QTextFormat> for QTextImageFormat[src]

unsafe fn static_upcast(ptr: Ptr<QTextImageFormat>) -> Ptr<QTextFormat>[src]

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.