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