[−][src]Struct qt_widgets::QColormap
The QColormap class maps device independent QColors to device dependent pixel values.
C++ class: QColormap
.
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
.
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
.
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]
&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.
pub unsafe fn depth(&self) -> c_int
[src]
Returns the depth of the device.
Calls C++ function: int QColormap::depth() const
.
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 = …)
.
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()
.
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
.
Returns the mode of this colormap.
See also QColormap::Mode.
pub unsafe fn new_copy(
colormap: impl CastInto<Ref<QColormap>>
) -> CppBox<QColormap>
[src]
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.
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
.
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
.
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()
.
Destroys the colormap.
impl Size for QColormap
[src]
Auto Trait Implementations
impl RefUnwindSafe for QColormap
impl Send for QColormap
impl Sync for QColormap
impl Unpin for QColormap
impl UnwindSafe for QColormap
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>,