X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionblocksremove.cpp;h=180b8ef96442ac98d50d207b9f3c1fbe0dfbaa7f;hb=f62cebc26c7c3af447f0e4e4c43331f8589dce22;hp=9e9ffc2432c1aeaf1103e488000f38311aa08d2c;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actionblocksremove.cpp b/src/actions/actionblocksremove.cpp index 9e9ffc2..180b8ef 100644 --- a/src/actions/actionblocksremove.cpp +++ b/src/actions/actionblocksremove.cpp @@ -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 // @@ -14,13 +16,13 @@ #include "actionblocksremove.h" -#include "rs_block.h" -#include "rs_dialogfactory.h" +#include "block.h" +#include "dialogfactory.h" #include "drawing.h" #include "graphicview.h" -#include "rs_insert.h" +#include "insert.h" -ActionBlocksRemove::ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView): +ActionBlocksRemove::ActionBlocksRemove(EntityContainer & container, GraphicView & graphicView): ActionInterface("Remove Block", container, graphicView) { } @@ -31,16 +33,16 @@ ActionBlocksRemove::~ActionBlocksRemove() void ActionBlocksRemove::trigger() { - RS_DEBUG->print("ActionBlocksRemove::trigger"); + DEBUG->print("ActionBlocksRemove::trigger"); if (graphic) { - RS_Block * block = RS_DIALOGFACTORY->requestBlockRemovalDialog(graphic->getBlockList()); + Block * block = DIALOGFACTORY->requestBlockRemovalDialog(graphic->getBlockList()); // list of containers that might refer to the block via inserts: - QList containerList; + QList containerList; containerList.append(graphic); - RS_BlockList * blkLst = graphic->getBlockList(); + BlockList * blkLst = graphic->getBlockList(); for(uint bi=0; bicount(); bi++) containerList.append(blkLst->at(bi)); @@ -49,7 +51,7 @@ void ActionBlocksRemove::trigger() { for(int i=0; ifirstEntity(RS2::ResolveNone); e!=NULL; + for(Entity * e=cont->firstEntity(RS2::ResolveNone); e!=NULL; e=cont->nextEntity(RS2::ResolveNone)) { if (e->rtti() == RS2::EntityInsert) { - RS_Insert * ins = (RS_Insert *)e; + Insert * ins = (Insert *)e; if (ins->getName() == block->getName()) { @@ -77,8 +79,8 @@ void ActionBlocksRemove::trigger() } // close all windows that are editing this block: - if (RS_DIALOGFACTORY) - RS_DIALOGFACTORY->closeEditBlockWindow(block); + if (DIALOGFACTORY) + DIALOGFACTORY->closeEditBlockWindow(block); // Now remove the block from the block list: graphic->removeBlock(block); @@ -88,7 +90,7 @@ void ActionBlocksRemove::trigger() } finish(); - RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected()); + DIALOGFACTORY->updateSelectionWidget(container->countSelected()); } void ActionBlocksRemove::init(int status)