]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifytrim.cpp
Phase two of adding polyline functionality...
[architektonas] / src / actions / actionmodifytrim.cpp
index 4cb23892963efafe4f12e88b478c13228bead8e4..efbc6a06289c850c69f0ece612983ac57040672b 100644 (file)
@@ -3,7 +3,9 @@
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
 //
 // JLH = James L. Hammons <jlhamm@acm.org>
 //
 
 #include "actionmodifytrim.h"
 
-#include "rs_dialogfactory.h"
-#include "rs_modification.h"
+#include "debug.h"
+#include "dialogfactory.h"
+#include "modification.h"
 
 /**
  * @param both Trim both entities.
  */
-ActionModifyTrim::ActionModifyTrim(RS_EntityContainer & container,
+ActionModifyTrim::ActionModifyTrim(EntityContainer & container,
        GraphicView & graphicView, bool both): ActionInterface("Trim Entity",
                container, graphicView)
 {
@@ -45,12 +48,12 @@ void ActionModifyTrim::init(int status)
 
 void ActionModifyTrim::trigger()
 {
-       RS_DEBUG->print("ActionModifyTrim::trigger()");
+       DEBUG->print("ActionModifyTrim::trigger()");
 
        if (trimEntity && trimEntity->isAtomic() && limitEntity)
        {
-               RS_Modification m(*container, graphicView);
-               m.trim(trimCoord, (RS_AtomicEntity *)trimEntity,
+               Modification m(*container, graphicView);
+               m.trim(trimCoord, (AtomicEntity *)trimEntity,
                        limitCoord, limitEntity, both);
 
                trimEntity = NULL;
@@ -64,16 +67,16 @@ void ActionModifyTrim::trigger()
                else
                        setStatus(ChooseTrimEntity);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyTrim::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e);
+       Entity * se = catchEntity(e);
 
        switch (getStatus())
        {
@@ -91,7 +94,7 @@ void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
+       DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
 }
 
 void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
@@ -99,7 +102,7 @@ void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
        if (e->button() == Qt::LeftButton)
        {
                Vector mouse = graphicView->toGraph(e->x(), e->y());
-               RS_Entity * se = catchEntity(e);
+               Entity * se = catchEntity(e);
 
                switch (getStatus())
                {
@@ -148,25 +151,25 @@ void ActionModifyTrim::updateMouseButtonHints()
        case ChooseLimitEntity:
 
                if (both)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select first trim entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select first trim entity"),
                                tr("Cancel"));
                else
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select limiting entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select limiting entity"),
                                tr("Back"));
                break;
 
        case ChooseTrimEntity:
 
                if (both)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select second trim entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select second trim entity"),
                                tr("Cancel"));
                else
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select entity to trim"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select entity to trim"),
                                tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -178,6 +181,6 @@ void ActionModifyTrim::updateMouseCursor()
 
 void ActionModifyTrim::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }