selection.h
author insilmaril
Mon Feb 19 12:01:52 2007 +0000 (2007-02-19)
changeset 428 9ae68208e2ff
parent 421 5522d1da7e37
child 440 c6a8651e6bbc
permissions -rw-r--r--
1.8.67 Bugfixes
     1 #ifndef SELECTION_H
     2 #define SELECTION_H
     3 
     4 #include "linkablemapobj.h"
     5 #include "mapcenterobj.h"
     6 
     7 enum SelectionType {Undefined,Branch,MapCenter,FloatImage};
     8 
     9 class Selection 
    10 {
    11 public:
    12 	Selection ();
    13 	~Selection();
    14 	void copy(const Selection&);
    15 	void clear();
    16 	void setMapCenter (MapCenterObj *);
    17 	
    18 	bool select (LinkableMapObj*);
    19 	bool select (const QString &);
    20 	bool reselect ();
    21 	void unselect ();
    22 	bool isEmpty();
    23 	uint count();
    24 	SelectionType type();
    25 	LinkableMapObj * first();		// first in selection list
    26 	LinkableMapObj * single();		// NULL, if multiple selected
    27 	BranchObj* getBranch();
    28 	FloatImageObj* getFloatImage();
    29 
    30 	QString getSelectString();
    31 
    32 private:
    33 	void init();
    34 	QList <LinkableMapObj*> selectList;
    35 	QList <LinkableMapObj*> lastSelectList;
    36 	MapCenterObj *mapCenter;
    37 };
    38 #endif
    39