API reference - Class QColor

Notation used in Ruby API documentation

Description: Binding of QColor

Public constructors

new QColornewConstructor QColor::QColor()
new QColornew(const Qt_GlobalColor color)Constructor QColor::QColor(Qt::GlobalColor color)
new QColornew(int r,
int g,
int b,
int a = 255)
Constructor QColor::QColor(int r, int g, int b, int a)
new QColornew(unsigned int rgb)Constructor QColor::QColor(unsigned int rgb)
new QColornew(string name)Constructor QColor::QColor(const char *name)
new QColornew(const QColor color)Constructor QColor::QColor(const QColor &color)
new QColornew(const QColor_Spec spec)Constructor QColor::QColor(QColor::Spec spec)

Public methods

[const]bool!=(const QColor c)Method bool QColor::operator!=(const QColor &c)
[const]bool==(const QColor c)Method bool QColor::operator==(const QColor &c)
[const]intalphaMethod int QColor::alpha()
voidalpha=(int alpha)Method void QColor::setAlpha(int alpha)
[const]doublealphaFMethod double QColor::alphaF()
voidalphaF=(double alpha)Method void QColor::setAlphaF(double alpha)
QColorassign(const QColor arg1)Method QColor &QColor::operator=(const QColor &)
QColorassign(const Qt_GlobalColor color)Method QColor &QColor::operator=(Qt::GlobalColor color)
[const]voidassign(const QColor other)Assign the contents of another object to self
[const]intblackMethod int QColor::black()
[const]doubleblackFMethod double QColor::blackF()
[const]intblueMethod int QColor::blue()
voidblue=(int blue)Method void QColor::setBlue(int blue)
[const]doubleblueFMethod double QColor::blueF()
voidblueF=(double blue)Method void QColor::setBlueF(double blue)
[const]QColorconvertTo(const QColor_Spec colorSpec)Method QColor QColor::convertTo(QColor::Spec colorSpec)
voidcreateEnsures the C++ object is created
[const]intcyanMethod int QColor::cyan()
[const]doublecyanFMethod double QColor::cyanF()
[const]QColordark(int f = 200)Method QColor QColor::dark(int f)
[const]QColordarker(int f = 200)Method QColor QColor::darker(int f)
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]QColordupCreates a copy of self
voidgetCmyk(int ptr c,
int ptr m,
int ptr y,
int ptr k,
int ptr a = 0)
Method void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)
voidgetCmykF(double ptr c,
double ptr m,
double ptr y,
double ptr k,
double ptr a = 0)
Method void QColor::getCmykF(double *c, double *m, double *y, double *k, double *a)
[const]voidgetHsl(int ptr h,
int ptr s,
int ptr l,
int ptr a = 0)
Method void QColor::getHsl(int *h, int *s, int *l, int *a)
[const]voidgetHslF(double ptr h,
double ptr s,
double ptr l,
double ptr a = 0)
Method void QColor::getHslF(double *h, double *s, double *l, double *a)
[const]voidgetHsv(int ptr h,
int ptr s,
int ptr v,
int ptr a = 0)
Method void QColor::getHsv(int *h, int *s, int *v, int *a)
[const]voidgetHsvF(double ptr h,
double ptr s,
double ptr v,
double ptr a = 0)
Method void QColor::getHsvF(double *h, double *s, double *v, double *a)
[const]voidgetRgb(int ptr r,
int ptr g,
int ptr b,
int ptr a = 0)
Method void QColor::getRgb(int *r, int *g, int *b, int *a)
[const]voidgetRgbF(double ptr r,
double ptr g,
double ptr b,
double ptr a = 0)
Method void QColor::getRgbF(double *r, double *g, double *b, double *a)
[const]intgreenMethod int QColor::green()
voidgreen=(int green)Method void QColor::setGreen(int green)
[const]doublegreenFMethod double QColor::greenF()
voidgreenF=(double green)Method void QColor::setGreenF(double green)
[const]inthslHueMethod int QColor::hslHue()
[const]doublehslHueFMethod double QColor::hslHueF()
[const]inthslSaturationMethod int QColor::hslSaturation()
[const]doublehslSaturationFMethod double QColor::hslSaturationF()
[const]inthsvHueMethod int QColor::hsvHue()
[const]doublehsvHueFMethod double QColor::hsvHueF()
[const]inthsvSaturationMethod int QColor::hsvSaturation()
[const]doublehsvSaturationFMethod double QColor::hsvSaturationF()
[const]inthueMethod int QColor::hue()
[const]doublehueFMethod double QColor::hueF()
[const]boolisValidMethod bool QColor::isValid()
[const]boolisValid?Method bool QColor::isValid()
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]QColorlight(int f = 150)Method QColor QColor::light(int f)
[const]QColorlighter(int f = 150)Method QColor QColor::lighter(int f)
[const]intlightnessMethod int QColor::lightness()
[const]doublelightnessFMethod double QColor::lightnessF()
[const]intmagentaMethod int QColor::magenta()
[const]doublemagentaFMethod double QColor::magentaF()
[const]stringnameMethod QString QColor::name()
[const]intredMethod int QColor::red()
voidred=(int red)Method void QColor::setRed(int red)
[const]doubleredFMethod double QColor::redF()
voidredF=(double red)Method void QColor::setRedF(double red)
[const]unsigned intrgbMethod unsigned int QColor::rgb()
voidrgb=(unsigned int rgb)Method void QColor::setRgb(unsigned int rgb)
[const]unsigned intrgbaMethod unsigned int QColor::rgba()
voidrgba=(unsigned int rgba)Method void QColor::setRgba(unsigned int rgba)
[const]intsaturationMethod int QColor::saturation()
[const]doublesaturationFMethod double QColor::saturationF()
voidsetAlpha(int alpha)Method void QColor::setAlpha(int alpha)
voidsetAlphaF(double alpha)Method void QColor::setAlphaF(double alpha)
voidsetBlue(int blue)Method void QColor::setBlue(int blue)
voidsetBlueF(double blue)Method void QColor::setBlueF(double blue)
voidsetCmyk(int c,
int m,
int y,
int k,
int a = 255)
Method void QColor::setCmyk(int c, int m, int y, int k, int a)
voidsetCmykF(double c,
double m,
double y,
double k,
double a = 1.0)
Method void QColor::setCmykF(double c, double m, double y, double k, double a)
voidsetGreen(int green)Method void QColor::setGreen(int green)
voidsetGreenF(double green)Method void QColor::setGreenF(double green)
voidsetHsl(int h,
int s,
int l,
int a = 255)
Method void QColor::setHsl(int h, int s, int l, int a)
voidsetHslF(double h,
double s,
double l,
double a = 1.0)
Method void QColor::setHslF(double h, double s, double l, double a)
voidsetHsv(int h,
int s,
int v,
int a = 255)
Method void QColor::setHsv(int h, int s, int v, int a)
voidsetHsvF(double h,
double s,
double v,
double a = 1.0)
Method void QColor::setHsvF(double h, double s, double v, double a)
voidsetNamedColor(string name)Method void QColor::setNamedColor(const QString &name)
voidsetRed(int red)Method void QColor::setRed(int red)
voidsetRedF(double red)Method void QColor::setRedF(double red)
voidsetRgb(int r,
int g,
int b,
int a = 255)
Method void QColor::setRgb(int r, int g, int b, int a)
voidsetRgb(unsigned int rgb)Method void QColor::setRgb(unsigned int rgb)
voidsetRgbF(double r,
double g,
double b,
double a = 1.0)
Method void QColor::setRgbF(double r, double g, double b, double a)
voidsetRgba(unsigned int rgba)Method void QColor::setRgba(unsigned int rgba)
[const]QColor_SpecspecMethod QColor::Spec QColor::spec()
[const]QColortoCmykMethod QColor QColor::toCmyk()
[const]QColortoHslMethod QColor QColor::toHsl()
[const]QColortoHsvMethod QColor QColor::toHsv()
[const]QColortoRgbMethod QColor QColor::toRgb()
[const]intvalueMethod int QColor::value()
[const]doublevalueFMethod double QColor::valueF()
[const]intyellowMethod int QColor::yellow()
[const]doubleyellowFMethod double QColor::yellowF()

