src/colors.h

changeset 1174
91696a2e022c
parent 1114
ffd49a28f49e
child 1269
ec691d9472b3
equal deleted inserted replaced
1173:6cd85b28f43b 1174:91696a2e022c
53 class LDColor 53 class LDColor
54 { 54 {
55 public: 55 public:
56 LDColor(); 56 LDColor();
57 LDColor(qint32 index); 57 LDColor(qint32 index);
58 LDColor(QColor color, bool transparent = false);
58 LDColor(const LDColor& other) = default; 59 LDColor(const LDColor& other) = default;
59 60
60 bool isLDConfigColor() const; 61 bool isLDConfigColor() const;
61 bool isValid() const; 62 bool isValid() const;
62 QString name() const; 63 QString name() const;
66 qint32 index() const; 67 qint32 index() const;
67 bool isDirect() const; 68 bool isDirect() const;
68 QString indexString() const; 69 QString indexString() const;
69 70
70 static const LDColor nullColor; 71 static const LDColor nullColor;
72 static qint32 directColorIndex(QColor color, bool transparent = false);
71 static void initColors(); 73 static void initColors();
72 74
73 LDColor& operator=(qint32 index) { m_index = index; return *this; } 75 LDColor& operator=(qint32 index) { m_index = index; return *this; }
74 LDColor& operator=(const LDColor &other) = default; 76 LDColor& operator=(const LDColor &other) = default;
75 LDColor operator++() { return ++m_index; } 77 LDColor operator++() { return ++m_index; }

mercurial