[−][src]Struct qt_widgets::QStyleOptionHeader
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.
Methods
impl QStyleOptionHeader
[src]
pub unsafe fn copy_from(
&mut self,
other: impl CastInto<Ref<QStyleOptionHeader>>
) -> MutRef<QStyleOptionHeader>
[src]
&mut self,
other: impl CastInto<Ref<QStyleOptionHeader>>
) -> MutRef<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.
pub unsafe fn icon(&self) -> Ref<QIcon>
[src]
Returns a reference to the icon
field.
pub unsafe fn icon_alignment(&self) -> QFlags<AlignmentFlag>
[src]
Returns a reference to the iconAlignment
field.
pub unsafe fn icon_mut(&mut self) -> MutRef<QIcon>
[src]
Returns a mutable reference to the icon
field.
pub unsafe fn new() -> CppBox<QStyleOptionHeader>
[src]
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.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionHeader>>
) -> CppBox<QStyleOptionHeader>
[src]
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.
pub unsafe fn orientation(&self) -> Orientation
[src]
Returns the value of the orientation
field.
pub unsafe fn position(&self) -> SectionPosition
[src]
Returns the value of the position
field.
pub unsafe fn section(&self) -> c_int
[src]
Returns the value of the section
field.
pub unsafe fn selected_position(&self) -> SelectedPosition
[src]
Returns the value of the selectedPosition
field.
pub unsafe fn set_icon(&mut self, value: impl CastInto<Ref<QIcon>>)
[src]
Sets the value of the icon
field.
pub unsafe fn set_icon_alignment(&mut self, value: QFlags<AlignmentFlag>)
[src]
Sets the value of the iconAlignment
field.
pub unsafe fn set_orientation(&mut self, value: Orientation)
[src]
Sets the value of the orientation
field.
pub unsafe fn set_position(&mut self, value: SectionPosition)
[src]
Sets the value of the position
field.
pub unsafe fn set_section(&mut self, value: c_int)
[src]
Sets the value of the section
field.
pub unsafe fn set_selected_position(&mut self, value: SelectedPosition)
[src]
Sets the value of the selectedPosition
field.
pub unsafe fn set_sort_indicator(&mut self, value: SortIndicator)
[src]
Sets the value of the sortIndicator
field.
pub unsafe fn set_text(&mut self, value: impl CastInto<Ref<QString>>)
[src]
Sets the value of the text
field.
pub unsafe fn set_text_alignment(&mut self, value: QFlags<AlignmentFlag>)
[src]
Sets the value of the textAlignment
field.
pub unsafe fn sort_indicator(&self) -> SortIndicator
[src]
Returns the value of the sortIndicator
field.
pub unsafe fn text(&self) -> Ref<QString>
[src]
Returns a reference to the text
field.
pub unsafe fn text_alignment(&self) -> QFlags<AlignmentFlag>
[src]
Returns a reference to the textAlignment
field.
pub unsafe fn text_mut(&mut self) -> MutRef<QString>
[src]
Returns a mutable reference to the text
field.
Methods from Deref<Target = QStyleOption>
pub unsafe fn copy_from(
&mut self,
other: impl CastInto<Ref<QStyleOption>>
) -> MutRef<QStyleOption>
[src]
&mut self,
other: impl CastInto<Ref<QStyleOption>>
) -> MutRef<QStyleOption>
Assign other to this QStyleOption.
Calls C++ function: QStyleOption& QStyleOption::operator=(const QStyleOption& other)
.
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(&mut self) -> MutRef<QFontMetrics>
[src]
Returns a mutable reference to the fontMetrics
field.
pub unsafe fn init(&mut self, w: impl CastInto<Ptr<QWidget>>)
[src]
Use initFrom(widget) instead.
Calls C++ function: void QStyleOption::init(const QWidget* w)
.
Use initFrom(widget) instead.
pub unsafe fn init_from(&mut 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)
.
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(&mut self) -> MutRef<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(&mut self) -> MutRef<QRect>
[src]
Returns a mutable reference to the rect
field.
pub unsafe fn set_direction(&mut self, value: LayoutDirection)
[src]
Sets the value of the direction
field.
pub unsafe fn set_font_metrics(
&mut self,
value: impl CastInto<Ref<QFontMetrics>>
)
[src]
&mut self,
value: impl CastInto<Ref<QFontMetrics>>
)
Sets the value of the fontMetrics
field.
pub unsafe fn set_palette(&mut self, value: impl CastInto<Ref<QPalette>>)
[src]
Sets the value of the palette
field.
pub unsafe fn set_rect(&mut self, value: impl CastInto<Ref<QRect>>)
[src]
Sets the value of the rect
field.
pub unsafe fn set_state(&mut self, value: QFlags<StateFlag>)
[src]
Sets the value of the state
field.
pub unsafe fn set_style_object(&mut self, value: impl CastInto<MutPtr<QObject>>)
[src]
Sets the value of the styleObject
field.
pub unsafe fn set_type(&mut self, value: c_int)
[src]
Sets the value of the type
field.
pub unsafe fn set_version(&mut 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) -> MutPtr<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 QStyleOptionHeader
[src]
unsafe fn delete(&mut self)
[src]
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.
impl Deref for QStyleOptionHeader
[src]
type Target = QStyleOption
The resulting type after dereferencing.
fn deref(&self) -> &QStyleOption
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionHeader* ptr)
.
impl DerefMut for QStyleOptionHeader
[src]
fn deref_mut(&mut self) -> &mut QStyleOption
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionHeader* ptr)
.
impl StaticDowncast<QStyleOptionHeader> for QStyleOption
[src]
unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionHeader>
[src]
Calls C++ function: QStyleOptionHeader* static_cast<QStyleOptionHeader*>(QStyleOption* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QStyleOption>
) -> MutPtr<QStyleOptionHeader>
[src]
ptr: MutPtr<QStyleOption>
) -> MutPtr<QStyleOptionHeader>
Calls C++ function: QStyleOptionHeader* static_cast<QStyleOptionHeader*>(QStyleOption* ptr)
.
impl StaticUpcast<QStyleOption> for QStyleOptionHeader
[src]
unsafe fn static_upcast(ptr: Ptr<QStyleOptionHeader>) -> Ptr<QStyleOption>
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionHeader* ptr)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QStyleOptionHeader>
) -> MutPtr<QStyleOption>
[src]
ptr: MutPtr<QStyleOptionHeader>
) -> MutPtr<QStyleOption>
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionHeader* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QStyleOptionHeader
impl Send for QStyleOptionHeader
impl Sync for QStyleOptionHeader
impl Unpin for QStyleOptionHeader
impl UnwindSafe for QStyleOptionHeader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,