author | insilmaril |
Wed May 06 10:00:18 2009 +0000 (2009-05-06) | |
branch | release-1-12-maintained |
changeset 68 | 3f25bb36200e |
child 2 | 608f976aa7bb |
child 103 | c810a11d11d9 |
permissions | -rw-r--r-- |
1 #ifndef FLAGOBJ_H
2 #define FLAGOBJ_H
5 #include <qcanvas.h>
6 #include <qaction.h>
8 #include "mapobj.h"
9 #include "imageobj.h"
11 /////////////////////////////////////////////////////////////////////////////
12 class FlagObj:public MapObj {
13 public:
14 FlagObj ();
15 FlagObj (QCanvas*);
16 FlagObj (FlagObj*);
17 ~FlagObj ();
18 virtual void init ();
19 virtual void copy (FlagObj*);
20 virtual void move (double x,double y); // move to absolute Position
21 virtual void moveBy (double x,double y); // move to relative Position
22 virtual void setVisibility(bool);
23 void load (const QString&);
24 void load (const QPixmap&);
25 void setName (const QString&);
26 const QString getName ();
27 void setToolTip(const QString&);
28 const QString getToolTip();
29 void setButton (QAction*);
30 void updateButton ();
31 QPixmap getPixmap();
32 bool isActive();
33 void toggle();
34 void activate();
35 void deactivate();
36 void setEnabled (bool);
37 void setUsed (bool);
38 bool isUsed();
39 void saveToDir (const QString&, const QString&);
41 protected:
42 QString name;
43 QString tooltip;
44 bool state;
45 bool used;
46 virtual void positionBBox();
47 virtual void calcBBoxSize();
48 private:
49 ImageObj* icon;
50 QAction* button;
51 };
53 #endif