author | insilmaril |
Mon May 18 09:41:31 2009 +0000 (2009-05-18) | |
changeset 770 | 57ce1ba6d1cb |
parent 581 | eaa3798cc33a |
permissions | -rw-r--r-- |
insilmaril@0 | 1 |
#ifndef FLAGOBJ_H |
insilmaril@0 | 2 |
#define FLAGOBJ_H |
insilmaril@0 | 3 |
|
insilmaril@0 | 4 |
|
insilmaril@408 | 5 |
#include <QAction> |
insilmaril@366 | 6 |
#include <QPixmap> |
insilmaril@0 | 7 |
|
insilmaril@767 | 8 |
#include "flag.h" |
insilmaril@0 | 9 |
#include "mapobj.h" |
insilmaril@0 | 10 |
#include "imageobj.h" |
insilmaril@0 | 11 |
|
insilmaril@467 | 12 |
/*! \brief One flag which is visible in the map. |
insilmaril@467 | 13 |
|
insilmaril@467 | 14 |
Flags are aligned in a row. |
insilmaril@467 | 15 |
*/ |
insilmaril@467 | 16 |
|
insilmaril@467 | 17 |
|
insilmaril@0 | 18 |
///////////////////////////////////////////////////////////////////////////// |
insilmaril@0 | 19 |
class FlagObj:public MapObj { |
insilmaril@0 | 20 |
public: |
insilmaril@0 | 21 |
FlagObj (); |
insilmaril@408 | 22 |
FlagObj (QGraphicsScene*); |
insilmaril@0 | 23 |
FlagObj (FlagObj*); |
insilmaril@767 | 24 |
FlagObj (Flag*); |
insilmaril@0 | 25 |
~FlagObj (); |
insilmaril@0 | 26 |
virtual void init (); |
insilmaril@0 | 27 |
virtual void copy (FlagObj*); |
insilmaril@0 | 28 |
virtual void move (double x,double y); // move to absolute Position |
insilmaril@0 | 29 |
virtual void moveBy (double x,double y); // move to relative Position |
insilmaril@0 | 30 |
virtual void setVisibility(bool); |
insilmaril@0 | 31 |
void load (const QString&); |
insilmaril@0 | 32 |
void load (const QPixmap&); |
insilmaril@0 | 33 |
void setName (const QString&); |
insilmaril@0 | 34 |
const QString getName (); |
insilmaril@0 | 35 |
QPixmap getPixmap(); |
insilmaril@366 | 36 |
void setAction(QAction*); |
insilmaril@581 | 37 |
void setAlwaysVisible (bool b); |
insilmaril@581 | 38 |
bool isAlwaysVisible (); |
insilmaril@0 | 39 |
bool isActive(); |
insilmaril@0 | 40 |
void toggle(); |
insilmaril@0 | 41 |
void activate(); |
insilmaril@0 | 42 |
void deactivate(); |
insilmaril@0 | 43 |
void saveToDir (const QString&, const QString&); |
insilmaril@0 | 44 |
|
insilmaril@0 | 45 |
protected: |
insilmaril@0 | 46 |
QString name; |
insilmaril@0 | 47 |
bool state; |
insilmaril@581 | 48 |
bool avis; |
insilmaril@0 | 49 |
virtual void positionBBox(); |
insilmaril@0 | 50 |
virtual void calcBBoxSize(); |
insilmaril@0 | 51 |
private: |
insilmaril@0 | 52 |
ImageObj* icon; |
insilmaril@0 | 53 |
}; |
insilmaril@0 | 54 |
|
insilmaril@0 | 55 |
#endif |