]> Shamusworld >> Repos - architektonas/blob - src/base/rs_selection.h
Final round of dialogs/forms needing to be converted from Qt3 to 4
[architektonas] / src / base / rs_selection.h
1 #ifndef RS_SELECTION_H
2 #define RS_SELECTION_H
3
4 #include "rs_entitycontainer.h"
5 #include "rs_graphicview.h"
6
7 /**
8  * API Class for selecting entities.
9  * There's no interaction handled in this class.
10  * This class is connected to an entity container and
11  * can be connected to a graphic view.
12  *
13  * @author Andrew Mustun
14  */
15 class RS_Selection
16 {
17         public:
18                 RS_Selection(RS_EntityContainer & entityContainer,
19                                         RS_GraphicView * graphicView = NULL);
20
21                 void selectSingle(RS_Entity * e);
22                 void selectAll(bool select = true);
23                 void deselectAll();
24                 void invertSelection();
25                 void selectWindow(const Vector & v1, const Vector & v2,
26                         bool select = true, bool cross = false);
27                 void deselectWindow(const Vector & v1, const Vector & v2);
28                 void selectIntersected(const Vector & v1, const Vector & v2,
29                         bool select = true);
30                 void deselectIntersected(const Vector & v1, const Vector & v2);
31                 void selectContour(RS_Entity * e);
32                 void selectLayer(RS_Entity * e);
33                 void selectLayer(const QString & layerName, bool select = true);
34                 void deselectLayer(QString & layerName);
35
36         protected:
37                 RS_EntityContainer * container;
38                 Drawing * graphic;
39                 RS_GraphicView * graphicView;
40 };
41
42 #endif