** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid qcadlib Professional Edition licenses may use
+** Licensees holding valid qcadlib Professional Edition licenses may use
** this file in accordance with the qcadlib Commercial License
** Agreement provided with the Software.
**
#include "drawing.h"
#include "rs_dialogfactory.h"
-RS_ActionBlocksAdd::RS_ActionBlocksAdd(RS_EntityContainer& container,
- RS_GraphicView& graphicView)
- :RS_ActionInterface("Add Block", container, graphicView)
+RS_ActionBlocksAdd::RS_ActionBlocksAdd(RS_EntityContainer & container, RS_GraphicView & graphicView):
+ RS_ActionInterface("Add Block", container, graphicView)
{
}
// QAction * action = new QAction(tr("Add Block"), tr("&Add Block"),
// QKeySequence(), NULL);
QAction * action = new QAction(tr("&Add Block"), 0);
- action->setStatusTip(tr("Add Block"));
- return action;
+ action->setStatusTip(tr("Add Block"));
+ return action;
}
void RS_ActionBlocksAdd::trigger()
{
- RS_DEBUG->print("adding block");
- //RS_Block* block = new RS_Block(container, "", Vector(0.0,0.0));
+ RS_DEBUG->print("adding block");
+ //RS_Block* block = new RS_Block(container, "", Vector(0.0,0.0));
- if (graphic != NULL)
- {
+ if (graphic != NULL)
+ {
RS_BlockList * blockList = graphic->getBlockList();
if (blockList != NULL)
RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
if (d.isValid())
- {
- graphic->addBlock(new RS_Block(container, d));
- }
+ graphic->addBlock(new RS_Block(container, d));
}
- }
+ }
- finish();
+ finish();
}
-
-
void RS_ActionBlocksAdd::init(int status)
{
- RS_ActionInterface::init(status);
- trigger();
+ RS_ActionInterface::init(status);
+ trigger();
}
// EOF