[][src]Struct qt_gui::QTextOption

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

The QTextOption class provides a description of general rich text properties.

C++ class: QTextOption.

C++ documentation:

The QTextOption class provides a description of general rich text properties.

QTextOption is used to encapsulate common rich text properties in a single object. It contains information about text alignment, layout direction, word wrapping, and other standard properties associated with text rendering and layout.

Methods

impl QTextOption[src]

pub unsafe fn alignment(&self) -> QFlags<AlignmentFlag>[src]

Returns the text alignment defined by the option.

Calls C++ function: QFlags<Qt::AlignmentFlag> QTextOption::alignment() const.

C++ documentation:

Returns the text alignment defined by the option.

See also setAlignment().

pub unsafe fn copy_from(
    &mut self,
    o: impl CastInto<Ref<QTextOption>>
) -> MutRef<QTextOption>
[src]

Returns true if the text option is the same as the other text option; otherwise returns false.

Calls C++ function: QTextOption& QTextOption::operator=(const QTextOption& o).

C++ documentation:

Returns true if the text option is the same as the other text option; otherwise returns false.

pub unsafe fn flags(&self) -> QFlags<Flag>[src]

Returns the flags associated with the option.

Calls C++ function: QFlags<QTextOption::Flag> QTextOption::flags() const.

C++ documentation:

Returns the flags associated with the option.

See also setFlags().

pub unsafe fn new_0a() -> CppBox<QTextOption>[src]

Constructs a text option with default properties for text. The text alignment property is set to Qt::AlignLeft. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false.

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

C++ documentation:

Constructs a text option with default properties for text. The text alignment property is set to Qt::AlignLeft. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false.

pub unsafe fn new_1a(alignment: QFlags<AlignmentFlag>) -> CppBox<QTextOption>[src]

Constructs a text option with the given alignment for text. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false.

Calls C++ function: [constructor] void QTextOption::QTextOption(QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

Constructs a text option with the given alignment for text. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false.

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

Construct a copy of the other text option.

Calls C++ function: [constructor] void QTextOption::QTextOption(const QTextOption& o).

C++ documentation:

Construct a copy of the other text option.

pub unsafe fn set_alignment(&mut self, alignment: QFlags<AlignmentFlag>)[src]

Sets the option's text alignment to the specified alignment.

Calls C++ function: void QTextOption::setAlignment(QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

Sets the option's text alignment to the specified alignment.

See also alignment().

pub unsafe fn set_flags(&mut self, flags: QFlags<Flag>)[src]

Sets the flags associated with the option to the given flags.

Calls C++ function: void QTextOption::setFlags(QFlags<QTextOption::Flag> flags).

C++ documentation:

Sets the flags associated with the option to the given flags.

See also flags().

pub unsafe fn set_tab_array(
    &mut self,
    tab_stops: impl CastInto<Ref<QListOfDouble>>
)
[src]

Sets the tab positions for the text layout to those specified by tabStops.

Calls C++ function: void QTextOption::setTabArray(const QList<double>& tabStops).

C++ documentation:

Sets the tab positions for the text layout to those specified by tabStops.

See also tabArray(), setTabStop(), and setTabs().

pub unsafe fn set_tab_stop(&mut self, tab_stop: c_double)[src]

Sets the default distance in device units between tab stops to the value specified by tabStop.

Calls C++ function: void QTextOption::setTabStop(double tabStop).

C++ documentation:

Sets the default distance in device units between tab stops to the value specified by tabStop.

See also tabStop(), setTabArray(), setTabs(), and tabs().

pub unsafe fn set_tabs(&mut self, tab_stops: impl CastInto<Ref<QListOfTab>>)[src]

Set the Tab properties to tabStops.

Calls C++ function: void QTextOption::setTabs(const QList<QTextOption::Tab>& tabStops).

C++ documentation:

Set the Tab properties to tabStops.

See also tabStop() and tabs().

pub unsafe fn set_text_direction(&mut self, a_direction: LayoutDirection)[src]

Sets the direction of the text layout defined by the option to the given direction.

Calls C++ function: void QTextOption::setTextDirection(Qt::LayoutDirection aDirection).

C++ documentation:

Sets the direction of the text layout defined by the option to the given direction.

See also textDirection().

pub unsafe fn set_use_design_metrics(&mut self, b: bool)[src]

If enable is true then the layout will use design metrics; otherwise it will use the metrics of the paint device (which is the default behavior).

Calls C++ function: void QTextOption::setUseDesignMetrics(bool b).

C++ documentation:

If enable is true then the layout will use design metrics; otherwise it will use the metrics of the paint device (which is the default behavior).

See also useDesignMetrics().

pub unsafe fn set_wrap_mode(&mut self, wrap: WrapMode)[src]

Sets the option's text wrap mode to the given mode.

Calls C++ function: void QTextOption::setWrapMode(QTextOption::WrapMode wrap).

C++ documentation:

Sets the option's text wrap mode to the given mode.

See also wrapMode().

pub unsafe fn tab_array(&self) -> CppBox<QListOfDouble>[src]

Returns a list of tab positions defined for the text layout.

Calls C++ function: QList<double> QTextOption::tabArray() const.

C++ documentation:

Returns a list of tab positions defined for the text layout.

See also setTabArray() and tabStop().

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

Returns the distance in device units between tab stops. Convenient function for the above method

Calls C++ function: double QTextOption::tabStop() const.

C++ documentation:

Returns the distance in device units between tab stops. Convenient function for the above method

See also setTabStop(), tabArray(), setTabs(), and tabs().

pub unsafe fn tabs(&self) -> CppBox<QListOfTab>[src]

Returns a list of tab positions defined for the text layout.

Calls C++ function: QList<QTextOption::Tab> QTextOption::tabs() const.

C++ documentation:

Returns a list of tab positions defined for the text layout.

This function was introduced in Qt 4.4.

See also tabStop(), setTabs(), and setTabStop().

pub unsafe fn text_direction(&self) -> LayoutDirection[src]

Returns the direction of the text layout defined by the option.

Calls C++ function: Qt::LayoutDirection QTextOption::textDirection() const.

C++ documentation:

Returns the direction of the text layout defined by the option.

See also setTextDirection().

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

Returns true if the layout uses design rather than device metrics; otherwise returns false.

Calls C++ function: bool QTextOption::useDesignMetrics() const.

C++ documentation:

Returns true if the layout uses design rather than device metrics; otherwise returns false.

See also setUseDesignMetrics().

pub unsafe fn wrap_mode(&self) -> WrapMode[src]

Returns the text wrap mode defined by the option.

Calls C++ function: QTextOption::WrapMode QTextOption::wrapMode() const.

C++ documentation:

Returns the text wrap mode defined by the option.

See also setWrapMode().

Trait Implementations

impl CppDeletable for QTextOption[src]

unsafe fn delete(&mut self)[src]

Destroys the text option.

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

C++ documentation:

Destroys the text option.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<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.

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

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

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

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

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