]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/actionhandler.cpp
Bugfixes related to removing Snapper class.
[architektonas] / src / widgets / actionhandler.cpp
index e65a520f6cf8f9532741c2c3f444d7e83cb4a903..f44ca7a5c4b59be626f97228fae448aaf05605ac 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "actionhandler.h"
 
-#include "rs_commandevent.h"
+#include "commandevent.h"
 #include "commands.h"
 #include "actionblocksadd.h"
 #include "actionblocksattributes.h"
@@ -57,6 +57,7 @@
 #include "actiondrawlinetangent1.h"
 #include "actiondrawlinetangent2.h"
 #include "actiondrawpoint.h"
+#include "actiondrawpolyline.h"
 #include "actiondrawspline.h"
 #include "actiondrawtext.h"
 #include "actioneditcopy.h"
 #include "actionmodifytrim.h"
 #include "actionmodifytrimamount.h"
 #include "actionoptionsdrawing.h"
+#include "actionpolylineadd.h"
+#include "actionpolylineappend.h"
+#include "actionpolylinedel.h"
+#include "actionpolylinedelbetween.h"
+#include "actionpolylinetrim.h"
 #include "actionselect.h"
 #include "actionselectall.h"
 #include "actionselectcontour.h"
 #include "actionsetsnapmode.h"
 #include "actionsetsnaprestriction.h"
 #include "actionsnapintersectionmanual.h"
-#include "actiontoolregeneratedimensions.h"
 #include "actionzoomauto.h"
 #include "actionzoomin.h"
 #include "actionzoompan.h"
 #include "actionzoomredraw.h"
 #include "actionzoomwindow.h"
 
-#warning "!!! Need to add polyline functionality !!!"
-#if 0
-#include "actiondrawpolyline.h"
-#include "actionpolylineadd.h"
-#include "actionpolylineappend.h"
-#include "actionpolylinedel.h"
-#include "actionpolylinedelbetween.h"
-#include "actionpolylinetrim.h"
-#endif
-
 #ifdef RS_CAM
-#include "rs_actioncamexportauto.h"
-#include "rs_actioncamreorder.h"
+#include "actioncamexportauto.h"
+#include "actioncamreorder.h"
 #endif
 
 #include "qg_mainwindowinterface.h"
 /**
  * Constructor
  */
-QG_ActionHandler::QG_ActionHandler(QG_MainWindowInterface * mw)
+ActionHandler::ActionHandler(QG_MainWindowInterface * mw)
 {
-       RS_DEBUG->print("QG_ActionHandler::QG_ActionHandler");
+       DEBUG->print("ActionHandler::ActionHandler");
        mainWindow = mw;
 
        snapFree = NULL;
@@ -158,23 +153,23 @@ QG_ActionHandler::QG_ActionHandler(QG_MainWindowInterface * mw)
        restrictVertical = NULL;
 
        lockRelativeZero = NULL;
-       RS_DEBUG->print("QG_ActionHandler::QG_ActionHandler: OK");
+       DEBUG->print("ActionHandler::ActionHandler: OK");
 }
 
 /**
  * Destructor
  */
-QG_ActionHandler::~QG_ActionHandler()
+ActionHandler::~ActionHandler()
 {
-       RS_DEBUG->print("QG_ActionHandler::~QG_ActionHandler");
-       RS_DEBUG->print("QG_ActionHandler::~QG_ActionHandler: OK");
+       DEBUG->print("ActionHandler::~ActionHandler");
+       DEBUG->print("ActionHandler::~ActionHandler: OK");
 }
 
 /**
  * Kills all running selection actions. Called when a selection action
  * is launched to reduce confusion.
  */
