]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/layerbox.cpp
In the middle of chasing down MDI not activating bug, renaming of Graphic to
[architektonas] / src / widgets / layerbox.cpp
index d8a8797d35e74e6e07fa080d7204954c3b0eb4c1..5326f803ed85f4fab8464b079583fece2ba4ca6c 100644 (file)
 
 #include "layerbox.h"
 
-#include "rs_layer.h"
-#include "rs_layerlist.h"
+#include "layer.h"
+#include "layerlist.h"
 
 /**
- * Default Constructor. You must call init manually before using
- * this class.
+ * Default Constructor. You must call init manually before using this class.
  */
-QG_LayerBox::QG_LayerBox(QWidget * parent, const char */*name*/): QComboBox(parent)
+LayerBox::LayerBox(QWidget * parent, const char */*name*/): QComboBox(parent)
 {
        showByBlock = false;
        showUnchanged = false;
@@ -35,39 +34,36 @@ QG_LayerBox::QG_LayerBox(QWidget * parent, const char */*name*/): QComboBox(pare
 /**
  * Destructor
  */
-QG_LayerBox::~QG_LayerBox()
+LayerBox::~LayerBox()
 {
 }
 
-RS_Layer * QG_LayerBox::getLayer()
+Layer * LayerBox::getLayer()
 {
        return currentLayer;
 }
 
 /**
- * Initialisation (called manually only once).
+ * Initialization (called manually only once).
  *
- * @param layerList Layer list which provides the layer names that are
- *                  available.
+ * @param layerList Layer list which provides the layer names that are available.
  * @param showByBlock true: Show attribute ByBlock.
  */
-void QG_LayerBox::init(RS_LayerList & layerList, bool showByBlock, bool showUnchanged)
+void LayerBox::init(LayerList & layerList, bool showByBlock, bool showUnchanged)
 {
        this->showByBlock = showByBlock;
        this->showUnchanged = showUnchanged;
        this->layerList = &layerList;
 
        if (showUnchanged)
-//             insertItem(tr("- Unchanged -"));
                addItem(tr("- Unchanged -"));
 
        for(uint i=0; i<layerList.count(); ++i)
        {
-               RS_Layer * lay = layerList.at(i);
+               Layer * currentLayer = layerList.at(i);
 
-               if (lay != NULL && (lay->getName() != "ByBlock" || showByBlock))
-//                     insertItem(lay->getName());
-                       addItem(lay->getName());
+               if (currentLayer != NULL && (currentLayer->getName() != "ByBlock" || showByBlock))
+                       addItem(currentLayer->getName());
        }
 
        connect(this, SIGNAL(activated(int)), this, SLOT(slotLayerChanged(int)));
@@ -78,7 +74,7 @@ void QG_LayerBox::init(RS_LayerList & layerList, bool showByBlock, bool showUnch
 /**
  * Sets the layer shown in the combobox to the given layer.
  */
-void QG_LayerBox::setLayer(RS_Layer & layer)
+void LayerBox::setLayer(Layer & layer)
 {
        currentLayer = &layer;
 
@@ -98,7 +94,7 @@ void QG_LayerBox::setLayer(RS_Layer & layer)
 /**
  * Sets the layer shown in the combobox to the given layer.
  */
-void QG_LayerBox::setLayer(QString & layer)
+void LayerBox::setLayer(QString & layer)
 {
     //if (layer.getName()=="ByBlock" && showByBlock) {
     //    setCurrentItem(0);
@@ -112,18 +108,17 @@ void QG_LayerBox::setLayer(QString & layer)
     //}
 }
 
-bool QG_LayerBox::isUnchanged()
+bool LayerBox::isUnchanged()
 {
        return unchanged;
 }
 
 /**
- * Called when the color has changed. This method
- * sets the current color to the value chosen or even
- * offers a dialog to the user that allows him/ her to
+ * Called when the color has changed. This method sets the current color to
+ * the value chosen or even offers a dialog to the user that allows him/her to
  * choose an individual color.
  */
-void QG_LayerBox::slotLayerChanged(int index)
+void LayerBox::slotLayerChanged(int index)
 {
        //currentLayer.resetFlags();