]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/widthbox.cpp
First steps in fixing/cleaning up preview/snapper rendering.
[architektonas] / src / widgets / widthbox.cpp
index da3336dda2d7da26db10ff8ba8b8413fc2da181b..3af0de38fc761d2faf9de5fe7cb3778a17661a13 100644 (file)
@@ -21,7 +21,7 @@
  * 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);
+       RS_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.");
+                       RS_DEBUG->print(RS_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.");
+                       RS_DEBUG->print(RS_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);
+       RS_DEBUG->print("WidthBox::slotWidthChanged %d\n", index);
 
        bool done = false;