[][src]Struct qt_widgets::QStyleOptionTab

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

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

C++ class: QStyleOptionTab.

C++ documentation:

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

The QStyleOptionTab class is used for drawing several built-in Qt widgets including QTabBar and the panel for QTabWidget.

An instance of the QStyleOptionTab class has type SO_Tab and version 3. The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

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

Methods

impl QStyleOptionTab[src]

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

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

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

C++ documentation:

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

The QStyleOptionTab class is used for drawing several built-in Qt widgets including QTabBar and the panel for QTabWidget.

An instance of the QStyleOptionTab class has type SO_Tab and version 3. The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

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

pub unsafe fn corner_widgets(&self) -> QFlags<CornerWidget>[src]

Returns a reference to the cornerWidgets field.

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

Returns the value of the documentMode field.

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

Returns a reference to the features 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 left_button_size(&self) -> Ref<QSize>[src]

Returns a reference to the leftButtonSize field.

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

Returns a mutable reference to the leftButtonSize field.

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

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

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

C++ documentation:

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

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

Constructs a copy of the other style option.

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

C++ documentation:

Constructs a copy of the other style option.

pub unsafe fn position(&self) -> TabPosition[src]

Returns the value of the position field.

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

Returns a reference to the rightButtonSize field.

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

Returns a mutable reference to the rightButtonSize field.

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

Returns the value of the row field.

pub unsafe fn selected_position(&self) -> SelectedPosition[src]

Returns the value of the selectedPosition field.

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

Sets the value of the cornerWidgets field.

pub unsafe fn set_document_mode(&self, value: bool)[src]

Sets the value of the documentMode field.

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

Sets the value of the features 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_left_button_size(&self, value: impl CastInto<Ref<QSize>>)[src]

Sets the value of the leftButtonSize field.

pub unsafe fn set_position(&self, value: TabPosition)[src]

Sets the value of the position field.

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

Sets the value of the rightButtonSize field.

pub unsafe fn set_row(&self, value: c_int)[src]

Sets the value of the row field.

pub unsafe fn set_selected_position(&self, value: SelectedPosition)[src]

Sets the value of the selectedPosition field.

pub unsafe fn set_shape(&self, value: Shape)[src]

Sets the value of the shape field.

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

Sets the value of the text field.

pub unsafe fn shape(&self) -> Shape[src]

Returns the value of the shape 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.

Methods from Deref<Target = QStyleOption>

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

Assign other to this QStyleOption.

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

C++ documentation:

Assign other to this QStyleOption.

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

Returns the value of the direction field.

pub unsafe fn font_metrics(&self) -> Ref<QFontMetrics>[src]

Returns a reference to the fontMetrics field.

pub unsafe fn font_metrics_mut(&self) -> Ref<QFontMetrics>[src]

Returns a mutable reference to the fontMetrics field.

pub unsafe fn init(&self, w: impl CastInto<Ptr<QWidget>>)[src]

Use initFrom(widget) instead.

Calls C++ function: void QStyleOption::init(const QWidget* w).

C++ documentation:

Use initFrom(widget) instead.

pub unsafe fn init_from(&self, w: impl CastInto<Ptr<QWidget>>)[src]

Initializes the state, direction, rect, palette, fontMetrics and styleObject member variables based on the specified widget.

Calls C++ function: void QStyleOption::initFrom(const QWidget* w).

C++ documentation:

Initializes the state, direction, rect, palette, fontMetrics and styleObject member variables based on the specified widget.

This is a convenience function; the member variables can also be initialized manually.

This function was introduced in Qt 4.1.

See also QWidget::layoutDirection(), QWidget::rect(), QWidget::palette(), and QWidget::fontMetrics().

pub unsafe fn palette(&self) -> Ref<QPalette>[src]

Returns a reference to the palette field.

pub unsafe fn palette_mut(&self) -> Ref<QPalette>[src]

Returns a mutable reference to the palette field.

pub unsafe fn rect(&self) -> Ref<QRect>[src]

Returns a reference to the rect field.

pub unsafe fn rect_mut(&self) -> Ref<QRect>[src]

Returns a mutable reference to the rect field.

pub unsafe fn set_direction(&self, value: LayoutDirection)[src]

Sets the value of the direction field.

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

Sets the value of the fontMetrics field.

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

Sets the value of the palette field.

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

Sets the value of the rect field.

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

Sets the value of the state field.

pub unsafe fn set_style_object(&self, value: impl CastInto<Ptr<QObject>>)[src]

Sets the value of the styleObject field.

pub unsafe fn set_type(&self, value: c_int)[src]

Sets the value of the type field.

pub unsafe fn set_version(&self, value: c_int)[src]

Sets the value of the version field.

pub unsafe fn state(&self) -> QFlags<StateFlag>[src]

Returns a reference to the state field.

pub unsafe fn style_object(&self) -> QPtr<QObject>[src]

Returns the value of the styleObject field.

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

Returns the value of the type field.

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

Returns the value of the version field.

Trait Implementations

impl CppDeletable for QStyleOptionTab[src]

unsafe fn delete(&self)[src]

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

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

C++ documentation:

The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.

The QStyleOptionTab class is used for drawing several built-in Qt widgets including QTabBar and the panel for QTabWidget.

An instance of the QStyleOptionTab class has type SO_Tab and version 3. The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

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

impl Deref for QStyleOptionTab[src]

type Target = QStyleOption

The resulting type after dereferencing.

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

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

impl StaticDowncast<QStyleOptionTab> for QStyleOption[src]

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

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

impl StaticUpcast<QStyleOption> for QStyleOptionTab[src]

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

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