]> Shamusworld >> Repos - architektonas/blobdiff - src/base/rs_modification.cpp
Refactored CAD tool bars to use predefined actions.
[architektonas] / src / base / rs_modification.cpp
index 1c1b19becb922aa848df8b0f7baadec7df8dc0f6..f452583ae40ffdc438453dfec811e2fcf97ee471 100644 (file)
@@ -1,10 +1,23 @@
+// rs_modification.cpp
+//
+// 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
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  06/01/2010  Added this text. :-)
+//
 
 #include "rs_modification.h"
 
 #include "rs_clipboard.h"
 #include "rs_creation.h"
 #include "rs_entity.h"
-#include "rs_graphic.h"
+#include "drawing.h"
 #include "rs_information.h"
 #include "rs_insert.h"
 #include "rs_polyline.h"
  * Default constructor.
  *
  * @param container The container to which we will add
- *        entities. Usually that's an RS_Graphic entity but
+ *        entities. Usually that's an Drawing entity but
  *        it can also be a polyline, text, ...
  * @param graphicView Pointer to graphic view or NULL if you don't want the
  *        any views to be updated.
  * @param handleUndo true: Handle undo functionalitiy.
  */
 RS_Modification::RS_Modification(RS_EntityContainer & container,
-       RS_GraphicView * graphicView, bool handleUndo)
+       GraphicView * graphicView, bool handleUndo)
 {
     this->container = &container;
     this->graphicView = graphicView;
@@ -137,7 +150,7 @@ bool RS_Modification::changeAttributes(RS_AttributesData & data)
 /**
  * Copies all selected entities from the given container to the clipboard.
  * Layers and blocks that are needed are also copied if the container is
- * or is part of an RS_Graphic.
+ * or is part of an Drawing.
  *
  * @param container The entity container.
  * @param ref Reference point. The entities will be moved by -ref.
@@ -184,7 +197,7 @@ void RS_Modification::copy(const Vector& ref, const bool cut) {
 /**
  * Copies the given entity from the given container to the clipboard.
  * Layers and blocks that are needed are also copied if the container is
- * or is part of an RS_Graphic.
+ * or is part of an Drawing.
  *
  * @param e The entity.
  * @param ref Reference point. The entities will be moved by -ref.
@@ -322,13 +335,13 @@ void RS_Modification::copyBlocks(RS_Entity* e) {
 /**
  * Pastes all entities from the clipboard into the container.
  * Layers and blocks that are needed are also copied if the container is
- * or is part of an RS_Graphic.
+ * or is part of an Drawing.
  *
  * @param data Paste data.
  * @param source The source from where to paste. NULL means the source
  *      is the clipboard.
  */
-void RS_Modification::paste(const RS_PasteData& data, RS_Graphic* source) {
+void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
 
     if (graphic==NULL) {
         RS_DEBUG->print(RS_Debug::D_WARNING,