/**
* @param both Trim both entities.
*/
-ActionModifyTrim::ActionModifyTrim(RS_EntityContainer & container,
+ActionModifyTrim::ActionModifyTrim(EntityContainer & container,
GraphicView & graphicView, bool both): ActionInterface("Trim Entity",
container, graphicView)
{
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;
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())
{
break;
}
- RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
+ DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
}
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())
{
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;
}
}
void ActionModifyTrim::updateToolBar()
{
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
}