#include "colorbox.h"
-#include "rs.h"
+#include "enums.h"
/**
* Default Constructor. You must call init manually if you choose
{
}
-RS_Color ColorBox::getColor()
+Color ColorBox::getColor()
{
return currentColor;
}
/**
* Sets the color shown in the combobox to the given color.
*/
-void ColorBox::setColor(const RS_Color & color)
+void ColorBox::setColor(const Color & color)
{
//#warning "!!! Color is being misreported here !!!"
/*
-And fuck. Probably because the operator== in RS_Color doesn't know how to
+And fuck. Probably because the operator== in Color doesn't know how to
convert between Qt:: style colors and RGB. Either way, have to fix this shit
-Look at Red: Have to convert them all to RS_Color...
+Look at Red: Have to convert them all to Color...
*/
currentColor = color;
setCurrentIndex(0);
else if (color.isByBlock() && showByLayer)
setCurrentIndex(1);
- else if (color == RS_Color(255, 0, 0)) //Qt::red)
+ else if (color == Color(255, 0, 0)) //Qt::red)
setCurrentIndex(0 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(255, 255, 0)) //Qt::yellow)
+ else if (color == Color(255, 255, 0)) //Qt::yellow)
setCurrentIndex(1 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(0, 255, 0)) //Qt::green)
+ else if (color == Color(0, 255, 0)) //Qt::green)
setCurrentIndex(2 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(0, 255, 255)) //Qt::cyan)
+ else if (color == Color(0, 255, 255)) //Qt::cyan)
setCurrentIndex(3 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(0, 0, 255)) //Qt::blue)
+ else if (color == Color(0, 0, 255)) //Qt::blue)
setCurrentIndex(4 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(255, 0, 255)) //Qt::magenta)
+ else if (color == Color(255, 0, 255)) //Qt::magenta)
setCurrentIndex(5 + (int)showByLayer * 2 + (int)showUnchanged);
// else if (color == Qt::white || color == Qt::black)
- else if (color == RS_Color(255, 255, 255) || color == RS_Color(0, 0, 0))
+ else if (color == Color(255, 255, 255) || color == Color(0, 0, 0))
setCurrentIndex(6 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(127, 127, 127)) //Qt::gray)
+ else if (color == Color(127, 127, 127)) //Qt::gray)
setCurrentIndex(7 + (int)showByLayer * 2 + (int)showUnchanged);
- else if (color == RS_Color(191, 191, 191))
+ else if (color == Color(191, 191, 191))
setCurrentIndex(8 + (int)showByLayer * 2 + (int)showUnchanged);
else
setCurrentIndex(9 + (int)showByLayer * 2 + (int)showUnchanged);
* Sets the color of the pixmap next to the "By Layer" item
* to the given color.
*/
-void ColorBox::setLayerColor(const RS_Color & color)
+void ColorBox::setLayerColor(const Color & color)
{
if (showByLayer)
{
switch (index - (int)showUnchanged)
{
case 0:
- currentColor = RS_Color(RS2::FlagByLayer);
+ currentColor = Color(RS2::FlagByLayer);
break;
case 1:
- currentColor = RS_Color(RS2::FlagByBlock);
+ currentColor = Color(RS2::FlagByBlock);
break;
default:
break;