#[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
.
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
impl QStyleOptionHeader
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionHeader>>,
) -> Ref<QStyleOptionHeader>
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)
.
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.
Sourcepub unsafe fn icon_alignment(&self) -> QFlags<AlignmentFlag>
pub unsafe fn icon_alignment(&self) -> QFlags<AlignmentFlag>
Returns a reference to the iconAlignment
field.
Sourcepub unsafe fn new() -> CppBox<QStyleOptionHeader>
pub unsafe fn new() -> CppBox<QStyleOptionHeader>
Constructs a QStyleOptionHeader, initializing the members variables to their default values.
Calls C++ function: [constructor] void QStyleOptionHeader::QStyleOptionHeader()
.
Constructs a QStyleOptionHeader, initializing the members variables to their default values.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionHeader>>,
) -> CppBox<QStyleOptionHeader>
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)
.
Constructs a copy of the other style option.
Sourcepub unsafe fn orientation(&self) -> Orientation
pub unsafe fn orientation(&self) -> Orientation
Returns the value of the orientation
field.
Sourcepub unsafe fn position(&self) -> SectionPosition
pub unsafe fn position(&self) -> SectionPosition
Returns the value of the position
field.
Sourcepub unsafe fn selected_position(&self) -> SelectedPosition
pub unsafe fn selected_position(&self) -> SelectedPosition
Returns the value of the selectedPosition
field.
Sourcepub unsafe fn set_icon(&self, value: impl CastInto<Ref<QIcon>>)
pub unsafe fn set_icon(&self, value: impl CastInto<Ref<QIcon>>)
Sets the value of the icon
field.
Sourcepub unsafe fn set_icon_alignment(&self, value: QFlags<AlignmentFlag>)
pub unsafe fn set_icon_alignment(&self, value: QFlags<AlignmentFlag>)
Sets the value of the iconAlignment
field.
Sourcepub unsafe fn set_orientation(&self, value: Orientation)
pub unsafe fn set_orientation(&self, value: Orientation)
Sets the value of the orientation
field.
Sourcepub unsafe fn set_position(&self, value: SectionPosition)
pub unsafe fn set_position(&self, value: SectionPosition)
Sets the value of the position
field.
Sourcepub unsafe fn set_section(&self, value: c_int)
pub unsafe fn set_section(&self, value: c_int)
Sets the value of the section
field.
Sourcepub unsafe fn set_selected_position(&self, value: SelectedPosition)
pub unsafe fn set_selected_position(&self, value: SelectedPosition)
Sets the value of the selectedPosition
field.
Sourcepub unsafe fn set_sort_indicator(&self, value: SortIndicator)
pub unsafe fn set_sort_indicator(&self, value: SortIndicator)
Sets the value of the sortIndicator
field.
Sourcepub unsafe fn set_text(&self, value: impl CastInto<Ref<QString>>)
pub unsafe fn set_text(&self, value: impl CastInto<Ref<QString>>)
Sets the value of the text
field.
Sourcepub unsafe fn set_text_alignment(&self, value: QFlags<AlignmentFlag>)
pub unsafe fn set_text_alignment(&self, value: QFlags<AlignmentFlag>)
Sets the value of the textAlignment
field.
Sourcepub unsafe fn sort_indicator(&self) -> SortIndicator
pub unsafe fn sort_indicator(&self) -> SortIndicator
Returns the value of the sortIndicator
field.
Sourcepub unsafe fn text_alignment(&self) -> QFlags<AlignmentFlag>
pub unsafe fn text_alignment(&self) -> QFlags<AlignmentFlag>
Returns a reference to the textAlignment
field.
Methods from Deref<Target = QStyleOption>§
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOption>>,
) -> Ref<QStyleOption>
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)
.
Assign other to this QStyleOption.
Sourcepub unsafe fn direction(&self) -> LayoutDirection
pub unsafe fn direction(&self) -> LayoutDirection
Returns the value of the direction
field.
Sourcepub unsafe fn font_metrics(&self) -> Ref<QFontMetrics>
pub unsafe fn font_metrics(&self) -> Ref<QFontMetrics>
Returns a reference to the fontMetrics
field.
Sourcepub unsafe fn font_metrics_mut(&self) -> Ref<QFontMetrics>
pub unsafe fn font_metrics_mut(&self) -> Ref<QFontMetrics>
Returns a mutable reference to the fontMetrics
field.
Sourcepub unsafe fn init(&self, w: impl CastInto<Ptr<QWidget>>)
pub unsafe fn init(&self, w: impl CastInto<Ptr<QWidget>>)
Sourcepub unsafe fn init_from(&self, w: impl CastInto<Ptr<QWidget>>)
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)
.
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().
Sourcepub unsafe fn palette_mut(&self) -> Ref<QPalette>
pub unsafe fn palette_mut(&self) -> Ref<QPalette>
Returns a mutable reference to the palette
field.
Sourcepub unsafe fn set_direction(&self, value: LayoutDirection)
pub unsafe fn set_direction(&self, value: LayoutDirection)
Sets the value of the direction
field.
Sourcepub unsafe fn set_font_metrics(&self, value: impl CastInto<Ref<QFontMetrics>>)
pub unsafe fn set_font_metrics(&self, value: impl CastInto<Ref<QFontMetrics>>)
Sets the value of the fontMetrics
field.
Sourcepub unsafe fn set_palette(&self, value: impl CastInto<Ref<QPalette>>)
pub unsafe fn set_palette(&self, value: impl CastInto<Ref<QPalette>>)
Sets the value of the palette
field.
Sourcepub unsafe fn set_rect(&self, value: impl CastInto<Ref<QRect>>)
pub unsafe fn set_rect(&self, value: impl CastInto<Ref<QRect>>)
Sets the value of the rect
field.
Sourcepub unsafe fn set_style_object(&self, value: impl CastInto<Ptr<QObject>>)
pub unsafe fn set_style_object(&self, value: impl CastInto<Ptr<QObject>>)
Sets the value of the styleObject
field.
Sourcepub unsafe fn set_version(&self, value: c_int)
pub unsafe fn set_version(&self, value: c_int)
Sets the value of the version
field.
Sourcepub unsafe fn style_object(&self) -> QPtr<QObject>
pub unsafe fn style_object(&self) -> QPtr<QObject>
Returns the value of the styleObject
field.
Trait Implementations§
Source§impl CppDeletable for QStyleOptionHeader
impl CppDeletable for QStyleOptionHeader
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QStyleOptionHeader class is used to describe the parameters for drawing a header.
Calls C++ function: [destructor] void QStyleOptionHeader::~QStyleOptionHeader()
.
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
impl Deref for QStyleOptionHeader
Source§fn deref(&self) -> &QStyleOption
fn deref(&self) -> &QStyleOption
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionHeader* ptr)
.
Source§type Target = QStyleOption
type Target = QStyleOption
Source§impl StaticDowncast<QStyleOptionHeader> for QStyleOption
impl StaticDowncast<QStyleOptionHeader> for QStyleOption
Source§unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionHeader>
unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionHeader>
Calls C++ function: QStyleOptionHeader* static_cast<QStyleOptionHeader*>(QStyleOption* ptr)
.
Source§impl StaticUpcast<QStyleOption> for QStyleOptionHeader
impl StaticUpcast<QStyleOption> for QStyleOptionHeader
Source§unsafe fn static_upcast(ptr: Ptr<QStyleOptionHeader>) -> Ptr<QStyleOption>
unsafe fn static_upcast(ptr: Ptr<QStyleOptionHeader>) -> Ptr<QStyleOption>
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionHeader* ptr)
.