#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());
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 " : "")