]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/colorbox.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / widgets / colorbox.cpp
index 6be82573e72367521f86b4b4d0619e262c6b0e24..f1377b83c31d7f1c247ee41a96617e325e7f3f0b 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "colorbox.h"
 
-#include "rs.h"
+#include "enums.h"
 
 /**
  * Default Constructor. You must call init manually if you choose
@@ -50,7 +50,7 @@ ColorBox::~ColorBox()
 {
 }
 
-RS_Color ColorBox::getColor()
+Color ColorBox::getColor()
 {
        return currentColor;
 }
@@ -119,13 +119,13 @@ bool ColorBox::isUnchanged()
 /**
  * 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;
 
@@ -133,24 +133,24 @@ Look at Red: Have to convert them all to RS_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);
@@ -163,7 +163,7 @@ Look at Red: Have to convert them all to RS_Color...
  * 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)
        {
@@ -217,10 +217,10 @@ void ColorBox::slotColorChanged(int index)
                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;