[−][src]Struct qt_widgets::QStyleOptionViewItem
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.
C++ class: QStyleOptionViewItem
.
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.
QStyleOptionViewItem contains all the information that QStyle functions need to draw the items for Qt's model/view classes.
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 QStyleOptionViewItem
[src]
pub unsafe fn background_brush(&self) -> Ref<QBrush>
[src]
Returns a reference to the backgroundBrush
field.
pub unsafe fn background_brush_mut(&self) -> Ref<QBrush>
[src]
Returns a mutable reference to the backgroundBrush
field.
pub unsafe fn check_state(&self) -> CheckState
[src]
Returns the value of the checkState
field.
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionViewItem>>
) -> Ref<QStyleOptionViewItem>
[src]
&self,
other: impl CastInto<Ref<QStyleOptionViewItem>>
) -> Ref<QStyleOptionViewItem>
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.
Calls C++ function: QStyleOptionViewItem& QStyleOptionViewItem::operator=(const QStyleOptionViewItem& other)
.
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.
QStyleOptionViewItem contains all the information that QStyle functions need to draw the items for Qt's model/view classes.
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 decoration_alignment(&self) -> QFlags<AlignmentFlag>
[src]
Returns a reference to the decorationAlignment
field.
pub unsafe fn decoration_position(&self) -> Position
[src]
Returns the value of the decorationPosition
field.
pub unsafe fn decoration_size(&self) -> Ref<QSize>
[src]
Returns a reference to the decorationSize
field.
pub unsafe fn decoration_size_mut(&self) -> Ref<QSize>
[src]
Returns a mutable reference to the decorationSize
field.
pub unsafe fn display_alignment(&self) -> QFlags<AlignmentFlag>
[src]
Returns a reference to the displayAlignment
field.
pub unsafe fn features(&self) -> QFlags<ViewItemFeature>
[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 index(&self) -> Ref<QModelIndex>
[src]
Returns a reference to the index
field.
pub unsafe fn index_mut(&self) -> Ref<QModelIndex>
[src]
Returns a mutable reference to the index
field.
pub unsafe fn locale(&self) -> Ref<QLocale>
[src]
Returns a reference to the locale
field.
pub unsafe fn locale_mut(&self) -> Ref<QLocale>
[src]
Returns a mutable reference to the locale
field.
pub unsafe fn new() -> CppBox<QStyleOptionViewItem>
[src]
Constructs a QStyleOptionViewItem, initializing the members variables to their default values.
Calls C++ function: [constructor] void QStyleOptionViewItem::QStyleOptionViewItem()
.
Constructs a QStyleOptionViewItem, initializing the members variables to their default values.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionViewItem>>
) -> CppBox<QStyleOptionViewItem>
[src]
other: impl CastInto<Ref<QStyleOptionViewItem>>
) -> CppBox<QStyleOptionViewItem>
Constructs a copy of the other style option.
Calls C++ function: [constructor] void QStyleOptionViewItem::QStyleOptionViewItem(const QStyleOptionViewItem& other)
.
Constructs a copy of the other style option.
pub unsafe fn set_background_brush(&self, value: impl CastInto<Ref<QBrush>>)
[src]
Sets the value of the backgroundBrush
field.
pub unsafe fn set_check_state(&self, value: CheckState)
[src]
Sets the value of the checkState
field.
pub unsafe fn set_decoration_alignment(&self, value: QFlags<AlignmentFlag>)
[src]
Sets the value of the decorationAlignment
field.
pub unsafe fn set_decoration_position(&self, value: Position)
[src]
Sets the value of the decorationPosition
field.
pub unsafe fn set_decoration_size(&self, value: impl CastInto<Ref<QSize>>)
[src]
Sets the value of the decorationSize
field.
pub unsafe fn set_display_alignment(&self, value: QFlags<AlignmentFlag>)
[src]
Sets the value of the displayAlignment
field.
pub unsafe fn set_features(&self, value: QFlags<ViewItemFeature>)
[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_index(&self, value: impl CastInto<Ref<QModelIndex>>)
[src]
Sets the value of the index
field.
pub unsafe fn set_locale(&self, value: impl CastInto<Ref<QLocale>>)
[src]
Sets the value of the locale
field.
pub unsafe fn set_show_decoration_selected(&self, value: bool)
[src]
Sets the value of the showDecorationSelected
field.
pub unsafe fn set_text(&self, value: impl CastInto<Ref<QString>>)
[src]
Sets the value of the text
field.
pub unsafe fn set_text_elide_mode(&self, value: TextElideMode)
[src]
Sets the value of the textElideMode
field.
pub unsafe fn set_view_item_position(&self, value: ViewItemPosition)
[src]
Sets the value of the viewItemPosition
field.
pub unsafe fn set_widget(&self, value: impl CastInto<Ptr<QWidget>>)
[src]
Sets the value of the widget
field.
pub unsafe fn show_decoration_selected(&self) -> bool
[src]
Returns the value of the showDecorationSelected
field.
pub unsafe fn text(&self) -> Ref<QString>
[src]
Returns a reference to the text
field.
pub unsafe fn text_elide_mode(&self) -> TextElideMode
[src]
Returns the value of the textElideMode
field.
pub unsafe fn text_mut(&self) -> Ref<QString>
[src]
Returns a mutable reference to the text
field.
pub unsafe fn view_item_position(&self) -> ViewItemPosition
[src]
Returns the value of the viewItemPosition
field.
pub unsafe fn widget(&self) -> QPtr<QWidget>
[src]
Returns the value of the widget
field.
Methods from Deref<Target = QStyleOption>
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOption>>
) -> Ref<QStyleOption>
[src]
&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.
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)
.
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)
.
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 QStyleOptionViewItem
[src]
unsafe fn delete(&self)
[src]
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.
Calls C++ function: [destructor] void QStyleOptionViewItem::~QStyleOptionViewItem()
.
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widget.
QStyleOptionViewItem contains all the information that QStyle functions need to draw the items for Qt's model/view classes.
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 QStyleOptionViewItem
[src]
type Target = QStyleOption
The resulting type after dereferencing.
fn deref(&self) -> &QStyleOption
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionViewItem* ptr)
.
impl StaticDowncast<QStyleOptionViewItem> for QStyleOption
[src]
unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionViewItem>
[src]
Calls C++ function: QStyleOptionViewItem* static_cast<QStyleOptionViewItem*>(QStyleOption* ptr)
.
impl StaticUpcast<QStyleOption> for QStyleOptionViewItem
[src]
unsafe fn static_upcast(ptr: Ptr<QStyleOptionViewItem>) -> Ptr<QStyleOption>
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionViewItem* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QStyleOptionViewItem
impl Send for QStyleOptionViewItem
impl Sync for QStyleOptionViewItem
impl Unpin for QStyleOptionViewItem
impl UnwindSafe for QStyleOptionViewItem
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]
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>,