Public static methods and constants

QColor_SpecCmykEnum constant QColor::Cmyk
QColor_SpecHslEnum constant QColor::Hsl
QColor_SpecHsvEnum constant QColor::Hsv
QColor_SpecInvalidEnum constant QColor::Invalid
QColor_SpecRgbEnum constant QColor::Rgb
string[]colorNamesStatic method QStringList QColor::colorNames()
QColorfromCmyk(int c,
int m,
int y,
int k,
int a = 255)
Static method QColor QColor::fromCmyk(int c, int m, int y, int k, int a)
QColorfromCmykF(double c,
double m,
double y,
double k,
double a = 1.0)
Static method QColor QColor::fromCmykF(double c, double m, double y, double k, double a)
QColorfromHsl(int h,
int s,
int l,
int a = 255)
Static method QColor QColor::fromHsl(int h, int s, int l, int a)
QColorfromHslF(double h,
double s,
double l,
double a = 1.0)
Static method QColor QColor::fromHslF(double h, double s, double l, double a)
QColorfromHsv(int h,
int s,
int v,
int a = 255)
Static method QColor QColor::fromHsv(int h, int s, int v, int a)
QColorfromHsvF(double h,
double s,
double v,
double a = 1.0)
Static method QColor QColor::fromHsvF(double h, double s, double v, double a)
QColorfromRgb(unsigned int rgb)Static method QColor QColor::fromRgb(unsigned int rgb)
QColorfromRgb(int r,
int g,
int b,
int a = 255)
Static method QColor QColor::fromRgb(int r, int g, int b, int a)
QColorfromRgbF(double r,
double g,
double b,
double a = 1.0)
Static method QColor QColor::fromRgbF(double r, double g, double b, double a)
QColorfromRgba(unsigned int rgba)Static method QColor QColor::fromRgba(unsigned int rgba)

