[][src]Struct qt_widgets::QStyleOptionToolButton

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

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

C++ class: QStyleOptionToolButton.

C++ documentation:

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

QStyleOptionToolButton contains all the information that QStyle functions need to draw QToolButton.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

For an example demonstrating how style options can be used, see the Styles example.

Methods

impl QStyleOptionToolButton[src]

pub unsafe fn arrow_type(&self) -> ArrowType[src]

Returns the value of the arrowType field.

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

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

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

C++ documentation:

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

QStyleOptionToolButton contains all the information that QStyle functions need to draw QToolButton.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

For an example demonstrating how style options can be used, see the Styles example.

pub unsafe fn features(&self) -> QFlags<ToolButtonFeature>[src]

Returns a reference to the features field.

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

Returns a reference to the font field.

pub unsafe fn font_mut(&self) -> Ref<QFont>[src]

Returns a mutable reference to the font field.

pub unsafe fn icon(&self) -> Ref<QIcon>[src]

Returns a reference to the icon field.

pub unsafe fn icon_mut(&self) -> Ref<QIcon>[src]

Returns a mutable reference to the icon field.

pub unsafe fn icon_size(&self) -> Ref<QSize>[src]

Returns a reference to the iconSize field.

pub unsafe fn icon_size_mut(&self) -> Ref<QSize>[src]

Returns a mutable reference to the iconSize field.

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

Constructs a QStyleOptionToolButton, initializing the members variables to their default values.

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

C++ documentation:

Constructs a QStyleOptionToolButton, initializing the members variables to their default values.

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

Constructs a copy of the other style option.

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

C++ documentation:

Constructs a copy of the other style option.

pub unsafe fn pos(&self) -> Ref<QPoint>[src]

Returns a reference to the pos field.

pub unsafe fn pos_mut(&self) -> Ref<QPoint>[src]

Returns a mutable reference to the pos field.

pub unsafe fn set_arrow_type(&self, value: ArrowType)[src]

Sets the value of the arrowType field.

pub unsafe fn set_features(&self, value: QFlags<ToolButtonFeature>)[src]

Sets the value of the features field.

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

Sets the value of the font field.

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

Sets the value of the icon field.

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

Sets the value of the iconSize field.

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

Sets the value of the pos field.

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

Sets the value of the text field.

pub unsafe fn set_tool_button_style(&self, value: ToolButtonStyle)[src]

Sets the value of the toolButtonStyle field.

pub unsafe fn text(&self) -> Ref<QString>[src]

Returns a reference to the text field.

pub unsafe fn text_mut(&self) -> Ref<QString>[src]

Returns a mutable reference to the text field.

pub unsafe fn tool_button_style(&self) -> ToolButtonStyle[src]

Returns the value of the toolButtonStyle field.

Methods from Deref<Target = QStyleOptionComplex>

pub unsafe fn active_sub_controls(&self) -> QFlags<SubControl>[src]

Returns a reference to the activeSubControls field.

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

The QStyleOptionComplex class is used to hold parameters that are common to all complex controls.

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

C++ documentation:

The QStyleOptionComplex class is used to hold parameters that are common to all complex controls.

This class is not used on its own. Instead it is used to derive other complex control options, for example QStyleOptionSlider and QStyleOptionSpinBox.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator).

For an example demonstrating how style options can be used, see the Styles example.

pub unsafe fn set_active_sub_controls(&self, value: QFlags<SubControl>)[src]

Sets the value of the activeSubControls field.

pub unsafe fn set_sub_controls(&self, value: QFlags<SubControl>)[src]

Sets the value of the subControls field.

pub unsafe fn sub_controls(&self) -> QFlags<SubControl>[src]

Returns a reference to the subControls field.

Trait Implementations

impl CppDeletable for QStyleOptionToolButton[src]

unsafe fn delete(&self)[src]

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

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

C++ documentation:

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

QStyleOptionToolButton contains all the information that QStyle functions need to draw QToolButton.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

For an example demonstrating how style options can be used, see the Styles example.

impl Deref for QStyleOptionToolButton[src]

type Target = QStyleOptionComplex

The resulting type after dereferencing.

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

Calls C++ function: QStyleOptionComplex* static_cast<QStyleOptionComplex*>(QStyleOptionToolButton* ptr).

impl StaticDowncast<QStyleOptionToolButton> for QStyleOptionComplex[src]

unsafe fn static_downcast(
    ptr: Ptr<QStyleOptionComplex>
) -> Ptr<QStyleOptionToolButton>
[src]

Calls C++ function: QStyleOptionToolButton* static_cast<QStyleOptionToolButton*>(QStyleOptionComplex* ptr).

impl StaticDowncast<QStyleOptionToolButton> for QStyleOption[src]

unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionToolButton>[src]

Calls C++ function: QStyleOptionToolButton* static_cast<QStyleOptionToolButton*>(QStyleOption* ptr).

impl StaticUpcast<QStyleOption> for QStyleOptionToolButton[src]

unsafe fn static_upcast(ptr: Ptr<QStyleOptionToolButton>) -> Ptr<QStyleOption>[src]

Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionToolButton* ptr).

impl StaticUpcast<QStyleOptionComplex> for QStyleOptionToolButton[src]

unsafe fn static_upcast(
    ptr: Ptr<QStyleOptionToolButton>
) -> Ptr<QStyleOptionComplex>
[src]

Calls C++ function: QStyleOptionComplex* static_cast<QStyleOptionComplex*>(QStyleOptionToolButton* 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.