author | insilmaril |
Wed Sep 06 12:47:06 2006 +0000 (2006-09-06) | |
changeset 378 | 1ab7353f8f44 |
parent 103 | c810a11d11d9 |
child 408 | c2a05fa925a1 |
permissions | -rw-r--r-- |
1 #ifndef FLAGOBJ_H
2 #define FLAGOBJ_H
5 #include <q3canvas.h>
6 #include <qaction.h>
7 //Added by qt3to4:
8 #include <QPixmap>
10 #include "mapobj.h"
11 #include "imageobj.h"
13 /////////////////////////////////////////////////////////////////////////////
14 class FlagObj:public MapObj {
15 public:
16 FlagObj ();
17 FlagObj (Q3Canvas*);
18 FlagObj (FlagObj*);
19 ~FlagObj ();
20 virtual void init ();
21 virtual void copy (FlagObj*);
22 virtual void move (double x,double y); // move to absolute Position
23 virtual void moveBy (double x,double y); // move to relative Position
24 virtual void setVisibility(bool);
25 void load (const QString&);
26 void load (const QPixmap&);
27 void setName (const QString&);
28 const QString getName ();
29 void setGroup (const QString&);
30 const QString getGroup();
31 void setToolTip(const QString&);
32 const QString getToolTip();
33 QPixmap getPixmap();
34 void setAction(QAction*);
35 void updateAction ();
36 bool isActive();
37 void toggle();
38 void activate();
39 void deactivate();
40 void setUsed (bool);
41 bool isUsed();
42 void saveToDir (const QString&, const QString&);
44 protected:
45 QString name;
46 QString group;
47 QString tooltip;
48 bool state;
49 bool used;
50 virtual void positionBBox();
51 virtual void calcBBoxSize();
52 private:
53 ImageObj* icon;
54 QAction* action;
55 };
57 #endif