-void QG_ActionHandler::killSelectActions()
+void ActionHandler::killSelectActions()
 {
        GraphicView * gv = mainWindow->getGraphicView();
 
@@ -185,7 +180,7 @@ void QG_ActionHandler::killSelectActions()
 /**
  * @return Current action or NULL.
  */
-ActionInterface * QG_ActionHandler::getCurrentAction()
+ActionInterface * ActionHandler::getCurrentAction()
 {
        GraphicView * gv = mainWindow->getGraphicView();
 
@@ -197,10 +192,10 @@ ActionInterface * QG_ActionHandler::getCurrentAction()
 
 #if 0
 Instead of the following giant switch statement, you could something like the following:
-ActionInterface * QG_ActionHandler::setCurrentAction(ActionInterface * action)
+ActionInterface * ActionHandler::setCurrentAction(ActionInterface * action)
 {
        GraphicView * gv = mainWindow->getGraphicView();
-       RS_Document * doc = mainWindow->getDocument();
+       Document * doc = mainWindow->getDocument();
 
        // only global options are allowed without a document:
        if (gv == NULL || doc == NULL)
@@ -231,19 +226,19 @@ Well... The problem is the action, they're all different...
  *
  * @return Pointer to the created action or NULL.
  */
-ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
+ActionInterface * ActionHandler::setCurrentAction(RS2::ActionType id)
 {
-       RS_DEBUG->print("QG_ActionHandler::setCurrentAction()");
+       DEBUG->print("ActionHandler::setCurrentAction()");
 
        GraphicView * gv = mainWindow->getGraphicView();
-       RS_Document * doc = mainWindow->getDocument();
+       Document * doc = mainWindow->getDocument();
        ActionInterface * a = NULL;
 
        // only global options are allowed without a document:
        if (gv == NULL || doc == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "QG_ActionHandler::setCurrentAction: graphic view or document is NULL");
+               DEBUG->print(Debug::D_WARNING,
+                       "ActionHandler::setCurrentAction: graphic view or document is NULL");
                return NULL;
        }
 
@@ -332,12 +327,6 @@ ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
                a = new ActionSelectLayer(*doc, *gv);
                break;
 
-               // Tool actions:
-               //
-       case RS2::ActionToolRegenerateDimensions:
-               a = new ActionToolRegenerateDimensions(*doc, *gv);
-               break;
-
                // Zooming actions:
                //
        case RS2::ActionZoomIn:
@@ -409,8 +398,6 @@ ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
        case RS2::ActionDrawLineRelAngle:
                a = new ActionDrawLineRelAngle(*doc, *gv, M_PI / 2.0, false);
                break;
-#warning "!!! Need to add polyline functionality !!!"
-#ifdef RS_PROF
        case RS2::ActionDrawPolyline:
                a = new ActionDrawPolyline(*doc, *gv);
                break;
@@ -429,7 +416,6 @@ ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
        case RS2::ActionPolylineTrim:
                a = new ActionPolylineTrim(*doc, *gv);
                break;
-#endif
        case RS2::ActionDrawLinePolygon:
                a = new ActionDrawLinePolygon(*doc, *gv);
                break;
@@ -775,15 +761,15 @@ ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
 #endif
 
        default:
-               RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "QG_ActionHandler::setCurrentAction(): No such action found.");
+               DEBUG->print(Debug::D_WARNING,
+                       "ActionHandler::setCurrentAction(): No such action found.");
                break;
        }
 
        if (a)
                gv->setCurrentAction(a);
 
-       RS_DEBUG->print("QG_ActionHandler::setCurrentAction(): OK");
+       DEBUG->print("ActionHandler::setCurrentAction(): OK");
 
        return a;
 }
@@ -791,7 +777,7 @@ ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
 /**
  * @return Available commands of the application or the current action.
  */
