]> Shamusworld >> Repos - architektonas/blobdiff - src/mainapp/graphicview.cpp
In the middle of chasing down MDI not activating bug, renaming of Graphic to
[architektonas] / src / mainapp / graphicview.cpp
index d29de4a7817b81689bea7c7d3cd50ad7991bfe3d..8fe4e84120863f3a2abe61731d46331661beb0a2 100644 (file)
@@ -113,9 +113,9 @@ void GraphicView::cleanUp()
  * connected to this view is a graphic and valid.
  * NULL otherwise.
  */
-Drawing * GraphicView::getGraphic()
+Drawing * GraphicView::GetDrawing()
 {
-       if (container && container->rtti() == RS2::EntityGraphic)
+       if (container && container->rtti() == RS2::EntityDrawing)
                return (Drawing *)container;
 
        return NULL;
@@ -376,7 +376,7 @@ bool GraphicView::isGridOn()
 {
        if (container)
        {
-               Drawing * d = container->getGraphic();
+               Drawing * d = container->GetDrawing();
 
                if (d)
                        return d->isGridOn();
@@ -530,7 +530,7 @@ void GraphicView::enter()
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about mouse events.
  */
-void GraphicView::mousePressEvent(QMouseEvent * e)
+void GraphicView::_mousePressEvent(QMouseEvent * e)
 {
        if (eventHandler)
                eventHandler->MousePressEvent(e);
@@ -540,7 +540,7 @@ void GraphicView::mousePressEvent(QMouseEvent * e)
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about mouse events.
  */
-void GraphicView::mouseReleaseEvent(QMouseEvent * e)
+void GraphicView::_mouseReleaseEvent(QMouseEvent * e)
 {
        DEBUG->print("GraphicView::mouseReleaseEvent");
 
@@ -564,13 +564,13 @@ void GraphicView::mouseReleaseEvent(QMouseEvent * e)
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about mouse events.
  */
-void GraphicView::mouseMoveEvent(QMouseEvent * e)
+void GraphicView::_mouseMoveEvent(QMouseEvent * e)
 {
        DEBUG->print("GraphicView::mouseMoveEvent begin");
 
        Drawing * drawing = NULL;
 
-       if (container->rtti() == RS2::EntityGraphic)
+       if (container->rtti() == RS2::EntityDrawing)
                drawing = (Drawing *)container;
 
        DEBUG->print("GraphicView::mouseMoveEvent 001");
@@ -605,7 +605,7 @@ void GraphicView::mouseMoveEvent(QMouseEvent * e)
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about mouse events.
  */
-void GraphicView::mouseLeaveEvent()
+void GraphicView::_mouseLeaveEvent()
 {
        if (eventHandler)
                eventHandler->MouseLeaveEvent();
@@ -615,7 +615,7 @@ void GraphicView::mouseLeaveEvent()
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about mouse events.
  */
-void GraphicView::mouseEnterEvent()
+void GraphicView::_mouseEnterEvent()
 {
        if (eventHandler)
                eventHandler->MouseEnterEvent();
@@ -625,7 +625,7 @@ void GraphicView::mouseEnterEvent()
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about key events.
  */
-void GraphicView::keyPressEvent(QKeyEvent * e)
+void GraphicView::_keyPressEvent(QKeyEvent * e)
 {
        if (eventHandler)
                eventHandler->KeyPressEvent(e);
@@ -635,7 +635,7 @@ void GraphicView::keyPressEvent(QKeyEvent * e)
  * Called by the actual GUI class which implements the GraphicView
  * interface to notify qcadlib about key events.
  */
-void GraphicView::keyReleaseEvent(QKeyEvent * e)
+void GraphicView::_keyReleaseEvent(QKeyEvent * e)
 {
        if (eventHandler)
                eventHandler->KeyReleaseEvent(e);
@@ -1126,13 +1126,13 @@ void GraphicView::zoomPage()
        if (simulationRunning)
                return;
 
-       Drawing * graphic = container->getGraphic();
+       Drawing * drawing = container->GetDrawing();
 
-       if (graphic == NULL)
+       if (drawing == NULL)
                return;
 
-       Vector s = graphic->getPaperSize();
-       Vector pinsbase = graphic->getPaperInsertionBase();
+       Vector s = drawing->getPaperSize();
+       Vector pinsbase = drawing->getPaperInsertionBase();
 
        double fx, fy;
 
@@ -1272,14 +1272,14 @@ void GraphicView::setPenForEntity(Entity * e)
        {
                double uf = 1.0;  // unit factor
                double wf = 1.0;  // width factor
-               Drawing * graphic = container->getGraphic();
+               Drawing * drawing = container->GetDrawing();
 
-               if (graphic)
+               if (drawing)
                {
-                       uf = Units::convert(1.0, RS2::Millimeter, graphic->getUnit());
+                       uf = Units::convert(1.0, RS2::Millimeter, drawing->getUnit());
 
-                       if ((isPrinting() || isPrintPreview()) && graphic->getPaperScale() > 1.0e-6)
-                               wf = 1.0 / graphic->getPaperScale();
+                       if ((isPrinting() || isPrintPreview()) && drawing->getPaperScale() > 1.0e-6)
+                               wf = 1.0 / drawing->getPaperScale();
                }
 
                pen.setScreenWidth(toGuiDX(w / 100.0 * uf * wf));
@@ -1957,12 +1957,12 @@ void GraphicView::drawPaper()
        if (!container)
                return;
 
-       Drawing * graphic = container->getGraphic();
+       Drawing * drawing = container->GetDrawing();
 
-       if (!graphic)
+       if (!drawing)
                return;
 
-       if (graphic->getPaperScale() < 1.0e-6)
+       if (drawing->getPaperScale() < 1.0e-6)
                return;
 
        if (!painter)
@@ -1971,9 +1971,9 @@ void GraphicView::drawPaper()
        // draw paper:
        painter->setPen(Pen(Qt::gray));
 
-       Vector pinsbase = graphic->getPaperInsertionBase();
-       Vector size = graphic->getPaperSize();
-       double scale = graphic->getPaperScale();
+       Vector pinsbase = drawing->getPaperInsertionBase();
+       Vector size = drawing->getPaperSize();
+       double scale = drawing->getPaperScale();
 
        Vector v1 = toGui((Vector(0, 0) - pinsbase) / scale);
        Vector v2 = toGui((size - pinsbase) / scale);