[][src]Struct qt_widgets::QColormap

#[repr(C)]pub struct QColormap { /* fields omitted */ }

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.

Methods

impl QColormap[src]

pub unsafe fn cleanup()[src]

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

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

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().

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

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().

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

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.

pub unsafe fn depth(&self) -> c_int[src]

Returns the depth of the device.

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

C++ documentation:

Returns the depth of the device.

See also size().

pub unsafe fn initialize()[src]

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

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

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.

pub unsafe fn instance_0a() -> CppBox<QColormap>[src]

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.

pub unsafe fn mode(&self) -> Mode[src]

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.

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

Constructs a copy of another colormap.

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

C++ documentation:

Constructs a copy of another colormap.

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

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().

pub unsafe fn size(&self) -> c_int[src]

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

impl CppDeletable for QColormap[src]

unsafe fn delete(&self)[src]

Destroys the colormap.

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

C++ documentation:

Destroys the colormap.

impl Size for QColormap[src]

unsafe fn size(&self) -> usize[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.