]> Shamusworld >> Repos - architektonas/blobdiff - src/forms/dlghatch.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / forms / dlghatch.cpp
index fa634d1790bc31d9c1feae51e861559ad8f7386b..514c32415966eb10680a16296048b6a33d4981d0 100644 (file)
@@ -31,7 +31,7 @@ DlgHatch::DlgHatch(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/):
        hatch = NULL;
        isNew = false;
 
-       preview = new RS_EntityContainer();
+       preview = new EntityContainer();
        ui.gvPreview->setContainer(preview);
        ui.gvPreview->setBorders(15, 15, 15, 15);
 
@@ -67,7 +67,7 @@ void DlgHatch::showEvent(QShowEvent * e)
        ui.gvPreview->zoomAuto();
 }
 
-void DlgHatch::setHatch(RS_Hatch & h, bool isNew)
+void DlgHatch::setHatch(Hatch & h, bool isNew)
 {
        hatch = &h;
        this->isNew = isNew;
@@ -101,7 +101,7 @@ void DlgHatch::setHatch(RS_Hatch & h, bool isNew)
                QString s;
                s.setNum(hatch->getScale());
                ui.leScale->setText(s);
-               s.setNum(RS_Math::rad2deg(hatch->getAngle()));
+               s.setNum(Math::rad2deg(hatch->getAngle()));
                ui.leAngle->setText(s);
        }
 }
@@ -113,13 +113,13 @@ void DlgHatch::updateHatch()
 
        hatch->setSolid(ui.cbSolid->isChecked());
        hatch->setPattern(ui.cbPattern->currentText());
-       hatch->setScale(RS_Math::eval(ui.leScale->text()));
-       hatch->setAngle(RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text())));
+       hatch->setScale(Math::eval(ui.leScale->text()));
+       hatch->setAngle(Math::deg2rad(Math::eval(ui.leAngle->text())));
 }
 
 void DlgHatch::setPattern(const QString & p)
 {
-       if (!RS_PATTERNLIST->contains(p))
+       if (!PATTERNLIST->contains(p))
 //             ui.cbPattern->insertItem(p);
                ui.cbPattern->addItem(p);
 
@@ -138,7 +138,7 @@ void DlgHatch::updatePreview()
        updatePreview(NULL);
 }
 
-void DlgHatch::updatePreview(RS_Pattern *)
+void DlgHatch::updatePreview(Pattern *)
 {
        if (!preview)
                return;
@@ -153,8 +153,8 @@ void DlgHatch::updatePreview(RS_Pattern *)
        QString patName = ui.cbPattern->currentText();
        bool isSolid = ui.cbSolid->isChecked();
        double prevSize;
-       //double scale = RS_Math::eval(leScale->text(), 1.0);
-       double angle = RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text(), 0.0));
+       //double scale = Math::eval(leScale->text(), 1.0);
+       double angle = Math::deg2rad(Math::eval(ui.leAngle->text(), 0.0));
 
        if (pattern != NULL)
                prevSize = pattern->getSize().x * 10;
@@ -163,15 +163,15 @@ void DlgHatch::updatePreview(RS_Pattern *)
 
        preview->clear();
 
-       RS_Hatch * prevHatch = new RS_Hatch(preview, RS_HatchData(isSolid, 0.2, angle, patName));
+       Hatch * prevHatch = new Hatch(preview, HatchData(isSolid, 0.2, angle, patName));
        prevHatch->setPen(hatch->getPen());
 
-       RS_EntityContainer * loop = new RS_EntityContainer(prevHatch);
-       loop->setPen(RS_Pen(RS2::FlagInvalid));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(0.0, 0.0), Vector(10.0, 0.0))));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(10.0, 0.0), Vector(10.0, 10.0))));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(10.0, 10.0), Vector(0.0, 10.0))));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(0.0, 10.0), Vector(0.0, 0.0))));
+       EntityContainer * loop = new EntityContainer(prevHatch);
+       loop->setPen(Pen(RS2::FlagInvalid));
+       loop->addEntity(new Line(loop, LineData(Vector(0.0, 0.0), Vector(10.0, 0.0))));
+       loop->addEntity(new Line(loop, LineData(Vector(10.0, 0.0), Vector(10.0, 10.0))));
+       loop->addEntity(new Line(loop, LineData(Vector(10.0, 10.0), Vector(0.0, 10.0))));
+       loop->addEntity(new Line(loop, LineData(Vector(0.0, 10.0), Vector(0.0, 0.0))));
        prevHatch->addEntity(loop);
        preview->addEntity(prevHatch);