kdeui
KColor Class Reference
A color class that preserves both RGB and HSV values. More...
#include <kcolordialog.h>
Public Member Functions | |
void | hsv (int *_h, int *_s, int *_v) const |
KColor (const QColor &col) | |
KColor (const KColor &col) | |
KColor () | |
KColor & | operator= (const KColor &col) |
bool | operator== (const KColor &col) const |
void | rgb (int *_r, int *_g, int *_b) const |
void | setHsv (int _h, int _s, int _v) |
void | setRgb (int _r, int _g, int _b) |
Protected Attributes | |
int | b |
int | g |
int | h |
int | r |
int | s |
int | v |
Detailed Description
A color class that preserves both RGB and HSV values.This is unlike QColor which only preserves RGB values and recalculates HSV values. The QColor behavior leads to an accumulation of rounding errors when working in the HSV color space.
Definition at line 164 of file kcolordialog.h.
Constructor & Destructor Documentation
KColor::KColor | ( | ) |
Definition at line 116 of file kcolordialog.cpp.
KColor::KColor | ( | const KColor & | col | ) |
Definition at line 122 of file kcolordialog.cpp.
KColor::KColor | ( | const QColor & | col | ) |
Definition at line 129 of file kcolordialog.cpp.
Member Function Documentation
void KColor::hsv | ( | int * | _h, | |
int * | _s, | |||
int * | _v | |||
) | const |
Definition at line 173 of file kcolordialog.cpp.
Definition at line 142 of file kcolordialog.cpp.
bool KColor::operator== | ( | const KColor & | col | ) | const |
Definition at line 136 of file kcolordialog.cpp.
void KColor::rgb | ( | int * | _r, | |
int * | _g, | |||
int * | _b | |||
) | const |
Definition at line 167 of file kcolordialog.cpp.
void KColor::setHsv | ( | int | _h, | |
int | _s, | |||
int | _v | |||
) |
void KColor::setRgb | ( | int | _r, | |
int | _g, | |||
int | _b | |||
) |
Member Data Documentation
int KColor::b [protected] |
Definition at line 186 of file kcolordialog.h.
int KColor::g [protected] |
Definition at line 185 of file kcolordialog.h.
int KColor::h [protected] |
Definition at line 181 of file kcolordialog.h.
int KColor::r [protected] |
Definition at line 184 of file kcolordialog.h.
int KColor::s [protected] |
Definition at line 182 of file kcolordialog.h.
int KColor::v [protected] |
Definition at line 183 of file kcolordialog.h.
The documentation for this class was generated from the following files: