*
* @param select true: select window. false: deselect window
*/
-ActionSelectWindow::ActionSelectWindow(RS_EntityContainer & container,
+ActionSelectWindow::ActionSelectWindow(EntityContainer & container,
GraphicView & graphicView, bool select):
ActionInterface("Select Window", container, graphicView)
{
{
deleteSnapper();
bool cross = (v2.y > v1.y);
- RS_Selection s(*container, graphicView);
+ Selection s(*container, graphicView);
s.selectWindow(v1, v2, select, cross);
- RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+ DIALOGFACTORY->updateSelectionWidget(container->countSelected());
init();
}
}
v2 = snapPoint(e);
deletePreview();
clearPreview();
-/* preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
- preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
- preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
- preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
+/* preview->addEntity(new Line(preview,
+ LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
+ preview->addEntity(new Line(preview,
+ LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
+ preview->addEntity(new Line(preview,
+ LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
+ preview->addEntity(new Line(preview,
+ LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
drawPreview();
}
}
}
}
- RS_DEBUG->print("ActionSelectWindow::mousePressEvent(): %f %f",
+ DEBUG->print("ActionSelectWindow::mousePressEvent(): %f %f",
v1.x, v1.y);
}
void ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e)
{
- RS_DEBUG->print("ActionSelectWindow::mouseReleaseEvent()");
+ DEBUG->print("ActionSelectWindow::mouseReleaseEvent()");
if (e->button() == Qt::LeftButton)
{
switch (getStatus())
{
case SetCorner1:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Choose first edge"), tr("Cancel"));
+ DIALOGFACTORY->updateMouseWidget(tr("Choose first edge"), tr("Cancel"));
break;
case SetCorner2:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Choose second edge"), tr("Back"));
+ DIALOGFACTORY->updateMouseWidget(tr("Choose second edge"), tr("Back"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}
void ActionSelectWindow::updateToolBar()
{
if (!isFinished())
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
else
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
}