pub struct QColor { /* private fields */ }
Expand description

The Rust representation of Qt’s QColor

Internally this holds a UniquePtr to a QColorCpp which has been constructed on the C++ side.

Implementations

Construct a Rust QColor from an existing QColorCpp, this is a copy operation.

Constructs a QColor with the RGB value r, g, b, and the alpha-channel (transparency) value of a.

The color is left invalid if any of the arguments are invalid.

Returns the alpha color component of this color.

Returns the blue color component of this color.

Returns the green color component of this color.

Returns the red color component of this color.

Sets the alpha of this color to alpha. Integer alpha is specified in the range 0-255.

Sets the blue color component of this color to blue. Integer components are specified in the range 0-255.

Sets the green color component of this color to green. Integer components are specified in the range 0-255.

Sets the red color component of this color to red. Integer components are specified in the range 0-255.

Trait Implementations

Returns the “default value” for a type. Read more

Retrieve the UniquePtr to the Qt QColorCpp of this Rust QColor so that this object can be passed back to C++.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.