Struct qmetaobject::QColor[][src]

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

Wrapper around QColor class.

Implementations

impl QColor[src]

pub fn from_name(name: &str) -> QColor[src]

Wrapper around QColor(QLatin1String) constructor.

pub fn from_rgb_f(r: f64, g: f64, b: f64) -> QColor[src]

Wrapper around fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0) constructor.

Wrapper-specific

Alpha is left at default 1.0. To set it to something other that 1.0, use from_rgba_f.

pub fn from_rgba_f(r: f64, g: f64, b: f64, a: f64) -> QColor[src]

Wrapper around fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0) constructor.

Wrapper-specific

Same as from_rgb_f, but accept an alpha value

pub fn get_rgba(&self) -> (f64, f64, f64, f64)[src]

Wrapper around getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = nullptr) method.

Wrapper-specific

Returns red, green, blue and alpha components as a tuple, instead of mutable references.

Trait Implementations

impl Clone for QColor[src]

impl Copy for QColor[src]

impl Default for QColor[src]

impl PartialEq<QColor> for QColor[src]

impl QMetaType for QColor[src]

Auto Trait Implementations

impl RefUnwindSafe for QColor

impl Send for QColor

impl Sync for QColor

impl Unpin for QColor

impl UnwindSafe for QColor

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> From<T> for T[src]

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

impl<T> PropertyType for T where
    T: QMetaType
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.