[−][src]Struct qt_gui::QTextOption
The QTextOption class provides a description of general rich text properties.
C++ class: QTextOption
.
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
.
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]
&mut self,
o: impl CastInto<Ref<QTextOption>>
) -> MutRef<QTextOption>
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)
.
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
.
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()
.
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)
.
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]
o: impl CastInto<Ref<QTextOption>>
) -> CppBox<QTextOption>
Construct a copy of the other text option.
Calls C++ function: [constructor] void QTextOption::QTextOption(const QTextOption& o)
.
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)
.
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)
.
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]
&mut self,
tab_stops: impl CastInto<Ref<QListOfDouble>>
)
Sets the tab positions for the text layout to those specified by tabStops.
Calls C++ function: void QTextOption::setTabArray(const QList<double>& tabStops)
.
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)
.
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)
.
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)
.
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)
.
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)
.
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
.
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
.
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
.
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
.
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
.
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
.
Returns the text wrap mode defined by the option.
See also setWrapMode().
Trait Implementations
impl CppDeletable for QTextOption
[src]
Auto Trait Implementations
impl Send for QTextOption
impl Unpin for QTextOption
impl Sync for QTextOption
impl UnwindSafe for QTextOption
impl RefUnwindSafe for QTextOption
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,