1 // rs_actionselectall.cpp
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 05/22/2010 Added this text. :-)
15 #include "rs_actionselectall.h"
16 #include "rs_selection.h"
18 RS_ActionSelectAll::RS_ActionSelectAll(RS_EntityContainer& container,
19 RS_GraphicView& graphicView, bool select):
20 RS_ActionInterface("Select All Entities", container, graphicView)
22 this->select = select;
25 QAction * RS_ActionSelectAll::createGUIAction(RS2::ActionType type, QObject * parent)
29 if (type == RS2::ActionSelectAll)
31 action = new QAction(tr("Select &All"), parent);
32 action->setShortcut(Qt::CTRL + Qt::Key_A);
33 // action = new QAction(tr("Select All"), tr("Select &All"),
34 // CTRL+Key_A, parent);
35 action->setStatusTip(tr("Selects all Entities"));
39 action = new QAction(tr("Deselect &all"), parent);
40 action->setShortcut(Qt::CTRL + Qt::Key_K);
41 // action = new QAction(tr("Deselect all"), tr("Deselect &all"),
42 // CTRL+Key_K, parent);
43 action->setStatusTip(tr("Deselects all Entities"));
50 void RS_ActionSelectAll::init(int status)
52 RS_ActionInterface::init(status);
57 void RS_ActionSelectAll::trigger()
59 RS_Selection s(*container, graphicView);
62 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());