|
QCAD Application Framework
CAD Application Development and Automation.
|
Color. More...
#include <RColor.h>
Public Types | |
| enum | Mode { ByLayer, ByBlock, Fixed } |
Public Member Functions | |
| int | getColorIndex () const |
| int | getCustomColorCode () const |
| unsigned long long | getHash () const |
| QString | getName () const |
| bool | isByBlock () const |
| bool | isByLayer () const |
| bool | isFixed () const |
| bool | isValid () const |
| bool | operator!= (const RColor &color) const |
| bool | operator< (const RColor &color) const |
| bool | operator== (const RColor &color) const |
| RColor () | |
| Constructs an invalid color with the fixed RGB value (0, 0, 0). | |
| RColor (int r, int g, int b, int a=255, RColor::Mode mode=RColor::Fixed) | |
| RColor (RColor::Mode mode) | |
| RColor (const QString &name, RColor::Mode mode=RColor::Fixed) | |
| RColor (Qt::GlobalColor color, RColor::Mode mode=RColor::Fixed) | |
| RColor (const QColor &color, RColor::Mode mode=RColor::Fixed) | |
| QColor | toCompat () const |
Static Public Member Functions | |
| static RColor | createFromCadCustom (const QString &code) |
| static RColor | createFromCadCustom (int code) |
| Creates a color from the given CAD code (RGB encoded int). | |
| static RColor | createFromCadIndex (const QString &code) |
| static RColor | createFromCadIndex (int code) |
| Creates a color from the given CAD code (index 0...256). | |
| static RColor | createFromName (const QString &name) |
| static RColor | getHighlighted (const RColor &color, const QColor &bgColor) |
| static QIcon | getIcon (const RColor &color, const QSize &size=RDEFAULT_QSIZE_ICON) |
| static QList< QPair< QString, RColor > > | getList (bool onlyFixed=false) |
Static Public Attributes | |
| static QColor | CompatByBlock = QColor(2,2,2) |
| static QColor | CompatByLayer = QColor(1,1,1) |
Private Member Functions | |
| Q_DECLARE_TR_FUNCTIONS (RColor) | |
Static Private Member Functions | |
| static void | init () |
| static void | init (const QString &cn, const RColor &c) |
Private Attributes | |
| Mode | mode |
Static Private Attributes | |
| static const double | cadColors [][3] |
| static QMap< RColor, QIcon > | iconMap |
| static bool | isInitialized = false |
| static QList< QPair< QString, RColor > > | list |
Friends | |
| QDataStream & | operator<< (QDataStream &stream, const RColor &color) |
| Serializes the given RColor object. | |
| QDataStream & | operator>> (QDataStream &stream, RColor &color) |
| Deserializes the given RColor object. | |
Color.
Fixed RGBA or ByLayer or ByBlock.
| enum RColor::Mode |
| RColor::RColor | ( | ) |
Constructs an invalid color with the fixed RGB value (0, 0, 0).
| RColor::RColor | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255, |
||
| RColor::Mode | mode = RColor::Fixed |
||
| ) |
| RColor::RColor | ( | RColor::Mode | mode | ) |
| RColor::RColor | ( | const QString & | name, |
| RColor::Mode | mode = RColor::Fixed |
||
| ) |
| RColor::RColor | ( | Qt::GlobalColor | color, |
| RColor::Mode | mode = RColor::Fixed |
||
| ) |
\par Non-Scriptable:
This function is not available in script environments.
| RColor::RColor | ( | const QColor & | color, |
| RColor::Mode | mode = RColor::Fixed |
||
| ) |
\par Non-Scriptable:
This function is not available in script environments.
|
inlinestatic |
|
static |
Creates a color from the given CAD code (RGB encoded int).
|
inlinestatic |
|
static |
Creates a color from the given CAD code (index 0...256).
|
static |
| int RColor::getColorIndex | ( | ) | const |
| int RColor::getCustomColorCode | ( | ) | const |
| unsigned long long RColor::getHash | ( | ) | const |
|
static |
|
static |
| onlyFixed | Only fixed colors, not ByLayer, ByBlock, ... |
| QString RColor::getName | ( | ) | const |
|
staticprivate |
|
staticprivate |
| bool RColor::isByBlock | ( | ) | const |
| bool RColor::isByLayer | ( | ) | const |
| bool RColor::isFixed | ( | ) | const |
| bool RColor::isValid | ( | ) | const |
| bool RColor::operator!= | ( | const RColor & | color | ) | const |
| bool RColor::operator< | ( | const RColor & | color | ) | const |
| bool RColor::operator== | ( | const RColor & | color | ) | const |
|
private |
| QColor RColor::toCompat | ( | ) | const |
|
friend |
|
friend |
Deserializes the given RColor object.
|
staticprivate |
|
static |
|
static |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |