#include <qcolor.h>
Public Types |
|
| enum | Spec
{ Invalid, Rgb, Hsv, Cmyk, Hsl } |
Public Member Functions |
|
| QColor () | |
| QColor (Qt::GlobalColor color) | |
| QColor (int r, int g, int b, int a=255) | |
| QColor (QRgb rgb) | |
| QColor (const QString &name) | |
| QColor (const char *name) | |
| QColor (const QColor &color) | |
| QColor (Spec spec) | |
| bool | isValid () const |
| QString | name () const |
| void | setNamedColor (const QString &name) |
| Spec | spec () const |
| int | alpha () const |
| void | setAlpha (int alpha) |
| qreal | alphaF () const |
| void | setAlphaF (qreal alpha) |
| int | red () const |
| int | green () const |
| int | blue () const |
| void | setRed (int red) |
| void | setGreen (int green) |
| void | setBlue (int blue) |
| qreal | redF () const |
| qreal | greenF () const |
| qreal | blueF () const |
| void | setRedF (qreal red) |
| void | setGreenF (qreal green) |
| void | setBlueF (qreal blue) |
| void | getRgb (int *r, int *g, int *b, int *a=0) const |
| void | setRgb (int r, int g, int b, int a=255) |
| void | getRgbF (qreal *r, qreal *g, qreal *b, qreal *a=0) const |
| void | setRgbF (qreal r, qreal g, qreal b, qreal a=1.0) |
| QRgb | rgba () const |
| void | setRgba (QRgb rgba) |
| QRgb | rgb () const |
| void | setRgb (QRgb rgb) |
| int | hue () const |
| int | saturation () const |
| int | hsvHue () const |
| int | hsvSaturation () const |
| int | value () const |
| qreal | hueF () const |
| qreal | saturationF () const |
| qreal | hsvHueF () const |
| qreal | hsvSaturationF () const |
| qreal | valueF () const |
| void | getHsv (int *h, int *s, int *v, int *a=0) const |
| void | setHsv (int h, int s, int v, int a=255) |
| void | getHsvF (qreal *h, qreal *s, qreal *v, qreal *a=0) const |
| void | setHsvF (qreal h, qreal s, qreal v, qreal a=1.0) |
| int | cyan () const |
| int | magenta () const |
| int | yellow () const |
| int | black () const |
| qreal | cyanF () const |
| qreal | magentaF () const |
| qreal | yellowF () const |
| qreal | blackF () const |
| void | getCmyk (int *c, int *m, int *y, int *k, int *a=0) |
| void | setCmyk (int c, int m, int y, int k, int a=255) |
| void | getCmykF (qreal *c, qreal *m, qreal *y, qreal *k, qreal *a=0) |
| void | setCmykF (qreal c, qreal m, qreal y, qreal k, qreal a=1.0) |
| int | hslHue () const |
| int | hslSaturation () const |
| int | lightness () const |
| qreal | hslHueF () const |
| qreal | hslSaturationF () const |
| qreal | lightnessF () const |
| void | getHsl (int *h, int *s, int *l, int *a=0) const |
| void | setHsl (int h, int s, int l, int a=255) |
| void | getHslF (qreal *h, qreal *s, qreal *l, qreal *a=0) const |
| void | setHslF (qreal h, qreal s, qreal l, qreal a=1.0) |
| QColor | toRgb () const |
| QColor | toHsv () const |
| QColor | toCmyk () const |
| QColor | toHsl () const |
| QColor | convertTo (Spec colorSpec) const |
| QColor | light (int f=150) const |
| QColor | lighter (int f=150) const |
| QColor | dark (int f=200) const |
| QColor | darker (int f=200) const |
| QColor & | operator= (const QColor &) |
| QColor & | operator= (Qt::GlobalColor color) |
| bool | operator== (const QColor &c) const |
| bool | operator!= (const QColor &c) const |
| operator QVariant () const | |
Static Public Member Functions |
|
| static QStringList | colorNames () |
| static QColor | fromRgb (QRgb rgb) |
| static QColor | fromRgba (QRgb rgba) |
| static QColor | fromRgb (int r, int g, int b, int a=255) |
| static QColor | fromRgbF (qreal r, qreal g, qreal b, qreal a=1.0) |
| static QColor | fromHsv (int h, int s, int v, int a=255) |
| static QColor | fromHsvF (qreal h, qreal s, qreal v, qreal a=1.0) |
| static QColor | fromCmyk (int c, int m, int y, int k, int a=255) |
| static QColor | fromCmykF (qreal c, qreal m, qreal y, qreal k, qreal a=1.0) |
| static QColor | fromHsl (int h, int s, int l, int a=255) |
| static QColor | fromHslF (qreal h, qreal s, qreal l, qreal a=1.0) |
| static bool | isValidColor (const QString &name) |
Friends |
|
| class | QColormap |
| Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &, const QColor &) |
| Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &, QColor &) |
| enum Spec |
| QColor | ( | Qt::GlobalColor | color | ) |
| QColor | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255 |
||
| ) | [inline] |
Definition at line 288 of file qcolor.h.
{ setNamedColor(aname); }
| QColor | ( | const char * | name | ) | [inline] |
Definition at line 285 of file qcolor.h.
{ setNamedColor(QLatin1String(aname)); }
| bool isValid | ( | ) | const [inline] |
| QString name | ( | ) | const |
| void setNamedColor | ( | const QString & | name | ) |
| static QStringList colorNames | ( | ) | [static] |
| Spec spec | ( | ) | const [inline] |
| int alpha | ( | ) | const |
| void setAlpha | ( | int | alpha | ) |
| qreal alphaF | ( | ) | const |
| void setAlphaF | ( | qreal | alpha | ) |
| int red | ( | ) | const |
| int green | ( | ) | const |
| int blue | ( | ) | const |
| void setRed | ( | int | red | ) |
| void setGreen | ( | int | green | ) |
| void setBlue | ( | int | blue | ) |
| qreal redF | ( | ) | const |
| qreal greenF | ( | ) | const |
| qreal blueF | ( | ) | const |
| void setRedF | ( | qreal | red | ) |
| void setGreenF | ( | qreal | green | ) |
| void setBlueF | ( | qreal | blue | ) |
| void getRgb | ( | int * | r, |
| int * | g, | ||
| int * | b, | ||
| int * | a = 0 |
||
| ) | const |
| void setRgb | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255 |
||
| ) |
| void getRgbF | ( | qreal * | r, |
| qreal * | g, | ||
| qreal * | b, | ||
| qreal * | a = 0 |
||
| ) | const |
| void setRgbF | ( | qreal | r, |
| qreal | g, | ||
| qreal | b, | ||
| qreal | a = 1.0 |
||
| ) |
| QRgb rgba | ( | ) | const |
| void setRgba | ( | QRgb | rgba | ) |
| QRgb rgb | ( | ) | const |
| void setRgb | ( | QRgb | rgb | ) |
| int hue | ( | ) | const |
| int saturation | ( | ) | const |
| int hsvHue | ( | ) | const |
| int hsvSaturation | ( | ) | const |
| int value | ( | ) | const |
| qreal hueF | ( | ) | const |
| qreal saturationF | ( | ) | const |
| qreal hsvHueF | ( | ) | const |
| qreal hsvSaturationF | ( | ) | const |
| qreal valueF | ( | ) | const |
| void getHsv | ( | int * | h, |
| int * | s, | ||
| int * | v, | ||
| int * | a = 0 |
||
| ) | const |
| void setHsv | ( | int | h, |
| int | s, | ||
| int | v, | ||
| int | a = 255 |
||
| ) |
| void getHsvF | ( | qreal * | h, |
| qreal * | s, | ||
| qreal * | v, | ||
| qreal * | a = 0 |
||
| ) | const |
| void setHsvF | ( | qreal | h, |
| qreal | s, | ||
| qreal | v, | ||
| qreal | a = 1.0 |
||
| ) |
| int cyan | ( | ) | const |
| int magenta | ( | ) | const |
| int yellow | ( | ) | const |
| int black | ( | ) | const |
| qreal cyanF | ( | ) | const |
| qreal magentaF | ( | ) | const |
| qreal yellowF | ( | ) | const |
| qreal blackF | ( | ) | const |
| void getCmyk | ( | int * | c, |
| int * | m, | ||
| int * | y, | ||
| int * | k, | ||
| int * | a = 0 |
||
| ) |
| void setCmyk | ( | int | c, |
| int | m, | ||
| int | y, | ||
| int | k, | ||
| int | a = 255 |
||
| ) |
| void getCmykF | ( | qreal * | c, |
| qreal * | m, | ||
| qreal * | y, | ||
| qreal * | k, | ||
| qreal * | a = 0 |
||
| ) |
| void setCmykF | ( | qreal | c, |
| qreal | m, | ||
| qreal | y, | ||
| qreal | k, | ||
| qreal | a = 1.0 |
||
| ) |
| int hslHue | ( | ) | const |
| int hslSaturation | ( | ) | const |
| int lightness | ( | ) | const |
| qreal hslHueF | ( | ) | const |
| qreal hslSaturationF | ( | ) | const |
| qreal lightnessF | ( | ) | const |
| void getHsl | ( | int * | h, |
| int * | s, | ||
| int * | l, | ||
| int * | a = 0 |
||
| ) | const |
| void setHsl | ( | int | h, |
| int | s, | ||
| int | l, | ||
| int | a = 255 |
||
| ) |
| void getHslF | ( | qreal * | h, |
| qreal * | s, | ||
| qreal * | l, | ||
| qreal * | a = 0 |
||
| ) | const |
| void setHslF | ( | qreal | h, |
| qreal | s, | ||
| qreal | l, | ||
| qreal | a = 1.0 |
||
| ) |
| QColor toRgb | ( | ) | const |
| QColor toHsv | ( | ) | const |
| QColor toCmyk | ( | ) | const |
| QColor toHsl | ( | ) | const |
| static QColor fromRgb | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255 |
||
| ) | [static] |
| static QColor fromRgbF | ( | qreal | r, |
| qreal | g, | ||
| qreal | b, | ||
| qreal | a = 1.0 |
||
| ) | [static] |
| static QColor fromHsv | ( | int | h, |
| int | s, | ||
| int | v, | ||
| int | a = 255 |
||
| ) | [static] |
| static QColor fromHsvF | ( | qreal | h, |
| qreal | s, | ||
| qreal | v, | ||
| qreal | a = 1.0 |
||
| ) | [static] |
| static QColor fromCmyk | ( | int | c, |
| int | m, | ||
| int | y, | ||
| int | k, | ||
| int | a = 255 |
||
| ) | [static] |
| static QColor fromCmykF | ( | qreal | c, |
| qreal | m, | ||
| qreal | y, | ||
| qreal | k, | ||
| qreal | a = 1.0 |
||
| ) | [static] |
| static QColor fromHsl | ( | int | h, |
| int | s, | ||
| int | l, | ||
| int | a = 255 |
||
| ) | [static] |
| static QColor fromHslF | ( | qreal | h, |
| qreal | s, | ||
| qreal | l, | ||
| qreal | a = 1.0 |
||
| ) | [static] |
| QColor light | ( | int | f = 150 |
) | const |
| QColor lighter | ( | int | f = 150 |
) | const [inline] |
| QColor dark | ( | int | f = 200 |
) | const |
| QColor darker | ( | int | f = 200 |
) | const [inline] |
| QColor& operator= | ( | Qt::GlobalColor | color | ) |
| bool operator== | ( | const QColor & | c | ) | const |
| bool operator!= | ( | const QColor & | c | ) | const |
| operator QVariant | ( | ) | const |
| static bool isValidColor | ( | const QString & | name | ) | [static] |
friend class QColormap [friend] |
| Q_GUI_EXPORT QDataStream& operator<< | ( | QDataStream & | , |
| const QColor & | |||
| ) | [friend] |
| Q_GUI_EXPORT QDataStream& operator>> | ( | QDataStream & | , |
| QColor & | |||
| ) | [friend] |
| ushort alpha |
| ushort red |
| ushort green |
| ushort blue |
| ushort pad |
| struct { ... } argb |
| ushort hue |
| ushort saturation |
| ushort value |
| struct { ... } ahsv |
| ushort cyan |
| ushort magenta |
| ushort yellow |
| ushort black |
| struct { ... } acmyk |
| ushort lightness |
| struct { ... } ahsl |
| ushort array[5] |