diff -r 6fe24fd945c0 -r 164f53fb5921 src/colors.h --- a/src/colors.h Mon Aug 24 23:02:30 2020 +0300 +++ b/src/colors.h Mon Sep 21 19:48:18 2020 +0300 @@ -24,6 +24,10 @@ { struct Color; class ColorTable; + Color directColor(const QColor& color); + bool isDirectColor(Color color); + QColor directColorFace(Color color); + QColor colorFace(Color color, const ColorTable& colorTable); } struct ldraw::Color @@ -41,14 +45,18 @@ QColor faceColor; QColor edgeColor; QString name; + QString displayName; }; void clear(); Result load(QIODevice& device, QTextStream& errors); const ColorDefinition& operator[](Color index) const; static const ColorDefinition unknownColor; + auto begin() const { return this->definitions.begin(); } + auto end() const { return this->definitions.end(); } + int size() const { return this->definitions.size(); } private: void loadColorFromString(const QString& string); - QMap definitions; + std::map definitions; }; namespace ldraw