Struct QStyleOptionHeader

Source
#[repr(C)]
pub struct QStyleOptionHeader { /* private fields */ }
Expand description

The QStyleOptionHeader class is used to describe the parameters for drawing a header.

C++ class: QStyleOptionHeader.

C++ documentation:

The QStyleOptionHeader class is used to describe the parameters for drawing a header.

QStyleOptionHeader contains all the information that QStyle functions need to draw the item views' header pane, header sort arrow, and header label.

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.

Implementations§

Source§

impl QStyleOptionHeader

Source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QStyleOptionHeader>>, ) -> Ref<QStyleOptionHeader>

The QStyleOptionHeader class is used to describe the parameters for drawing a header.

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

C++ documentation:

The QStyleOptionHeader class is used to describe the parameters for drawing a header.

QStyleOptionHeader contains all the information that QStyle functions need to draw the item views' header pane, header sort arrow, and header label.

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.

Source

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

Returns a reference to the icon field.

Source

pub unsafe fn icon_alignment(&self) -> QFlags<AlignmentFlag>

Returns a reference to the iconAlignment field.

Source

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

Returns a mutable reference to the icon field.

Source

pub unsafe fn new() -> CppBox<QStyleOptionHeader>

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

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

C++ documentation:

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

Source

pub unsafe fn new_copy( other: impl CastInto<Ref<QStyleOptionHeader>>, ) -> CppBox<QStyleOptionHeader>

Constructs a copy of the other style option.

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

C++ documentation:

Constructs a copy of the other style option.

Source

pub unsafe fn orientation(&self) -> Orientation

Returns the value of the orientation field.

Source

pub unsafe fn position(&self) -> SectionPosition

Returns the value of the position field.

Source

pub unsafe fn section(&self) -> c_int

Returns the value of the section field.

Source

pub unsafe fn selected_position(&self) -> SelectedPosition

Returns the value of the selectedPosition field.

Source

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

Sets the value of the icon field.

Source

pub unsafe fn set_icon_alignment(&self, value: QFlags<AlignmentFlag>)

Sets the value of the iconAlignment field.

Source

pub unsafe fn set_orientation(&self, value: Orientation)

Sets the value of the orientation field.

Source

pub unsafe fn set_position(&self, value: SectionPosition)

Sets the value of the position field.

Source

pub unsafe fn set_section(&self, value: c_int)

Sets the value of the section field.

Source

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

Sets the value of the selectedPosition field.

Source

pub unsafe fn set_sort_indicator(&self, value: SortIndicator)

Sets the value of the sortIndicator field.

Source

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

Sets the value of the text field.

Source

pub unsafe fn set_text_alignment(&self, value: QFlags<AlignmentFlag>)

Sets the value of the textAlignment field.

Source

pub unsafe fn sort_indicator(&self) -> SortIndicator

Returns the value of the sortIndicator field.

Source

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

Returns a reference to the text field.

Source

pub unsafe fn text_alignment(&self) -> QFlags<AlignmentFlag>

Returns a reference to the textAlignment field.

Source

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

Returns a mutable reference to the text field.

Methods from Deref<Target = QStyleOption>§

Source

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

Assign other to this QStyleOption.

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

C++ documentation:

Assign other to this QStyleOption.

Source

pub unsafe fn direction(&self) -> LayoutDirection

Returns the value of the direction field.

Source

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

Returns a reference to the fontMetrics field.

Source

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

Returns a mutable reference to the fontMetrics field.

Source

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

Use initFrom(widget) instead.

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

C++ documentation:

Use initFrom(widget) instead.

Source

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

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

Source

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

Returns a reference to the palette field.

Source

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

Returns a mutable reference to the palette field.

Source

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

Returns a reference to the rect field.

Source

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

Returns a mutable reference to the rect field.

Source

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

Sets the value of the direction field.

Source

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

Sets the value of the fontMetrics field.

Source

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

Sets the value of the palette field.

Source

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

Sets the value of the rect field.

Source

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

Sets the value of the state field.

Source

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

Sets the value of the styleObject field.

Source

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

Sets the value of the type field.

Source

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

Sets the value of the version field.

Source

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

Returns a reference to the state field.

Source

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

Returns the value of the styleObject field.

Source

pub unsafe fn type_(&self) -> c_int

Returns the value of the type field.

Source

pub unsafe fn version(&self) -> c_int

Returns the value of the version field.

Trait Implementations§

Source§

impl CppDeletable for QStyleOptionHeader

Source§

unsafe fn delete(&self)

The QStyleOptionHeader class is used to describe the parameters for drawing a header.

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

C++ documentation:

The QStyleOptionHeader class is used to describe the parameters for drawing a header.

QStyleOptionHeader contains all the information that QStyle functions need to draw the item views' header pane, header sort arrow, and header label.

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.

Source§

impl Deref for QStyleOptionHeader

Source§

fn deref(&self) -> &QStyleOption

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

Source§

type Target = QStyleOption

The resulting type after dereferencing.
Source§

impl StaticDowncast<QStyleOptionHeader> for QStyleOption

Source§

unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionHeader>

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

Source§

impl StaticUpcast<QStyleOption> for QStyleOptionHeader

Source§

unsafe fn static_upcast(ptr: Ptr<QStyleOptionHeader>) -> Ptr<QStyleOption>

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.