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