6#ifndef SWIFT_MISC_RGBCOLOR_H
7#define SWIFT_MISC_RGBCOLOR_H
32 IndexRed = swift::misc::CPropertyIndexRef::GlobalIndexCRgbColor,
132 double colorRange()
const;
134 static QString intToHex(
int h,
int digits = 2);
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
QString blueHex(int digits=2) const
Blue as hex.
ColumnIndex
Properties by index.
double normalizedBlue() const
Blue 0..1.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
QString hex(bool withHash=false) const
Hex value.
void setInvalid()
Mark as invalid.
QPixmap toPixmap() const
Icon as pixmap.
QColor toQColor() const
To QColor.
bool setQColor(const QColor &color)
Set by QColor.
QString convertToQString(bool i18n=false) const
Cast as QString.
int packed() const
Value packed in 24 bit integer.
static CRgbColor fromPacked(int rgb)
Construct from packed 24 bit integer value.
double normalizedRed() const
Red 0..1.
double colorDistance(const CRgbColor &color) const
Color distance [0..1] http://stackoverflow.com/questions/4754506/color-similarity-distance-in-rgba-co...
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
void setByString(const QString &color, bool isName=false)
Hex or color name.
int comparePropertyByIndex(CPropertyIndexRef index, const CRgbColor &compareValue) const
Compare for index.
double normalizedGreen() const
Green 0..1.
QString redHex(int digits=2) const
Red as hex.
CRgbColor()=default
Constructor.
int compare(const CRgbColor &color) const
Compare with other color.
QString greenHex(int digits=2) const
Green as hex.
CIcons::IconIndex toIcon() const
Representing icon.
bool isValid() const
Valid?
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...