X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Frs_graphicview.cpp;h=73500e211f8d16baef514699fc55dfb4c9550519;hb=3f46c180da0806c9c263e6d87d0f1404632402da;hp=29ab3f4c5632d184c85835a766a3123a1cdd5002;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/base/rs_graphicview.cpp b/src/base/rs_graphicview.cpp index 29ab3f4..73500e2 100644 --- a/src/base/rs_graphicview.cpp +++ b/src/base/rs_graphicview.cpp @@ -16,10 +16,10 @@ #include #include "rs_actioninterface.h" -#include "rs_application.h" #include "rs_block.h" +#include "rs_dialogfactory.h" +#include "drawing.h" #include "rs_eventhandler.h" -#include "rs_graphic.h" #include "rs_grid.h" #include "rs_insert.h" #include "rs_layer.h" @@ -122,10 +122,10 @@ void RS_GraphicView::cleanUp() * connected to this view is a graphic and valid. * NULL otherwise. */ -RS_Graphic * RS_GraphicView::getGraphic() +Drawing * RS_GraphicView::getGraphic() { if (container != NULL && container->rtti() == RS2::EntityGraphic) - return (RS_Graphic*)container; + return (Drawing*)container; else return NULL; } @@ -395,7 +395,7 @@ bool RS_GraphicView::isGridOn() { if (container != NULL) { - RS_Graphic * g = container->getGraphic(); + Drawing * g = container->getGraphic(); if (g != NULL) return g->isGridOn(); @@ -565,8 +565,7 @@ void RS_GraphicView::mouseReleaseEvent(QMouseEvent * e) if (eventHandler != NULL) { - if (RS2::qtToRsButtonState(e->button()) != RS2::RightButton - || eventHandler->hasAction()) + if (e->button() != Qt::RightButton || eventHandler->hasAction()) { eventHandler->mouseReleaseEvent(e); //e->accept(); @@ -574,10 +573,7 @@ void RS_GraphicView::mouseReleaseEvent(QMouseEvent * e) else { back(); -//#if QT_VERSION>=0x030000 e->accept(); -//#endif - } } @@ -592,10 +588,10 @@ void RS_GraphicView::mouseMoveEvent(QMouseEvent * e) { RS_DEBUG->print("RS_GraphicView::mouseMoveEvent begin"); - RS_Graphic * graphic = NULL; + Drawing * graphic = NULL; if (container->rtti() == RS2::EntityGraphic) - graphic = (RS_Graphic *)container; + graphic = (Drawing *)container; RS_DEBUG->print("RS_GraphicView::mouseMoveEvent 001"); @@ -1157,7 +1153,7 @@ void RS_GraphicView::zoomPage() if (simulationRunning) return; - RS_Graphic * graphic = container->getGraphic(); + Drawing * graphic = container->getGraphic(); if (graphic == NULL) return; @@ -1324,7 +1320,7 @@ void RS_GraphicView::setPenForEntity(RS_Entity * e) { double uf = 1.0; // unit factor double wf = 1.0; // width factor - RS_Graphic * graphic = container->getGraphic(); + Drawing * graphic = container->getGraphic(); if (graphic != NULL) { @@ -2096,7 +2092,7 @@ void RS_GraphicView::drawPaper() if (container == NULL) return; - RS_Graphic * graphic = container->getGraphic(); + Drawing * graphic = container->getGraphic(); if (graphic == NULL) return;