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]
pub fn eq(&self, other: &QColor) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ne(&self, other: &Rhs) -> boolimpl 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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> PropertyType for T where
T: QMetaType,
[src]
T: QMetaType,
pub fn register_type(&CStr) -> i32
[src]
pub unsafe fn pass_to_qt(&mut Self, *mut c_void)
[src]
pub unsafe fn read_from_qt(*const c_void) -> T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,