Detailed description

[const] bool !=(const QColor c)

Description: Method bool QColor::operator!=(const QColor &c)

[const] bool ==(const QColor c)

Description: Method bool QColor::operator==(const QColor &c)

[static] QColor_Spec Cmyk

Description: Enum constant QColor::Cmyk

[static] QColor_Spec Hsl

Description: Enum constant QColor::Hsl

[static] QColor_Spec Hsv

Description: Enum constant QColor::Hsv

[static] QColor_Spec Invalid

Description: Enum constant QColor::Invalid

[static] QColor_Spec Rgb

Description: Enum constant QColor::Rgb

[const] int alpha

Description: Method int QColor::alpha()

void alpha=(int alpha)

Description: Method void QColor::setAlpha(int alpha)

[const] double alphaF

Description: Method double QColor::alphaF()

void alphaF=(double alpha)

Description: Method void QColor::setAlphaF(double alpha)

QColor assign(const QColor arg1)

Description: Method QColor &QColor::operator=(const QColor &)

QColor assign(const Qt_GlobalColor color)

Description: Method QColor &QColor::operator=(Qt::GlobalColor color)

[const] void assign(const QColor other)

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

[const] int black

Description: Method int QColor::black()

[const] double blackF

Description: Method double QColor::blackF()

[const] int blue

Description: Method int QColor::blue()

void blue=(int blue)

Description: Method void QColor::setBlue(int blue)

[const] double blueF

Description: Method double QColor::blueF()

void blueF=(double blue)

Description: Method void QColor::setBlueF(double blue)

[static] string[] colorNames

Description: Static method QStringList QColor::colorNames()

This method is static and can be called without an instance.

[const] QColor convertTo(const QColor_Spec colorSpec)

Description: Method QColor QColor::convertTo(QColor::Spec colorSpec)

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

[const] int cyan

Description: Method int QColor::cyan()

[const] double cyanF

Description: Method double QColor::cyanF()

[const] QColor dark(int f = 200)

Description: Method QColor QColor::dark(int f)

[const] QColor darker(int f = 200)

Description: Method QColor QColor::darker(int f)

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] QColor dup

Description: Creates a copy of self

[static] QColor fromCmyk(int c,int m,int y,int k,int a = 255)

Description: Static method QColor QColor::fromCmyk(int c, int m, int y, int k, int a)

This method is static and can be called without an instance.

[static] QColor fromCmykF(double c,double m,double y,double k,double a = 1.0)

Description: Static method QColor QColor::fromCmykF(double c, double m, double y, double k, double a)

This method is static and can be called without an instance.

[static] QColor fromHsl(int h,int s,int l,int a = 255)

Description: Static method QColor QColor::fromHsl(int h, int s, int l, int a)

