flagobj.h
author insilmaril
Fri Dec 29 13:52:17 2006 +0000 (2006-12-29)
changeset 413 c3f7beb4e9f4
parent 366 e95081c21da2
child 467 b54deedfcfdd
permissions -rw-r--r--
Removed some FIXMEs. Added translations
     1 #ifndef FLAGOBJ_H
     2 #define FLAGOBJ_H
     3 
     4 
     5 #include <QAction>
     6 #include <QPixmap>
     7 
     8 #include "mapobj.h"
     9 #include "imageobj.h"
    10 
    11 /////////////////////////////////////////////////////////////////////////////
    12 class FlagObj:public MapObj {
    13 public:
    14     FlagObj ();
    15     FlagObj (QGraphicsScene*);
    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 setGroup (const QString&);
    28 	const QString getGroup();
    29 	void setToolTip(const QString&);
    30 	const QString getToolTip();
    31 	QPixmap getPixmap();
    32 	void setAction(QAction*);
    33 	void updateAction ();
    34 	bool isActive();
    35 	void toggle();
    36 	void activate();
    37 	void deactivate();
    38 	void setUsed (bool);
    39 	bool isUsed();
    40 	void saveToDir (const QString&, const QString&);
    41 	
    42 protected:	
    43 	QString name;
    44 	QString group;
    45 	QString tooltip;
    46 	bool state;
    47 	bool used;
    48     virtual void positionBBox();
    49     virtual void calcBBoxSize();
    50 private:
    51 	ImageObj* icon;
    52 	QAction* action;
    53 };
    54 
    55 #endif