#[repr(C)]pub struct QColormap { /* private fields */ }Expand description
Implementations§
Source§impl QColormap
impl QColormap
Sourcepub unsafe fn color_at(&self, pixel: c_uint) -> CppBox<QColor>
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.
Sourcepub unsafe fn colormap(&self) -> CppBox<QVectorOfQColor>
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.
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().
Sourcepub unsafe fn copy_from(
&self,
colormap: impl CastInto<Ref<QColormap>>,
) -> Ref<QColormap>
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).
Assigns the given colormap to this color map and returns a reference to this color map.
This function was introduced in Qt 4.2.
Sourcepub unsafe fn depth(&self) -> c_int
pub unsafe fn depth(&self) -> c_int
Returns the depth of the device.
Calls C++ function: int QColormap::depth() const.
Returns the depth of the device.
See also size().
Sourcepub unsafe fn initialize()
pub unsafe fn initialize()
Calls C++ function: static void QColormap::initialize().
Sourcepub unsafe fn instance_1a(screen: c_int) -> CppBox<QColormap>
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 = …).
Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.
Sourcepub unsafe fn instance_0a() -> CppBox<QColormap>
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().
Returns the colormap for the specified screen. If screen is -1, this function returns the colormap for the default screen.
Sourcepub unsafe fn mode(&self) -> Mode
pub unsafe fn mode(&self) -> Mode
Returns the mode of this colormap.
Calls C++ function: QColormap::Mode QColormap::mode() const.
Returns the mode of this colormap.
See also QColormap::Mode.
Sourcepub unsafe fn new_copy(
colormap: impl CastInto<Ref<QColormap>>,
) -> CppBox<QColormap>
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).
Constructs a copy of another colormap.
Sourcepub unsafe fn pixel(&self, color: impl CastInto<Ref<QColor>>) -> c_uint
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.
Returns a device dependent pixel value for the color.
See also colorAt().