diff -r 000000000000 -r e37153bea487 flagobj.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flagobj.h Thu Jul 17 09:27:20 2008 +0000 @@ -0,0 +1,53 @@ +#ifndef FLAGOBJ_H +#define FLAGOBJ_H + + +#include +#include + +#include "mapobj.h" +#include "imageobj.h" + +///////////////////////////////////////////////////////////////////////////// +class FlagObj:public MapObj { +public: + FlagObj (); + FlagObj (QCanvas*); + FlagObj (FlagObj*); + ~FlagObj (); + virtual void init (); + virtual void copy (FlagObj*); + virtual void move (double x,double y); // move to absolute Position + virtual void moveBy (double x,double y); // move to relative Position + virtual void setVisibility(bool); + void load (const QString&); + void load (const QPixmap&); + void setName (const QString&); + const QString getName (); + void setToolTip(const QString&); + const QString getToolTip(); + void setButton (QAction*); + void updateButton (); + QPixmap getPixmap(); + bool isActive(); + void toggle(); + void activate(); + void deactivate(); + void setEnabled (bool); + void setUsed (bool); + bool isUsed(); + void saveToDir (const QString&, const QString&); + +protected: + QString name; + QString tooltip; + bool state; + bool used; + virtual void positionBBox(); + virtual void calcBBoxSize(); +private: + ImageObj* icon; + QAction* button; +}; + +#endif