X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionselectwindow.cpp;h=e47cd9405ecd75a98c549a68f2000c4d31541b9c;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=06d0ba174da10eb4fafda6a98eaf150624e1ede5;hpb=48105dec9198cf5a81dd9286010d0d45e28f70c3;p=architektonas diff --git a/src/actions/actionselectwindow.cpp b/src/actions/actionselectwindow.cpp index 06d0ba1..e47cd94 100644 --- a/src/actions/actionselectwindow.cpp +++ b/src/actions/actionselectwindow.cpp @@ -16,18 +16,18 @@ #include "actionselectwindow.h" -#include "rs_debug.h" -#include "rs_dialogfactory.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_selection.h" -#include "rs_preview.h" +#include "selection.h" +#include "preview.h" /** * Constructor. * * @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) { @@ -61,9 +61,9 @@ void ActionSelectWindow::trigger() { 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(); } } @@ -76,14 +76,14 @@ void ActionSelectWindow::mouseMoveEvent(QMouseEvent * e) 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(); } } @@ -104,13 +104,13 @@ void ActionSelectWindow::mousePressEvent(QMouseEvent * e) } } - 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) { @@ -135,15 +135,15 @@ void ActionSelectWindow::updateMouseButtonHints() 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; } } @@ -156,7 +156,7 @@ void ActionSelectWindow::updateMouseCursor() void ActionSelectWindow::updateToolBar() { if (!isFinished()) - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect); else - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect); }