]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/widthbox.cpp
Bugfixes related to removing Snapper class.
[architektonas] / src / widgets / widthbox.cpp
index da3336dda2d7da26db10ff8ba8b8413fc2da181b..e18461a2d27d895cef8a4e1c2956a862755db210 100644 (file)
 
 #include "widthbox.h"
 
-#include "rs_debug.h"
+#include "debug.h"
 
 /**
  * Default Constructor. You must call init manually if you choose
  * to use this constructor.
  */
-QG_WidthBox::QG_WidthBox(QWidget * parent, const char */*name*/): QComboBox(parent)
+WidthBox::WidthBox(QWidget * parent, const char */*name*/): QComboBox(parent)
 {
     showByLayer = false;
     showUnchanged = false;
@@ -34,7 +34,7 @@ QG_WidthBox::QG_WidthBox(QWidget * parent, const char */*name*/): QComboBox(pare
  *
  * @param showByLayer true: Show attributes ByLayer, ByBlock
  */
-QG_WidthBox::QG_WidthBox(bool showByLayer, bool showUnchanged, QWidget * parent, const char */*name*/):
+WidthBox::WidthBox(bool showByLayer, bool showUnchanged, QWidget * parent, const char */*name*/):
        QComboBox(parent)
 {
     init(showByLayer, showUnchanged);
@@ -43,7 +43,7 @@ QG_WidthBox::QG_WidthBox(bool showByLayer, bool showUnchanged, QWidget * parent,
 /**
  * Destructor
  */
-QG_WidthBox::~QG_WidthBox()
+WidthBox::~WidthBox()
 {
 }
 
@@ -53,7 +53,7 @@ QG_WidthBox::~QG_WidthBox()
  *
  * @param showByLayer true: Show attributes ByLayer, ByBlock
  */
-void QG_WidthBox::init(bool showByLayer, bool showUnchanged)
+void WidthBox::init(bool showByLayer, bool showUnchanged)
 {
        this->showByLayer = showByLayer;
        this->showUnchanged = showUnchanged;
@@ -97,7 +97,7 @@ void QG_WidthBox::init(bool showByLayer, bool showUnchanged)
        slotWidthChanged(currentIndex());
 }
 
-RS2::LineWidth QG_WidthBox::getWidth()
+RS2::LineWidth WidthBox::getWidth()
 {
        return currentWidth;
 }
@@ -105,9 +105,9 @@ RS2::LineWidth QG_WidthBox::getWidth()
 /**
  * Sets the currently selected width item to the given width.
  */
-void QG_WidthBox::setWidth(RS2::LineWidth w)
+void WidthBox::setWidth(RS2::LineWidth w)
 {
-       RS_DEBUG->print("QG_WidthBox::setWidth %d\n", (int)w);
+       DEBUG->print("WidthBox::setWidth %d\n", (int)w);
        int offset = (int)showByLayer * 2 + (int)showUnchanged;
 
        switch (w)
@@ -116,13 +116,13 @@ void QG_WidthBox::setWidth(RS2::LineWidth w)
                if (showByLayer)
                        setCurrentIndex(0 + (int)showUnchanged);
                else
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "QG_WidthBox::setWidth: Unsupported width.");
+                       DEBUG->print(Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
                break;
        case RS2::WidthByBlock:
                if (showByLayer)
                        setCurrentIndex(1 + (int)showUnchanged);
                else
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "QG_WidthBox::setWidth: Unsupported width.");
+                       DEBUG->print(Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
                break;
        case RS2::WidthDefault:
                setCurrentIndex(0 + offset);
@@ -209,7 +209,7 @@ void QG_WidthBox::setWidth(RS2::LineWidth w)
 /**
  * Sets the pixmap showing the width of the "By Layer" item.
  */
-void QG_WidthBox::setLayerWidth(RS2::LineWidth w)
+void WidthBox::setLayerWidth(RS2::LineWidth w)
 {
        if (showByLayer)
        {
@@ -279,7 +279,7 @@ void QG_WidthBox::setLayerWidth(RS2::LineWidth w)
        }
 }
 
-bool QG_WidthBox::isUnchanged()
+bool WidthBox::isUnchanged()
 {
        return unchanged;
 }
@@ -290,9 +290,9 @@ bool QG_WidthBox::isUnchanged()
  * offers a dialog to the user that allows him/ her to
  * choose an individual width.
  */
-void QG_WidthBox::slotWidthChanged(int index)
+void WidthBox::slotWidthChanged(int index)
 {
-       RS_DEBUG->print("QG_WidthBox::slotWidthChanged %d\n", index);
+       DEBUG->print("WidthBox::slotWidthChanged %d\n", index);
 
        bool done = false;
 
@@ -407,7 +407,7 @@ void QG_WidthBox::slotWidthChanged(int index)
        //currentWidth = (RS2::LineWidth)(currentText().left(4).toDouble()*100);
        //}
 
-       RS_DEBUG->print("Current width is (%d): %d\n", index, ((int)currentWidth));
+       DEBUG->print("Current width is (%d): %d\n", index, ((int)currentWidth));
 
        emit widthChanged(currentWidth);
 }