Struct cxx_qt_lib::Color
source · [−]pub struct Color { /* private fields */ }
Expand description
The Rust representation of Qt’s QColor
Internally this holds a UniquePtr to a QColor which has been constructed on the C++ side.
Implementations
sourceimpl Color
impl Color
sourcepub fn from_qcolor(qcolor: &QColor) -> Self
pub fn from_qcolor(qcolor: &QColor) -> Self
Construct a Rust Color from an existing QColor, this is a copy operation.
sourcepub fn from_rgba(red: i32, green: i32, blue: i32, alpha: i32) -> Self
pub fn from_rgba(red: i32, green: i32, blue: i32, alpha: i32) -> Self
Construct a Rust Color from a given set of RGBA values
pub fn alpha(&self) -> i32
pub fn blue(&self) -> i32
pub fn green(&self) -> i32
pub fn red(&self) -> i32
pub fn set_alpha(&mut self, alpha: i32)
pub fn set_blue(&mut self, blue: i32)
pub fn set_green(&mut self, green: i32)
pub fn set_red(&mut self, red: i32)
Trait Implementations
sourceimpl ToUniquePtr for Color
impl ToUniquePtr for Color
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl !Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more