author | insilmaril |
Mon Jan 14 16:27:00 2008 +0000 (2008-01-14) | |
changeset 648 | e4435f252e44 |
parent 492 | cf60b90369a4 |
child 721 | 12958f987bcf |
permissions | -rw-r--r-- |
1 #ifndef SELECTION_H
2 #define SELECTION_H
4 #include <QString>
5 #include <QList>
6 #include <QGraphicsScene>
9 class BranchObj;
10 class FloatImageObj;
11 class MapCenterObj;
12 class LinkableMapObj;
13 class VymModel;
16 class Selection
17 {
18 public:
19 enum Type {Undefined,Branch,MapCenter,FloatImage};
20 Selection ();
21 ~Selection();
22 void copy(const Selection&);
23 void clear();
24 void setModel (VymModel *);
25 void update();
26 void setColor (QColor c);
27 QColor getColor ();
28 bool select (LinkableMapObj*);
29 bool select (const QString &);
30 bool reselect ();
31 void unselect ();
32 bool isEmpty();
33 uint count();
34 Type type();
35 LinkableMapObj * first(); // first in selection list
36 LinkableMapObj * single(); // NULL, if multiple selected
37 BranchObj* getBranch();
38 FloatImageObj* getFloatImage();
40 QString getSelectString();
42 private:
43 void init();
44 QList <LinkableMapObj*> selectList;
45 QList <LinkableMapObj*> lastSelectList;
46 QList <QGraphicsRectItem*> selboxList;
47 VymModel *model;
48 QGraphicsScene *scene;
50 QColor color;
51 };
52 #endif