selection.h
author insilmaril
Mon, 12 Feb 2007 09:28:47 +0000
changeset 427 fb74fa7bfb4c
parent 424 d886c77ac0fe
child 440 c6a8651e6bbc
permissions -rw-r--r--
1.8.66 Various fixes
     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