25#include <QCoreApplication>
32#ifndef RDEFAULT_QSIZE_ICON
33#define RDEFAULT_QSIZE_ICON QSize(32,10)
72 int getCustomColorCode()
const;
73 int getColorIndex()
const;
75 static void removeColor(
const QString& cn);
76 static void addColor(
const QString& cn,
const RColor& c);
78 return createFromCadIndex(
code.toInt());
82 return createFromCadCustom(
code.toInt());
85 static RColor createFromName(
const QString& name);
87 static QList<QPair<QString, RColor> > getList(
bool onlyFixed =
false);
88 static QStringList getNameList(
bool onlyFixed =
false);
89 static QList<RColor> getColorList(
bool onlyFixed =
false);
92 unsigned long long getHash()
const;
95 QString getName()
const;
96 bool isByLayer()
const;
97 bool isByBlock()
const;
100 QColor toCompat()
const;
101 void setCompat(
const QColor& col);
103 static RColor getHighlighted(
const RColor& color,
const QColor& bgColor,
int minDist = 75);
104 static RColor getFaded(
const RColor& color,
const QColor& bgColor,
double factor = 1);
108 bool operator==(
const RColor & color)
const;
109 bool operator!=(
const RColor & color)
const;
113 isInitialized =
false;
124 static void init(
const QString& cn,
const RColor& c);
128 static QList<QPair<QString, RColor> >
list;
134 static const double cadColors[][3];
void init(void basePath)
Definition AddBlockInit.js:2
QDebug operator<<(QDebug dbg, const RBox &b)
Stream operator for QDebug.
Definition RBox.cpp:640
QCADCORE_EXPORT QDataStream & operator>>(QDataStream &stream, RColor &color)
Deserializes the given RColor object.
Definition RColor.cpp:526
#define RDEFAULT_QSIZE_ICON
Definition RColor.h:33
QPair< QString, RColor > _RPairStringRColor
Definition RColor.h:151
QCADCORE_EXPORT QDataStream & operator<<(QDataStream &stream, const RColor &color)
Serializes the given RColor object.
Definition RColor.cpp:517
Q_DECLARE_METATYPE(RMath *)
bool operator<(const RPainterPath &p1, const RPainterPath &p2)
This operator allows us to sort painter paths based on z-level.
Definition RPainterPath.cpp:765
QDataStream & operator>>(QDataStream &stream, RVector &vector)
Deserializes the given RColor object.
Definition RVector.cpp:1246
Color.
Definition RColor.h:43
static RColor createFromCadCustom(const QString &code)
Definition RColor.h:81
Mode mode
Definition RColor.h:131
static bool isInitialized
Definition RColor.h:127
Mode
Definition RColor.h:53
@ Fixed
Definition RColor.h:54
@ ByBlock
Definition RColor.h:54
static QColor CompatByLayer
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RColor.h:119
Q_DECLARE_TR_FUNCTIONS(RColor)
static QList< QPair< QString, RColor > > list
Definition RColor.h:128
static QMap< QPair< RColor, QPair< int, int > >, QIcon > iconMap
Definition RColor.h:129
static QColor CompatByBlock
Definition RColor.h:120
static void reinit()
Definition RColor.h:112
static RColor createFromCadIndex(const QString &code)
Definition RColor.h:77
#define QCADCORE_EXPORT
Definition core_global.h:10