This method is static and can be called without an instance.

[static] QColor fromHslF(double h,double s,double l,double a = 1.0)

Description: Static method QColor QColor::fromHslF(double h, double s, double l, double a)

This method is static and can be called without an instance.

[static] QColor fromHsv(int h,int s,int v,int a = 255)

Description: Static method QColor QColor::fromHsv(int h, int s, int v, int a)

This method is static and can be called without an instance.

[static] QColor fromHsvF(double h,double s,double v,double a = 1.0)

Description: Static method QColor QColor::fromHsvF(double h, double s, double v, double a)

This method is static and can be called without an instance.

[static] QColor fromRgb(unsigned int rgb)

Description: Static method QColor QColor::fromRgb(unsigned int rgb)

This method is static and can be called without an instance.

[static] QColor fromRgb(int r,int g,int b,int a = 255)

Description: Static method QColor QColor::fromRgb(int r, int g, int b, int a)

This method is static and can be called without an instance.

[static] QColor fromRgbF(double r,double g,double b,double a = 1.0)

Description: Static method QColor QColor::fromRgbF(double r, double g, double b, double a)

This method is static and can be called without an instance.

[static] QColor fromRgba(unsigned int rgba)

Description: Static method QColor QColor::fromRgba(unsigned int rgba)

This method is static and can be called without an instance.

void getCmyk(int ptr c,int ptr m,int ptr y,int ptr k,int ptr a = 0)

Description: Method void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)

void getCmykF(double ptr c,double ptr m,double ptr y,double ptr k,double ptr a = 0)

Description: Method void QColor::getCmykF(double *c, double *m, double *y, double *k, double *a)

[const] void getHsl(int ptr h,int ptr s,int ptr l,int ptr a = 0)

Description: Method void QColor::getHsl(int *h, int *s, int *l, int *a)

[const] void getHslF(double ptr h,double ptr s,double ptr l,double ptr a = 0)

Description: Method void QColor::getHslF(double *h, double *s, double *l, double *a)

[const] void getHsv(int ptr h,int ptr s,int ptr v,int ptr a = 0)

Description: Method void QColor::getHsv(int *h, int *s, int *v, int *a)

[const] void getHsvF(double ptr h,double ptr s,double ptr v,double ptr a = 0)

Description: Method void QColor::getHsvF(double *h, double *s, double *v, double *a)

[const] void getRgb(int ptr r,int ptr g,int ptr b,int ptr a = 0)

Description: Method void QColor::getRgb(int *r, int *g, int *b, int *a)

[const] void getRgbF(double ptr r,double ptr g,double ptr b,double ptr a = 0)

Description: Method void QColor::getRgbF(double *r, double *g, double *b, double *a)

[const] int green

Description: Method int QColor::green()

void green=(int green)

Description: Method void QColor::setGreen(int green)

[const] double greenF

Description: Method double QColor::greenF()

void greenF=(double green)

Description: Method void QColor::setGreenF(double green)

[const] int hslHue

Description: Method int QColor::hslHue()

[const] double hslHueF

Description: Method double QColor::hslHueF()

[const] int hslSaturation

Description: Method int QColor::hslSaturation()

[const] double hslSaturationF

Description: Method double QColor::hslSaturationF()

[const] int hsvHue

Description: Method int QColor::hsvHue()

[const] double hsvHueF

Description: Method double QColor::hsvHueF()

[const] int hsvSaturation

Description: Method int QColor::hsvSaturation()

[const] double hsvSaturationF

Description: Method double QColor::hsvSaturationF()

[const] int hue

Description: Method int QColor::hue()

[const] double hueF

Description: Method double QColor::hueF()

[const] bool isValid

Description: Method bool QColor::isValid()

[const] bool isValid?

Description: Method bool QColor::isValid()

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

[const] QColor light(int f = 150)

Description: Method QColor QColor::light(int f)

[const] QColor lighter(int f = 150)

Description: Method QColor QColor::lighter(int f)

[const] int lightness

Description: Method int QColor::lightness()

[const] double lightnessF

Description: Method double QColor::lightnessF()

[const] int magenta

Description: Method int QColor::magenta()

[const] double magentaF

Description: Method double QColor::magentaF()

[const] string name

Description: Method QString QColor::name()

[static] new QColor new

