#include "graphicview.h"
#include "insert.h"
-ActionBlocksRemove::ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksRemove::ActionBlocksRemove(EntityContainer & container, GraphicView & graphicView):
ActionInterface("Remove Block", container, graphicView)
{
}
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<RS_EntityContainer *> containerList;
+ QList<EntityContainer *> containerList;
containerList.append(graphic);
- RS_BlockList * blkLst = graphic->getBlockList();
+ BlockList * blkLst = graphic->getBlockList();
for(uint bi=0; bi<blkLst->count(); bi++)
containerList.append(blkLst->at(bi));
{
for(int i=0; i<containerList.size(); i++)
{
- RS_EntityContainer * cont = containerList[i];
+ EntityContainer * cont = containerList[i];
// remove all inserts from the graphic:
bool done;
{
done = true;
- for(RS_Entity * e=cont->firstEntity(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())
{
}
// 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);
}
finish();
- RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+ DIALOGFACTORY->updateSelectionWidget(container->countSelected());
}
void ActionBlocksRemove::init(int status)