X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fcolor.cpp;h=7e049cac5e6f4958a1035854bdc16811bbf834dc;hb=2ee84c5948ede7fc2f7b4435c5edef42a030ac05;hp=82d8a1f731b5b11445b5314c9355567161044d66;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/base/color.cpp b/src/base/color.cpp index 82d8a1f..7e049ca 100644 --- a/src/base/color.cpp +++ b/src/base/color.cpp @@ -16,48 +16,48 @@ #include "color.h" -#include "rs.h" +#include "enums.h" -RS_Color::RS_Color(): QColor(), RS_Flags() +Color::Color(): QColor(), Flags() { } -RS_Color::RS_Color(int r, int g, int b): QColor(r, g, b), RS_Flags() +Color::Color(int r, int g, int b): QColor(r, g, b), Flags() { } -RS_Color::RS_Color(const QColor & c): QColor(c), RS_Flags() +Color::Color(const QColor & c): QColor(c), Flags() { } -RS_Color::RS_Color(const RS_Color & c): QColor(c), RS_Flags() +Color::Color(const Color & c): QColor(c), Flags() { setFlags(c.getFlags()); } -RS_Color::RS_Color(unsigned int f): QColor(), RS_Flags(f) +Color::Color(unsigned int f): QColor(), Flags(f) { } /** @return A copy of this color without flags. */ -RS_Color RS_Color::stripFlags() const +Color Color::stripFlags() const { - return RS_Color(red(), green(), blue()); + return Color(red(), green(), blue()); } /** @return true if the color is defined by layer. */ -bool RS_Color::isByLayer() const +bool Color::isByLayer() const { return getFlag(RS2::FlagByLayer); } /** @return true if the color is defined by block. */ -bool RS_Color::isByBlock() const +bool Color::isByBlock() const { return getFlag(RS2::FlagByBlock); } -RS_Color & RS_Color::operator=(const RS_Color & c) +Color & Color::operator=(const Color & c) { setRgb(c.red(), c.green(), c.blue()); setFlags(c.getFlags()); @@ -65,20 +65,20 @@ RS_Color & RS_Color::operator=(const RS_Color & c) return *this; } -bool RS_Color::operator==(const RS_Color & c) const +bool Color::operator==(const Color & c) const { return (red() == c.red() && green() == c.green() && blue() == c.blue() && getFlags() == c.getFlags()); } #if 0 -bool RS_Color::operator==(const QColor & c) const +bool Color::operator==(const QColor & c) const { return (red() == c.red() && green() == c.green() && blue() == c.blue()); } #endif -/*friend*/ std::ostream & operator<<(std::ostream & os, const RS_Color & c) +/*friend*/ std::ostream & operator<<(std::ostream & os, const Color & c) { os << " color: " << c.name().toLatin1().data() << " flags: " << (c.getFlag(RS2::FlagByLayer) ? "RS2::FlagByLayer " : "")