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

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

C++ class: QIconEngine::ScaledPixmapArgument.

C++ documentation:

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

The struct provides a way for icons created via QIcon::fromTheme() to return pixmaps that are designed for the current device pixel ratio. The scale for such an icon is specified using the Scale directory key in the appropriate index.theme file.

Icons created via other approaches will return the same result as a call to pixmap() would, and continue to benefit from Qt's "@nx" high DPI syntax.

Implementations§

source§

impl ScaledPixmapArgument

source

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

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

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

C++ documentation:

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

The struct provides a way for icons created via QIcon::fromTheme() to return pixmaps that are designed for the current device pixel ratio. The scale for such an icon is specified using the Scale directory key in the appropriate index.theme file.

Icons created via other approaches will return the same result as a call to pixmap() would, and continue to benefit from Qt's "@nx" high DPI syntax.

source

pub unsafe fn mode(&self) -> Mode

Returns the value of the mode field.

source

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

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

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

C++ documentation:

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

The struct provides a way for icons created via QIcon::fromTheme() to return pixmaps that are designed for the current device pixel ratio. The scale for such an icon is specified using the Scale directory key in the appropriate index.theme file.

Icons created via other approaches will return the same result as a call to pixmap() would, and continue to benefit from Qt's "@nx" high DPI syntax.

source

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

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

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

C++ documentation:

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

The struct provides a way for icons created via QIcon::fromTheme() to return pixmaps that are designed for the current device pixel ratio. The scale for such an icon is specified using the Scale directory key in the appropriate index.theme file.

Icons created via other approaches will return the same result as a call to pixmap() would, and continue to benefit from Qt's "@nx" high DPI syntax.

source

pub unsafe fn pixmap(&self) -> Ref<QPixmap>

Returns a reference to the pixmap field.

source

pub unsafe fn pixmap_mut(&self) -> Ref<QPixmap>

Returns a mutable reference to the pixmap field.

source

pub unsafe fn scale(&self) -> c_double

Returns the value of the scale field.

source

pub unsafe fn set_mode(&self, value: Mode)

Sets the value of the mode field.

source

pub unsafe fn set_pixmap(&self, value: impl CastInto<Ref<QPixmap>>)

Sets the value of the pixmap field.

source

pub unsafe fn set_scale(&self, value: c_double)

Sets the value of the scale field.

source

pub unsafe fn set_size(&self, value: impl CastInto<Ref<QSize>>)

Sets the value of the size field.

source

pub unsafe fn set_state(&self, value: State)

Sets the value of the state field.

source

pub unsafe fn size(&self) -> Ref<QSize>

Returns a reference to the size field.

source

pub unsafe fn size_mut(&self) -> Ref<QSize>

Returns a mutable reference to the size field.

source

pub unsafe fn state(&self) -> State

Returns the value of the state field.

Trait Implementations§

source§

impl CppDeletable for ScaledPixmapArgument

source§

unsafe fn delete(&self)

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

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

C++ documentation:

This struct represents arguments to the virtual_hook() function when the id parameter is QIconEngine::ScaledPixmapHook.

The struct provides a way for icons created via QIcon::fromTheme() to return pixmaps that are designed for the current device pixel ratio. The scale for such an icon is specified using the Scale directory key in the appropriate index.theme file.

Icons created via other approaches will return the same result as a call to pixmap() would, and continue to benefit from Qt's "@nx" high DPI syntax.

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<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>,

§

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>,

§

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.