-QStringList QG_ActionHandler::getAvailableCommands()
+QStringList ActionHandler::getAvailableCommands()
 {
        ActionInterface * currentAction = getCurrentAction();
 
@@ -813,7 +799,7 @@ QStringList QG_ActionHandler::getAvailableCommands()
  *         false: the command is not known and was probably intended for a
  *            running action.
  */
-bool QG_ActionHandler::keycode(const QString & code)
+bool ActionHandler::keycode(const QString & code)
 {
        QString c = code.toLower();
 
@@ -829,7 +815,7 @@ bool QG_ActionHandler::keycode(const QString & code)
        //   it might be intended to launch a new keycode
        //if (!e.isAccepted()) {
        // keycode for new action:
-       RS2::ActionType type = RS_COMMANDS->keycodeToAction(code);
+       RS2::ActionType type = COMMANDS->keycodeToAction(code);
        if (type != RS2::ActionNone)
        {
                // some actions require special handling (GUI update):
@@ -894,9 +880,9 @@ bool QG_ActionHandler::keycode(const QString & code)
  *         false: the command is not known and was probably intended for a
  *            running action.
  */
-bool QG_ActionHandler::command(const QString & cmd)
+bool ActionHandler::command(const QString & cmd)
 {
-       RS_DEBUG->print("QG_ActionHandler::command: %s", cmd.toLatin1().data());
+       DEBUG->print("ActionHandler::command: %s", cmd.toLatin1().data());
        QString c = cmd.toLower();
 
        if (c == "\n")
@@ -906,18 +892,18 @@ bool QG_ActionHandler::command(const QString & cmd)
                if (gv)
                        gv->back();
 
-               RS_DEBUG->print("QG_ActionHandler::command: back");
+               DEBUG->print("ActionHandler::command: back");
                return true;
        }
 
        // pass command on to running action:
-       RS_CommandEvent e(cmd);
+       CommandEvent e(cmd);
 
        GraphicView * gv = mainWindow->getGraphicView();
 
        if (gv)
        {
-               RS_DEBUG->print("QG_ActionHandler::command: trigger command event in graphic view");
+               DEBUG->print("ActionHandler::command: trigger command event in graphic view");
                gv->commandEvent(&e);
        }
 
@@ -925,498 +911,498 @@ bool QG_ActionHandler::command(const QString & cmd)
        //   it might be intended to launch a new command
        if (!e.isAccepted())
        {
-               RS_DEBUG->print("QG_ActionHandler::command: convert cmd to action type");
+               DEBUG->print("ActionHandler::command: convert cmd to action type");
                // command for new action:
-               RS2::ActionType type = RS_COMMANDS->cmdToAction(cmd);
+               RS2::ActionType type = COMMANDS->cmdToAction(cmd);
 
                if (type != RS2::ActionNone)
                {
-                       RS_DEBUG->print("QG_ActionHandler::command: setting current action");
+                       DEBUG->print("ActionHandler::command: setting current action");
                        setCurrentAction(type);
-                       RS_DEBUG->print("QG_ActionHandler::command: current action set");
+                       DEBUG->print("ActionHandler::command: current action set");
                        return true;
                }
        }
 
-       RS_DEBUG->print("QG_ActionHandler::command: current action not set");
+       DEBUG->print("ActionHandler::command: current action not set");
        return false;
 }
 
-//void QG_ActionHandler::slotFileNew() {
+//void ActionHandler::slotFileNew() {
 //     setCurrentAction(RS2::ActionFileNew);
 //}
 
-void QG_ActionHandler::slotFileOpen()
+void ActionHandler::slotFileOpen()
 {
        setCurrentAction(RS2::ActionFileOpen);
 }
 /*
-void QG_ActionHandler::slotFileSave() {
+void ActionHandler::slotFileSave() {
        setCurrentAction(RS2::ActionFileSave);
 }
 */
 
-void QG_ActionHandler::slotFileSaveAs()
+void ActionHandler::slotFileSaveAs()
 {
        setCurrentAction(RS2::ActionFileSaveAs);
 }
 
 /*
-void QG_ActionHandler::slotFileClose()
+void ActionHandler::slotFileClose()
 {
        setCurrentAction(RS2::ActionFileClose);
 }
 
-void QG_ActionHandler::slotFilePrint()
+void ActionHandler::slotFilePrint()
 {
        setCurrentAction(RS2::ActionFilePrint);
 }
 */
 
-void QG_ActionHandler::slotZoomIn()
+void ActionHandler::slotZoomIn()
 {
        setCurrentAction(RS2::ActionZoomIn);
 }
 
-void QG_ActionHandler::slotZoomOut()
+void ActionHandler::slotZoomOut()
 {
        setCurrentAction(RS2::ActionZoomOut);
 }
 
-void QG_ActionHandler::slotZoomAuto()
+void ActionHandler::slotZoomAuto()
 {
        setCurrentAction(RS2::ActionZoomAuto);
 }
 
-void QG_ActionHandler::slotZoomWindow()
+void ActionHandler::slotZoomWindow()
 {
        setCurrentAction(RS2::ActionZoomWindow);
 }
 
-void QG_ActionHandler::slotZoomPan()
+void ActionHandler::slotZoomPan()
 {
        setCurrentAction(RS2::ActionZoomPan);
 }
 
-void QG_ActionHandler::slotZoomPrevious()
+void ActionHandler::slotZoomPrevious()
 {
        setCurrentAction(RS2::ActionZoomPrevious);
 }
 
-void QG_ActionHandler::slotZoomRedraw()
+void ActionHandler::slotZoomRedraw()
 {
        setCurrentAction(RS2::ActionZoomRedraw);
 }
 
-void QG_ActionHandler::slotToolRegenerateDimensions()
+void ActionHandler::slotToolRegenerateDimensions()
 {
        setCurrentAction(RS2::ActionToolRegenerateDimensions);
 }
 
-void QG_ActionHandler::slotEditUndo()
+void ActionHandler::slotEditUndo()
 {
        setCurrentAction(RS2::ActionEditUndo);
 }
 
-void QG_ActionHandler::slotEditRedo()
+void ActionHandler::slotEditRedo()
 {
        setCurrentAction(RS2::ActionEditRedo);
 }
 
-void QG_ActionHandler::slotEditCut()
+void ActionHandler::slotEditCut()
 {
        setCurrentAction(RS2::ActionEditCut);
 }
 
-void QG_ActionHandler::slotEditCopy()
+void ActionHandler::slotEditCopy()
 {
        setCurrentAction(RS2::ActionEditCopy);
 }
 
-void QG_ActionHandler::slotEditPaste()
+void ActionHandler::slotEditPaste()
 {
        setCurrentAction(RS2::ActionEditPaste);
 }
 
-void QG_ActionHandler::slotSelectSingle()
+void ActionHandler::slotSelectSingle()
 {
        setCurrentAction(RS2::ActionSelectSingle);
 }
 
-void QG_ActionHandler::slotSelectContour()
+void ActionHandler::slotSelectContour()
 {
        setCurrentAction(RS2::ActionSelectContour);
 }
 
-void QG_ActionHandler::slotSelectWindow()
+void ActionHandler::slotSelectWindow()
 {
        setCurrentAction(RS2::ActionSelectWindow);
 }
 
-void QG_ActionHandler::slotDeselectWindow()
+void ActionHandler::slotDeselectWindow()
 {
        setCurrentAction(RS2::ActionDeselectWindow);
 }
 
-void QG_ActionHandler::slotSelectAll()
+void ActionHandler::slotSelectAll()
 {
        setCurrentAction(RS2::ActionSelectAll);
 }
 
-void QG_ActionHandler::slotDeselectAll()
+void ActionHandler::slotDeselectAll()
 {
        setCurrentAction(RS2::ActionDeselectAll);
 }
 
-void QG_ActionHandler::slotSelectInvert()
+void ActionHandler::slotSelectInvert()
 {
        setCurrentAction(RS2::ActionSelectInvert);
 }
 
-void QG_ActionHandler::slotSelectIntersected()
+void ActionHandler::slotSelectIntersected()
 {
        setCurrentAction(RS2::ActionSelectIntersected);
 }
 
-void QG_ActionHandler::slotDeselectIntersected()
+void ActionHandler::slotDeselectIntersected()
 {
        setCurrentAction(RS2::ActionDeselectIntersected);
 }
 
-void QG_ActionHandler::slotSelectLayer()
+void ActionHandler::slotSelectLayer()
 {
        setCurrentAction(RS2::ActionSelectLayer);
 }
 
-void QG_ActionHandler::slotDrawPoint()
+void ActionHandler::slotDrawPoint()
 {
        setCurrentAction(RS2::ActionDrawPoint);
 }
 
-void QG_ActionHandler::slotDrawLine()
+void ActionHandler::slotDrawLine()
 {
        setCurrentAction(RS2::ActionDrawLine);
 }
 
-void QG_ActionHandler::slotDrawLineAngle()
+void ActionHandler::slotDrawLineAngle()
 {
        setCurrentAction(RS2::ActionDrawLineAngle);
 }
 
-void QG_ActionHandler::slotDrawLineHorizontal()
+void ActionHandler::slotDrawLineHorizontal()
 {
        setCurrentAction(RS2::ActionDrawLineHorizontal);
 }
 
-void QG_ActionHandler::slotDrawLineHorVert()
+void ActionHandler::slotDrawLineHorVert()
 {
        setCurrentAction(RS2::ActionDrawLineHorVert);
 }
 
-void QG_ActionHandler::slotDrawLineVertical()
+void ActionHandler::slotDrawLineVertical()
 {
        setCurrentAction(RS2::ActionDrawLineVertical);
 }
 
-void QG_ActionHandler::slotDrawLineFree()
+void ActionHandler::slotDrawLineFree()
 {
        setCurrentAction(RS2::ActionDrawLineFree);
 }
 
-void QG_ActionHandler::slotDrawLineParallel()
+void ActionHandler::slotDrawLineParallel()
 {
        setCurrentAction(RS2::ActionDrawLineParallel);
 }
 
-void QG_ActionHandler::slotDrawLineParallelThrough()
+void ActionHandler::slotDrawLineParallelThrough()
 {
        setCurrentAction(RS2::ActionDrawLineParallelThrough);
 }
 
-void QG_ActionHandler::slotDrawLineRectangle()
+void ActionHandler::slotDrawLineRectangle()
 {
        setCurrentAction(RS2::ActionDrawLineRectangle);
 }
 
-void QG_ActionHandler::slotDrawLineBisector()
+void ActionHandler::slotDrawLineBisector()
 {
        setCurrentAction(RS2::ActionDrawLineBisector);
 }
 
-void QG_ActionHandler::slotDrawLineTangent1()
+void ActionHandler::slotDrawLineTangent1()
 {
        setCurrentAction(RS2::ActionDrawLineTangent1);
 }
 
-void QG_ActionHandler::slotDrawLineTangent2()
+void ActionHandler::slotDrawLineTangent2()
 {
        setCurrentAction(RS2::ActionDrawLineTangent2);
 }
 
-void QG_ActionHandler::slotDrawLineOrthogonal()
+void ActionHandler::slotDrawLineOrthogonal()
 {
        setCurrentAction(RS2::ActionDrawLineOrthogonal);
 }
 
-void QG_ActionHandler::slotDrawLineRelAngle()
+void ActionHandler::slotDrawLineRelAngle()
 {
        setCurrentAction(RS2::ActionDrawLineRelAngle);
 }
 
-void QG_ActionHandler::slotDrawPolyline()
+void ActionHandler::slotDrawPolyline()
 {
        setCurrentAction(RS2::ActionDrawPolyline);
 }
 
-void QG_ActionHandler::slotPolylineAdd()
+void ActionHandler::slotPolylineAdd()
 {
        setCurrentAction(RS2::ActionPolylineAdd);
 }
 
-void QG_ActionHandler::slotPolylineAppend()
+void ActionHandler::slotPolylineAppend()
 {
        setCurrentAction(RS2::ActionPolylineAppend);
 }
 
-void QG_ActionHandler::slotPolylineDel()
+void ActionHandler::slotPolylineDel()
 {
        setCurrentAction(RS2::ActionPolylineDel);
 }
 
-void QG_ActionHandler::slotPolylineDelBetween()
+void ActionHandler::slotPolylineDelBetween()
 {
        setCurrentAction(RS2::ActionPolylineDelBetween);
 }
 
-void QG_ActionHandler::slotPolylineTrim()
+void ActionHandler::slotPolylineTrim()
 {
        setCurrentAction(RS2::ActionPolylineTrim);
 }
 
-void QG_ActionHandler::slotDrawLinePolygon()
+void ActionHandler::slotDrawLinePolygon()
 {
        setCurrentAction(RS2::ActionDrawLinePolygon);
 }
 
-void QG_ActionHandler::slotDrawLinePolygon2()
+void ActionHandler::slotDrawLinePolygon2()
 {
        setCurrentAction(RS2::ActionDrawLinePolygon2);
 }
 
-void QG_ActionHandler::slotDrawCircle()
+void ActionHandler::slotDrawCircle()
 {
        setCurrentAction(RS2::ActionDrawCircle);
 }
 
-void QG_ActionHandler::slotDrawCircleCR()
+void ActionHandler::slotDrawCircleCR()
 {
        setCurrentAction(RS2::ActionDrawCircleCR);
 }
 
-void QG_ActionHandler::slotDrawCircle2P()
+void ActionHandler::slotDrawCircle2P()
 {
        setCurrentAction(RS2::ActionDrawCircle2P);
 }
 
-void QG_ActionHandler::slotDrawCircle3P()
+void ActionHandler::slotDrawCircle3P()
 {
        setCurrentAction(RS2::ActionDrawCircle3P);
 }
 
-void QG_ActionHandler::slotDrawCircleParallel()
+void ActionHandler::slotDrawCircleParallel()
 {
        setCurrentAction(RS2::ActionDrawCircleParallel);
 }
 
-void QG_ActionHandler::slotDrawArc()
+void ActionHandler::slotDrawArc()
 {
        setCurrentAction(RS2::ActionDrawArc);
 }
 
-void QG_ActionHandler::slotDrawArc3P()
+void ActionHandler::slotDrawArc3P()
 {
        setCurrentAction(RS2::ActionDrawArc3P);
 }
 
-void QG_ActionHandler::slotDrawArcParallel()
+void ActionHandler::slotDrawArcParallel()
 {
        setCurrentAction(RS2::ActionDrawArcParallel);
 }
 
-void QG_ActionHandler::slotDrawArcTangential()
+void ActionHandler::slotDrawArcTangential()
 {
        setCurrentAction(RS2::ActionDrawArcTangential);
 }
 
-void QG_ActionHandler::slotDrawEllipseAxis()
+void ActionHandler::slotDrawEllipseAxis()
 {
        setCurrentAction(RS2::ActionDrawEllipseAxis);
 }
 
-void QG_ActionHandler::slotDrawEllipseArcAxis()
+void ActionHandler::slotDrawEllipseArcAxis()
 {
        setCurrentAction(RS2::ActionDrawEllipseArcAxis);
 }
 
-void QG_ActionHandler::slotDrawSpline()
+void ActionHandler::slotDrawSpline()
 {
        setCurrentAction(RS2::ActionDrawSpline);
 }
 
-void QG_ActionHandler::slotDrawText()
+void ActionHandler::slotDrawText()
 {
        setCurrentAction(RS2::ActionDrawText);
 }
 
-void QG_ActionHandler::slotDrawHatch()
+void ActionHandler::slotDrawHatch()
 {
        setCurrentAction(RS2::ActionDrawHatch);
 }
 
-void QG_ActionHandler::slotDrawImage()
+void ActionHandler::slotDrawImage()
 {
        setCurrentAction(RS2::ActionDrawImage);
 }
 
-void QG_ActionHandler::slotDimAligned()
+void ActionHandler::slotDimAligned()
 {
        setCurrentAction(RS2::ActionDimAligned);
 }
 
-void QG_ActionHandler::slotDimLinear()
+void ActionHandler::slotDimLinear()
 {
        setCurrentAction(RS2::ActionDimLinear);
 }
 
-void QG_ActionHandler::slotDimLinearHor()
+void ActionHandler::slotDimLinearHor()
 {
        setCurrentAction(RS2::ActionDimLinearHor);
 }
 
-void QG_ActionHandler::slotDimLinearVer()
+void ActionHandler::slotDimLinearVer()
 {
        setCurrentAction(RS2::ActionDimLinearVer);
 }
 
-void QG_ActionHandler::slotDimRadial()
+void ActionHandler::slotDimRadial()
 {
        setCurrentAction(RS2::ActionDimRadial);
 }
 
-void QG_ActionHandler::slotDimDiametric()
+void ActionHandler::slotDimDiametric()
 {
        setCurrentAction(RS2::ActionDimDiametric);
 }
 
-void QG_ActionHandler::slotDimAngular()
+void ActionHandler::slotDimAngular()
 {
        setCurrentAction(RS2::ActionDimAngular);
 }
 
-void QG_ActionHandler::slotDimLeader()
+void ActionHandler::slotDimLeader()
 {
        setCurrentAction(RS2::ActionDimLeader);
 }
 
 
-void QG_ActionHandler::slotModifyAttributes()
+void ActionHandler::slotModifyAttributes()
 {
        setCurrentAction(RS2::ActionModifyAttributes);
 }
 
-void QG_ActionHandler::slotModifyDelete()
+void ActionHandler::slotModifyDelete()
 {
        setCurrentAction(RS2::ActionModifyDelete);
 }
 
-void QG_ActionHandler::slotModifyDeleteQuick()
+void ActionHandler::slotModifyDeleteQuick()
 {
        //setCurrentAction(RS2::ActionModifyDeleteQuick);
        setCurrentAction(RS2::ActionModifyDeleteNoSelect);
 }
 
-void QG_ActionHandler::slotModifyDeleteFree()
+void ActionHandler::slotModifyDeleteFree()
 {
        setCurrentAction(RS2::ActionModifyDeleteFree);
 }
 
-void QG_ActionHandler::slotModifyMove()
+void ActionHandler::slotModifyMove()
 {
        setCurrentAction(RS2::ActionModifyMove);
 }
 
-void QG_ActionHandler::slotModifyRotate()
+void ActionHandler::slotModifyRotate()
 {
        setCurrentAction(RS2::ActionModifyRotate);
 }
 
-void QG_ActionHandler::slotModifyScale()
+void ActionHandler::slotModifyScale()
 {
        setCurrentAction(RS2::ActionModifyScale);
 }
 
-void QG_ActionHandler::slotModifyStretch()
+void ActionHandler::slotModifyStretch()
 {
        setCurrentAction(RS2::ActionModifyStretch);
 }
 
-void QG_ActionHandler::slotModifyBevel()
+void ActionHandler::slotModifyBevel()
 {
        setCurrentAction(RS2::ActionModifyBevel);
 }
 
-void QG_ActionHandler::slotModifyRound()
+void ActionHandler::slotModifyRound()
 {
        setCurrentAction(RS2::ActionModifyRound);
 }
 
-void QG_ActionHandler::slotModifyMirror()
+void ActionHandler::slotModifyMirror()
 {
        setCurrentAction(RS2::ActionModifyMirror);
 }
 
-void QG_ActionHandler::slotModifyMoveRotate()
+void ActionHandler::slotModifyMoveRotate()
 {
        setCurrentAction(RS2::ActionModifyMoveRotate);
 }
 
-void QG_ActionHandler::slotModifyRotate2()
+void ActionHandler::slotModifyRotate2()
 {
        setCurrentAction(RS2::ActionModifyRotate2);
 }
 
-void QG_ActionHandler::slotModifyEntity()
+void ActionHandler::slotModifyEntity()
 {
        setCurrentAction(RS2::ActionModifyEntity);
 }
 
-void QG_ActionHandler::slotModifyTrim()
+void ActionHandler::slotModifyTrim()
 {
        setCurrentAction(RS2::ActionModifyTrim);
 }
 
-void QG_ActionHandler::slotModifyTrim2()
+void ActionHandler::slotModifyTrim2()
 {
        setCurrentAction(RS2::ActionModifyTrim2);
 }
 
-void QG_ActionHandler::slotModifyTrimAmount()
+void ActionHandler::slotModifyTrimAmount()
 {
        setCurrentAction(RS2::ActionModifyTrimAmount);
 }
 
-void QG_ActionHandler::slotModifyCut()
+void ActionHandler::slotModifyCut()
 {
        setCurrentAction(RS2::ActionModifyCut);
 }
 
-void QG_ActionHandler::slotModifyExplodeText()
+void ActionHandler::slotModifyExplodeText()
 {
        setCurrentAction(RS2::ActionModifyExplodeText);
 }
 
 
-void QG_ActionHandler::slotSnapFree()
+void ActionHandler::slotSnapFree()
 {
        disableSnaps();
 
@@ -1429,7 +1415,7 @@ void QG_ActionHandler::slotSnapFree()
        setCurrentAction(RS2::ActionSnapFree);
 }
 
-void QG_ActionHandler::slotSnapGrid()
+void ActionHandler::slotSnapGrid()
 {
        disableSnaps();
 
@@ -1443,7 +1429,7 @@ void QG_ActionHandler::slotSnapGrid()
        setCurrentAction(RS2::ActionSnapGrid);
 }
 
-void QG_ActionHandler::slotSnapEndpoint()
+void ActionHandler::slotSnapEndpoint()
 {
        disableSnaps();
 
@@ -1457,7 +1443,7 @@ void QG_ActionHandler::slotSnapEndpoint()
        setCurrentAction(RS2::ActionSnapEndpoint);
 }
 
-void QG_ActionHandler::slotSnapOnEntity()
+void ActionHandler::slotSnapOnEntity()
 {
        disableSnaps();
        if (snapOnEntity)
@@ -1469,7 +1455,7 @@ void QG_ActionHandler::slotSnapOnEntity()
        setCurrentAction(RS2::ActionSnapOnEntity);
 }
 
-void QG_ActionHandler::slotSnapCenter()
+void ActionHandler::slotSnapCenter()
 {
        disableSnaps();
 
@@ -1484,7 +1470,7 @@ void QG_ActionHandler::slotSnapCenter()
        setCurrentAction(RS2::ActionSnapCenter);
 }
 
-void QG_ActionHandler::slotSnapMiddle()
+void ActionHandler::slotSnapMiddle()
 {
        disableSnaps();
 
@@ -1499,7 +1485,7 @@ void QG_ActionHandler::slotSnapMiddle()
        setCurrentAction(RS2::ActionSnapMiddle);
 }
 
-void QG_ActionHandler::slotSnapDist()
+void ActionHandler::slotSnapDist()
 {
        disableSnaps();
 
@@ -1514,7 +1500,7 @@ void QG_ActionHandler::slotSnapDist()
        setCurrentAction(RS2::ActionSnapDist);
 }
 
-void QG_ActionHandler::slotSnapIntersection()
+void ActionHandler::slotSnapIntersection()
 {
        disableSnaps();
 
@@ -1529,7 +1515,7 @@ void QG_ActionHandler::slotSnapIntersection()
        setCurrentAction(RS2::ActionSnapIntersection);
 }
 
-void QG_ActionHandler::slotSnapIntersectionManual()
+void ActionHandler::slotSnapIntersectionManual()
 {
        //disableSnaps();
        /*if (snapIntersectionManual) {
@@ -1541,7 +1527,7 @@ void QG_ActionHandler::slotSnapIntersectionManual()
        setCurrentAction(RS2::ActionSnapIntersectionManual);
 }
 
-void QG_ActionHandler::disableSnaps()
+void ActionHandler::disableSnaps()
 {
        if (snapFree)
                snapFree->setChecked(false);
@@ -1576,7 +1562,7 @@ void QG_ActionHandler::disableSnaps()
 #endif
 }
 
-void QG_ActionHandler::slotRestrictNothing()
+void ActionHandler::slotRestrictNothing()
 {
        disableRestrictions();
 
@@ -1590,7 +1576,7 @@ void QG_ActionHandler::slotRestrictNothing()
        setCurrentAction(RS2::ActionRestrictNothing);
 }
 
-void QG_ActionHandler::slotRestrictOrthogonal()
+void ActionHandler::slotRestrictOrthogonal()
 {
        disableRestrictions();
 
@@ -1604,7 +1590,7 @@ void QG_ActionHandler::slotRestrictOrthogonal()
        setCurrentAction(RS2::ActionRestrictOrthogonal);
 }
 
-void QG_ActionHandler::slotRestrictHorizontal()
+void ActionHandler::slotRestrictHorizontal()
 {
        disableRestrictions();
 
@@ -1619,7 +1605,7 @@ void QG_ActionHandler::slotRestrictHorizontal()
        setCurrentAction(RS2::ActionRestrictHorizontal);
 }
 
-void QG_ActionHandler::slotRestrictVertical()
+void ActionHandler::slotRestrictVertical()
 {
        disableRestrictions();
 
@@ -1633,7 +1619,7 @@ void QG_ActionHandler::slotRestrictVertical()
        setCurrentAction(RS2::ActionRestrictVertical);
 }
 
-void QG_ActionHandler::disableRestrictions()
+void ActionHandler::disableRestrictions()
 {
        if (restrictNothing)
                restrictNothing->setChecked(false);
@@ -1657,7 +1643,7 @@ void QG_ActionHandler::disableRestrictions()
  * Updates the snap mode for the current document from the selected menu.
  * Used after the active window changed.
  */
-void QG_ActionHandler::updateSnapMode()
+void ActionHandler::updateSnapMode()
 {
        if (snapFree && snapFree->isChecked())
                slotSnapFree();
@@ -1691,12 +1677,12 @@ void QG_ActionHandler::updateSnapMode()
                slotLockRelativeZero(lockRelativeZero->isChecked());
 }
 
-void QG_ActionHandler::slotSetRelativeZero()
+void ActionHandler::slotSetRelativeZero()
 {
        setCurrentAction(RS2::ActionSetRelativeZero);
 }
 
-void QG_ActionHandler::slotLockRelativeZero(bool on)
+void ActionHandler::slotLockRelativeZero(bool on)
 {
        if (lockRelativeZero)
                lockRelativeZero->setChecked(on);
@@ -1712,143 +1698,143 @@ void QG_ActionHandler::slotLockRelativeZero(bool on)
 #endif
 }
 
-void QG_ActionHandler::slotInfoInside()
+void ActionHandler::slotInfoInside()
 {
        setCurrentAction(RS2::ActionInfoInside);
 }
 
-void QG_ActionHandler::slotInfoDist()
+void ActionHandler::slotInfoDist()
 {
        setCurrentAction(RS2::ActionInfoDist);
 }
 
-void QG_ActionHandler::slotInfoDist2()
+void ActionHandler::slotInfoDist2()
 {
        setCurrentAction(RS2::ActionInfoDist2);
 }
 
-void QG_ActionHandler::slotInfoAngle()
+void ActionHandler::slotInfoAngle()
 {
        setCurrentAction(RS2::ActionInfoAngle);
 }
 
-void QG_ActionHandler::slotInfoTotalLength()
+void ActionHandler::slotInfoTotalLength()
 {
        setCurrentAction(RS2::ActionInfoTotalLength);
 }
 
-void QG_ActionHandler::slotInfoArea()
+void ActionHandler::slotInfoArea()
 {
        setCurrentAction(RS2::ActionInfoArea);
 }
 
-void QG_ActionHandler::slotLayersDefreezeAll()
+void ActionHandler::slotLayersDefreezeAll()
 {
        setCurrentAction(RS2::ActionLayersDefreezeAll);
 }
 
-void QG_ActionHandler::slotLayersFreezeAll()
+void ActionHandler::slotLayersFreezeAll()
 {
        setCurrentAction(RS2::ActionLayersFreezeAll);
 }
 
-void QG_ActionHandler::slotLayersAdd()
+void ActionHandler::slotLayersAdd()
 {
        setCurrentAction(RS2::ActionLayersAdd);
 }
 
-void QG_ActionHandler::slotLayersRemove()
+void ActionHandler::slotLayersRemove()
 {
        setCurrentAction(RS2::ActionLayersRemove);
 }
 
-void QG_ActionHandler::slotLayersEdit()
+void ActionHandler::slotLayersEdit()
 {
        setCurrentAction(RS2::ActionLayersEdit);
 }
 
-void QG_ActionHandler::slotLayersToggleView()
+void ActionHandler::slotLayersToggleView()
 {
        setCurrentAction(RS2::ActionLayersToggleView);
 }
 
-void QG_ActionHandler::slotLayersToggleLock()
+void ActionHandler::slotLayersToggleLock()
 {
        setCurrentAction(RS2::ActionLayersToggleLock);
 }
 
 
-void QG_ActionHandler::slotBlocksDefreezeAll()
+void ActionHandler::slotBlocksDefreezeAll()
 {
        setCurrentAction(RS2::ActionBlocksDefreezeAll);
 }
 
-void QG_ActionHandler::slotBlocksFreezeAll()
+void ActionHandler::slotBlocksFreezeAll()
 {
        setCurrentAction(RS2::ActionBlocksFreezeAll);
 }
 
-void QG_ActionHandler::slotBlocksAdd()
+void ActionHandler::slotBlocksAdd()
 {
        setCurrentAction(RS2::ActionBlocksAdd);
 }
 
-void QG_ActionHandler::slotBlocksRemove()
+void ActionHandler::slotBlocksRemove()
 {
        setCurrentAction(RS2::ActionBlocksRemove);
 }
 
-void QG_ActionHandler::slotBlocksAttributes()
+void ActionHandler::slotBlocksAttributes()
 {
        setCurrentAction(RS2::ActionBlocksAttributes);
 }
 
-void QG_ActionHandler::slotBlocksEdit()
+void ActionHandler::slotBlocksEdit()
 {
        setCurrentAction(RS2::ActionBlocksEdit);
 }
 
-void QG_ActionHandler::slotBlocksInsert()
+void ActionHandler::slotBlocksInsert()
 {
        setCurrentAction(RS2::ActionBlocksInsert);
 }
 
-void QG_ActionHandler::slotBlocksToggleView()
+void ActionHandler::slotBlocksToggleView()
 {
        setCurrentAction(RS2::ActionBlocksToggleView);
 }
 
-void QG_ActionHandler::slotBlocksCreate()
+void ActionHandler::slotBlocksCreate()
 {
        setCurrentAction(RS2::ActionBlocksCreate);
 }
 
-void QG_ActionHandler::slotBlocksExplode()
+void ActionHandler::slotBlocksExplode()
 {
        setCurrentAction(RS2::ActionBlocksExplode);
 }
 
 
-void QG_ActionHandler::slotOptionsDrawing()
+void ActionHandler::slotOptionsDrawing()
 {
        setCurrentAction(RS2::ActionOptionsDrawing);
 }
 
-void QG_ActionHandler::slotCamExportAuto()
+void ActionHandler::slotCamExportAuto()
 {
 #ifdef RS_CAM
        setCurrentAction(RS2::ActionCamExportAuto);
 #endif
 }
 
-void QG_ActionHandler::slotCamReorder()
+void ActionHandler::slotCamReorder()
 {
 #ifdef RS_CAM
        setCurrentAction(RS2::ActionCamReorder);
 #endif
 }
 
-void QG_ActionHandler::slotFocusNormal()
+void ActionHandler::slotFocusNormal()
 {
        //QG_GraphicView* gv = mainWindow->getGraphicView();
        //if (gv) {
@@ -1857,72 +1843,72 @@ void QG_ActionHandler::slotFocusNormal()
        //}
 }
 
-void QG_ActionHandler::setActionSnapFree(QAction * a)
+void ActionHandler::setActionSnapFree(QAction * a)
 {
        snapFree = a;
 }
 
-void QG_ActionHandler::setActionSnapGrid(QAction * a)
+void ActionHandler::setActionSnapGrid(QAction * a)
 {
        snapGrid = a;
 }
 
-void QG_ActionHandler::setActionSnapEndpoint(QAction * a)
+void ActionHandler::setActionSnapEndpoint(QAction * a)
 {
        snapEndpoint = a;
 }
 
-void QG_ActionHandler::setActionSnapOnEntity(QAction * a)
+void ActionHandler::setActionSnapOnEntity(QAction * a)
 {
        snapOnEntity = a;
 }
 
-void QG_ActionHandler::setActionSnapCenter(QAction * a)
+void ActionHandler::setActionSnapCenter(QAction * a)
 {
        snapCenter = a;
 }
 
-void QG_ActionHandler::setActionSnapMiddle(QAction * a)
+void ActionHandler::setActionSnapMiddle(QAction * a)
 {
        snapMiddle = a;
 }
 
-void QG_ActionHandler::setActionSnapDist(QAction * a)
+void ActionHandler::setActionSnapDist(QAction * a)
 {
        snapDist = a;
 }
 
-void QG_ActionHandler::setActionSnapIntersection(QAction * a)
+void ActionHandler::setActionSnapIntersection(QAction * a)
 {
        snapIntersection = a;
 }
 
-void QG_ActionHandler::setActionSnapIntersectionManual(QAction * a)
+void ActionHandler::setActionSnapIntersectionManual(QAction * a)
 {
        snapIntersectionManual = a;
 }
 
-void QG_ActionHandler::setActionRestrictNothing(QAction * a)
+void ActionHandler::setActionRestrictNothing(QAction * a)
 {
        restrictNothing = a;
 }
 
-void QG_ActionHandler::setActionRestrictOrthogonal(QAction * a)
+void ActionHandler::setActionRestrictOrthogonal(QAction * a)
 {
        restrictOrthogonal = a;
 }
 
-void QG_ActionHandler::setActionRestrictHorizontal(QAction * a)
+void ActionHandler::setActionRestrictHorizontal(QAction * a)
 {
        restrictHorizontal = a;
 }
 
-void QG_ActionHandler::setActionRestrictVertical(QAction * a)
+void ActionHandler::setActionRestrictVertical(QAction * a)
 {
        restrictVertical = a;
 }
 
-void QG_ActionHandler::setActionLockRelativeZero(QAction * a)
+void ActionHandler::setActionLockRelativeZero(QAction * a)
 {
        lockRelativeZero = a;
 }
@@ -1931,7 +1917,7 @@ void QG_ActionHandler::setActionLockRelativeZero(QAction * a)
  * Creates link to snap tool bar so we can update the button
  * state if the snapping action changes.
  */
-void QG_ActionHandler::setCadToolBarSnap(CadToolBarSnap * tb)
+void ActionHandler::setCadToolBarSnap(CadToolBarSnap * tb)
 {
        cadToolBarSnap = tb;
 }