diff -r 1de2b8d64e9f -r 98906a94732f src/colors.h --- a/src/colors.h Tue Jan 28 23:34:49 2020 +0200 +++ b/src/colors.h Thu Jan 30 19:20:11 2020 +0200 @@ -20,12 +20,18 @@ #include #include "main.h" -struct Color +namespace ldraw +{ + struct Color; + class ColorTable; +} + +struct ldraw::Color { qint32 index; }; -class ColorTable +class ldraw::ColorTable { public: struct ColorDefinition @@ -43,37 +49,37 @@ QMap definitions; }; -inline bool operator==(const Color& one, const Color& other) +inline bool operator==(const ldraw::Color& one, const ldraw::Color& other) { return one.index == other.index; } -inline bool operator!=(const Color& one, const Color& other) +inline bool operator!=(const ldraw::Color& one, const ldraw::Color& other) { return one.index != other.index; } -inline bool operator<(const Color& one, const Color& other) +inline bool operator<(const ldraw::Color& one, const ldraw::Color& other) { return one.index < other.index; } -inline bool operator<=(const Color& one, const Color& other) +inline bool operator<=(const ldraw::Color& one, const ldraw::Color& other) { return one.index <= other.index; } -inline bool operator>(const Color& one, const Color& other) +inline bool operator>(const ldraw::Color& one, const ldraw::Color& other) { return one.index > other.index; } -inline bool operator>=(const Color& one, const Color& other) +inline bool operator>=(const ldraw::Color& one, const ldraw::Color& other) { return one.index >= other.index; } -namespace colors +namespace ldraw { static constexpr Color black {0}; static constexpr Color blue {1}; @@ -81,6 +87,6 @@ static constexpr Color red {4}; static constexpr Color yellow {14}; static constexpr Color white {15}; - static constexpr Color main {16}; - static constexpr Color edge {24}; + static constexpr Color mainColor {16}; + static constexpr Color edgeColor {24}; }