Description: Constructor QColor::QColor()

This method creates an object of class QColor.

[static] new QColor new(const Qt_GlobalColor color)

Description: Constructor QColor::QColor(Qt::GlobalColor color)

This method creates an object of class QColor.

[static] new QColor new(int r,int g,int b,int a = 255)

Description: Constructor QColor::QColor(int r, int g, int b, int a)

This method creates an object of class QColor.

[static] new QColor new(unsigned int rgb)

Description: Constructor QColor::QColor(unsigned int rgb)

This method creates an object of class QColor.

[static] new QColor new(string name)

Description: Constructor QColor::QColor(const char *name)

This method creates an object of class QColor.

[static] new QColor new(const QColor color)

Description: Constructor QColor::QColor(const QColor &color)

This method creates an object of class QColor.

[static] new QColor new(const QColor_Spec spec)

Description: Constructor QColor::QColor(QColor::Spec spec)

This method creates an object of class QColor.

[const] int red

Description: Method int QColor::red()

void red=(int red)

Description: Method void QColor::setRed(int red)

[const] double redF

Description: Method double QColor::redF()

void redF=(double red)

Description: Method void QColor::setRedF(double red)

[const] unsigned int rgb

Description: Method unsigned int QColor::rgb()

void rgb=(unsigned int rgb)

Description: Method void QColor::setRgb(unsigned int rgb)

[const] unsigned int rgba

Description: Method unsigned int QColor::rgba()

void rgba=(unsigned int rgba)

Description: Method void QColor::setRgba(unsigned int rgba)

[const] int saturation

Description: Method int QColor::saturation()

[const] double saturationF

Description: Method double QColor::saturationF()

void setAlpha(int alpha)

Description: Method void QColor::setAlpha(int alpha)

void setAlphaF(double alpha)

Description: Method void QColor::setAlphaF(double alpha)

void setBlue(int blue)

Description: Method void QColor::setBlue(int blue)

void setBlueF(double blue)

Description: Method void QColor::setBlueF(double blue)

void setCmyk(int c,int m,int y,int k,int a = 255)

Description: Method void QColor::setCmyk(int c, int m, int y, int k, int a)

void setCmykF(double c,double m,double y,double k,double a = 1.0)

Description: Method void QColor::setCmykF(double c, double m, double y, double k, double a)

void setGreen(int green)

Description: Method void QColor::setGreen(int green)

void setGreenF(double green)

Description: Method void QColor::setGreenF(double green)

void setHsl(int h,int s,int l,int a = 255)

Description: Method void QColor::setHsl(int h, int s, int l, int a)

void setHslF(double h,double s,double l,double a = 1.0)

Description: Method void QColor::setHslF(double h, double s, double l, double a)

void setHsv(int h,int s,int v,int a = 255)

Description: Method void QColor::setHsv(int h, int s, int v, int a)

void setHsvF(double h,double s,double v,double a = 1.0)

Description: Method void QColor::setHsvF(double h, double s, double v, double a)

void setNamedColor(string name)

Description: Method void QColor::setNamedColor(const QString &name)

void setRed(int red)

Description: Method void QColor::setRed(int red)

void setRedF(double red)

Description: Method void QColor::setRedF(double red)

void setRgb(int r,int g,int b,int a = 255)

Description: Method void QColor::setRgb(int r, int g, int b, int a)

void setRgb(unsigned int rgb)

Description: Method void QColor::setRgb(unsigned int rgb)

void setRgbF(double r,double g,double b,double a = 1.0)

Description: Method void QColor::setRgbF(double r, double g, double b, double a)

void setRgba(unsigned int rgba)

Description: Method void QColor::setRgba(unsigned int rgba)

[const] QColor_Spec spec

Description: Method QColor::Spec QColor::spec()

[const] QColor toCmyk

Description: Method QColor QColor::toCmyk()

[const] QColor toHsl

Description: Method QColor QColor::toHsl()

[const] QColor toHsv

Description: Method QColor QColor::toHsv()

[const] QColor toRgb

Description: Method QColor QColor::toRgb()

[const] int value

Description: Method int QColor::value()

[const] double valueF

Description: Method double QColor::valueF()

[const] int yellow

Description: Method int QColor::yellow()

[const] double yellowF

Description: Method double QColor::yellowF()