3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 06/04/2010 Added this text. :-)
15 #include "rs_actionselect.h"
17 #include "rs_actionselectsingle.h"
18 #include "rs_dialogfactory.h"
19 #include "graphicview.h"
21 RS_ActionSelect::RS_ActionSelect(RS_EntityContainer & container, GraphicView & graphicView,
22 RS2::ActionType nextAction):
23 RS_ActionInterface("Select Entities", container, graphicView)
25 this->nextAction = nextAction;
28 RS_ActionSelect::~RS_ActionSelect()
32 void RS_ActionSelect::init(int status)
34 RS_ActionInterface::init(status);
35 graphicView->setCurrentAction(new RS_ActionSelectSingle(*container, *graphicView));
38 void RS_ActionSelect::mouseReleaseEvent(QMouseEvent * e)
40 if (e->button() == Qt::RightButton)
41 init(getStatus() - 1);
44 void RS_ActionSelect::updateToolBar()
49 RS_DIALOGFACTORY->requestToolBarSelect(this, nextAction);
51 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);