author | anng888 |
Thu, 06 Dec 2007 18:30:29 +0000 | |
changeset 632 | f4282e4db9f7 |
parent 581 | eaa3798cc33a |
child 767 | 6d2b32f305f9 |
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@0 | 8 |
#include "mapobj.h" |
insilmaril@0 | 9 |
#include "imageobj.h" |
insilmaril@0 | 10 |
|
insilmaril@467 | 11 |
/*! \brief One flag which is visible in the map. |
insilmaril@467 | 12 |
|
insilmaril@467 | 13 |
Flags are aligned in a row. |
insilmaril@467 | 14 |
*/ |
insilmaril@467 | 15 |
|
insilmaril@467 | 16 |
|
insilmaril@0 | 17 |
///////////////////////////////////////////////////////////////////////////// |
insilmaril@0 | 18 |
class FlagObj:public MapObj { |
insilmaril@0 | 19 |
public: |
insilmaril@0 | 20 |
FlagObj (); |
insilmaril@408 | 21 |
FlagObj (QGraphicsScene*); |
insilmaril@0 | 22 |
FlagObj (FlagObj*); |
insilmaril@0 | 23 |
~FlagObj (); |
insilmaril@0 | 24 |
virtual void init (); |
insilmaril@0 | 25 |
virtual void copy (FlagObj*); |
insilmaril@0 | 26 |
virtual void move (double x,double y); // move to absolute Position |
insilmaril@0 | 27 |
virtual void moveBy (double x,double y); // move to relative Position |
insilmaril@0 | 28 |
virtual void setVisibility(bool); |
insilmaril@0 | 29 |
void load (const QString&); |
insilmaril@0 | 30 |
void load (const QPixmap&); |
insilmaril@0 | 31 |
void setName (const QString&); |
insilmaril@0 | 32 |
const QString getName (); |
insilmaril@103 | 33 |
void setGroup (const QString&); |
insilmaril@103 | 34 |
const QString getGroup(); |
insilmaril@581 | 35 |
void unsetGroup (); |
insilmaril@0 | 36 |
void setToolTip(const QString&); |
insilmaril@0 | 37 |
const QString getToolTip(); |
insilmaril@0 | 38 |
QPixmap getPixmap(); |
insilmaril@366 | 39 |
void setAction(QAction*); |
insilmaril@366 | 40 |
void updateAction (); |
insilmaril@581 | 41 |
void setAlwaysVisible (bool b); |
insilmaril@581 | 42 |
bool isAlwaysVisible (); |
insilmaril@0 | 43 |
bool isActive(); |
insilmaril@0 | 44 |
void toggle(); |
insilmaril@0 | 45 |
void activate(); |
insilmaril@0 | 46 |
void deactivate(); |
insilmaril@0 | 47 |
void setUsed (bool); |
insilmaril@0 | 48 |
bool isUsed(); |
insilmaril@0 | 49 |
void saveToDir (const QString&, const QString&); |
insilmaril@0 | 50 |
|
insilmaril@0 | 51 |
protected: |
insilmaril@0 | 52 |
QString name; |
insilmaril@103 | 53 |
QString group; |
insilmaril@0 | 54 |
QString tooltip; |
insilmaril@0 | 55 |
bool state; |
insilmaril@581 | 56 |
bool avis; |
insilmaril@0 | 57 |
bool used; |
insilmaril@0 | 58 |
virtual void positionBBox(); |
insilmaril@0 | 59 |
virtual void calcBBoxSize(); |
insilmaril@0 | 60 |
private: |
insilmaril@0 | 61 |
ImageObj* icon; |
insilmaril@366 | 62 |
QAction* action; |
insilmaril@0 | 63 |
}; |
insilmaril@0 | 64 |
|
insilmaril@0 | 65 |
#endif |