X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionselectwindow.cpp;h=e47cd9405ecd75a98c549a68f2000c4d31541b9c;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=5685214fa4645aa67fef989903f32189a25ff444;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actionselectwindow.cpp b/src/actions/actionselectwindow.cpp index 5685214..e47cd94 100644 --- a/src/actions/actionselectwindow.cpp +++ b/src/actions/actionselectwindow.cpp @@ -3,7 +3,9 @@ // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun // Extensively rewritten and refactored by James L. Hammons -// (C) 2010 Underground Software +// Portions copyright (C) 2001-2003 RibbonSoft +// Copyright (C) 2010 Underground Software +// See the README and GPLv2 files for licensing and warranty information // // JLH = James L. Hammons // @@ -14,16 +16,18 @@ #include "actionselectwindow.h" -#include "rs_dialogfactory.h" -#include "rs_selection.h" -#include "rs_preview.h" +#include "debug.h" +#include "dialogfactory.h" +#include "graphicview.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) { @@ -57,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(); } } @@ -72,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(); } } @@ -100,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) { @@ -131,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; } } @@ -152,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); }