Struct QColormap

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

The QColormap class maps device independent QColors to device dependent pixel values.

C++ class: QColormap.

C++ documentation:

The QColormap class maps device independent QColors to device dependent pixel values.

Implementations§

Source§

impl QColormap

Source

pub unsafe fn cleanup()

Calls C++ function: static void QColormap::cleanup().

Source

pub unsafe fn color_at(&self, pixel: c_uint) -> CppBox<QColor>

Returns a QColor for the pixel.

Calls C++ function: QColor QColormap::colorAt(unsigned int pixel) const.

C++ documentation:

Returns a QColor for the pixel.

See also pixel().

Source

pub unsafe fn colormap(&self) -> CppBox<QVectorOfQColor>

Returns a vector of colors which represents the devices colormap for Indexed and Gray modes. This function returns an empty vector for Direct mode.

Calls C++ function: QVector<QColor> QColormap::colormap() const.

C++ documentation:

Returns a vector of colors which represents the devices colormap for Indexed and Gray modes. This function returns an empty vector for Direct mode.

See also size().

Source

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

Assigns the given colormap to this color map and returns a reference to this color map.

Calls C++ function: QColormap& QColormap::operator=(const QColormap& colormap).

C++ documentation:

Assigns the given colormap to this color map and returns a reference to this color map.

This function was introduced in Qt 4.2.

Source

pub unsafe fn depth(&self) -> c_int

Returns the depth of the device.

Calls C++ function: int QColormap::depth() const.

C++ documentation:

Returns the depth of the device.

See also size().

Source

pub unsafe fn initialize()

Calls C++ function: static void QColormap::initialize().

Source

pub unsafe fn instance_1a(screen: c_int) -> CppBox<QColormap>

Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.

Calls C++ function: static QColormap QColormap::instance(int screen = …).

C++ documentation:

Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.

Source

pub unsafe fn instance_0a() -> CppBox<QColormap>

Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.

Calls C++ function: static QColormap QColormap::instance().

C++ documentation:

Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.

Source

pub unsafe fn mode(&self) -> Mode

Returns the mode of this colormap.

Calls C++ function: QColormap::Mode QColormap::mode() const.

C++ documentation:

Returns the mode of this colormap.

See also QColormap::Mode.

Source

pub unsafe fn new_copy( colormap: impl CastInto<Ref<QColormap>>, ) -> CppBox<QColormap>

Constructs a copy of another colormap.

Calls C++ function: [constructor] void QColormap::QColormap(const QColormap& colormap).

C++ documentation:

Constructs a copy of another colormap.

Source

pub unsafe fn pixel(&self, color: impl CastInto<Ref<QColor>>) -> c_uint

Returns a device dependent pixel value for the color.

Calls C++ function: unsigned int QColormap::pixel(const QColor& color) const.

C++ documentation:

Returns a device dependent pixel value for the color.

See also colorAt().

Source

pub unsafe fn size(&self) -> c_int

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.

Calls C++ function: int QColormap::size() const.

C++ documentation:

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.

See also colormap().

Trait Implementations§

Source§

impl CppDeletable for QColormap

Source§

unsafe fn delete(&self)

Destroys the colormap.

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

C++ documentation:

Destroys the colormap.

Source§

impl Size for QColormap

Source§

unsafe fn size(&self) -> usize

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.

Calls C++ function: int QColormap::size() const.

C++ documentation:

Returns the size of the colormap for Indexed and Gray modes; Returns -1 for Direct mode.

See also colormap().

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

Source§

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

Source§

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.