[−][src]Struct qt_widgets::QStyleOptionGraphicsItem
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
C++ class: QStyleOptionGraphicsItem
.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
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.
For an example demonstrating how style options can be used, see the Styles example.
Methods
impl QStyleOptionGraphicsItem
[src]
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionGraphicsItem>>
) -> Ref<QStyleOptionGraphicsItem>
[src]
&self,
other: impl CastInto<Ref<QStyleOptionGraphicsItem>>
) -> Ref<QStyleOptionGraphicsItem>
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
Calls C++ function: QStyleOptionGraphicsItem& QStyleOptionGraphicsItem::operator=(const QStyleOptionGraphicsItem& other)
.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
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.
For an example demonstrating how style options can be used, see the Styles example.
pub unsafe fn exposed_rect(&self) -> Ref<QRectF>
[src]
Returns a reference to the exposedRect
field.
pub unsafe fn exposed_rect_mut(&self) -> Ref<QRectF>
[src]
Returns a mutable reference to the exposedRect
field.
pub unsafe fn level_of_detail(&self) -> c_double
[src]
Returns the value of the levelOfDetail
field.
pub unsafe fn level_of_detail_from_transform(
world_transform: impl CastInto<Ref<QTransform>>
) -> c_double
[src]
world_transform: impl CastInto<Ref<QTransform>>
) -> c_double
Returns the level of detail from the worldTransform.
Calls C++ function: static double QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform& worldTransform)
.
Returns the level of detail from the worldTransform.
Its value represents the maximum value of the height and width of a unity rectangle, mapped using the worldTransform of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2.
This function was introduced in Qt 4.6.
See also QGraphicsScene::minimumRenderSize().
pub unsafe fn matrix(&self) -> Ref<QMatrix>
[src]
Returns a reference to the matrix
field.
pub unsafe fn matrix_mut(&self) -> Ref<QMatrix>
[src]
Returns a mutable reference to the matrix
field.
pub unsafe fn new() -> CppBox<QStyleOptionGraphicsItem>
[src]
Constructs a QStyleOptionGraphicsItem.
Calls C++ function: [constructor] void QStyleOptionGraphicsItem::QStyleOptionGraphicsItem()
.
Constructs a QStyleOptionGraphicsItem.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionGraphicsItem>>
) -> CppBox<QStyleOptionGraphicsItem>
[src]
other: impl CastInto<Ref<QStyleOptionGraphicsItem>>
) -> CppBox<QStyleOptionGraphicsItem>
Constructs a copy of other.
Calls C++ function: [constructor] void QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem& other)
.
Constructs a copy of other.
pub unsafe fn set_exposed_rect(&self, value: impl CastInto<Ref<QRectF>>)
[src]
Sets the value of the exposedRect
field.
pub unsafe fn set_level_of_detail(&self, value: c_double)
[src]
Sets the value of the levelOfDetail
field.
pub unsafe fn set_matrix(&self, value: impl CastInto<Ref<QMatrix>>)
[src]
Sets the value of the matrix
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 QStyleOptionGraphicsItem
[src]
unsafe fn delete(&self)
[src]
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
Calls C++ function: [destructor] void QStyleOptionGraphicsItem::~QStyleOptionGraphicsItem()
.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
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.
For an example demonstrating how style options can be used, see the Styles example.
impl Deref for QStyleOptionGraphicsItem
[src]
type Target = QStyleOption
The resulting type after dereferencing.
fn deref(&self) -> &QStyleOption
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionGraphicsItem* ptr)
.
impl StaticDowncast<QStyleOptionGraphicsItem> for QStyleOption
[src]
unsafe fn static_downcast(
ptr: Ptr<QStyleOption>
) -> Ptr<QStyleOptionGraphicsItem>
[src]
ptr: Ptr<QStyleOption>
) -> Ptr<QStyleOptionGraphicsItem>
Calls C++ function: QStyleOptionGraphicsItem* static_cast<QStyleOptionGraphicsItem*>(QStyleOption* ptr)
.
impl StaticUpcast<QStyleOption> for QStyleOptionGraphicsItem
[src]
unsafe fn static_upcast(ptr: Ptr<QStyleOptionGraphicsItem>) -> Ptr<QStyleOption>
[src]
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionGraphicsItem* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QStyleOptionGraphicsItem
impl Send for QStyleOptionGraphicsItem
impl Sync for QStyleOptionGraphicsItem
impl Unpin for QStyleOptionGraphicsItem
impl UnwindSafe for QStyleOptionGraphicsItem
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>,