flagobj.h
author insilmaril
Thu Jul 28 10:23:25 2005 +0000 (2005-07-28)
changeset 141 c93caccfc116
parent 0 7a96bd401351
child 366 e95081c21da2
permissions -rw-r--r--
1.7.3 Bugfix: scrolled frames were not hidden
     1 #ifndef FLAGOBJ_H
     2 #define FLAGOBJ_H
     3 
     4 
     5 #include <qcanvas.h>
     6 #include <qaction.h>
     7 
     8 #include "mapobj.h"
     9 #include "imageobj.h"
    10 
    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 setGroup (const QString&);
    28 	const QString getGroup();
    29 	void setToolTip(const QString&);
    30 	const QString getToolTip();
    31 	void setButton (QAction*);
    32 	void updateButton ();
    33 	QPixmap getPixmap();
    34 	bool isActive();
    35 	void toggle();
    36 	void activate();
    37 	void deactivate();
    38 	void setEnabled (bool);
    39 	void setUsed (bool);
    40 	bool isUsed();
    41 	void saveToDir (const QString&, const QString&);
    42 	
    43 protected:	
    44 	QString name;
    45 	QString group;
    46 	QString tooltip;
    47 	bool state;
    48 	bool used;
    49     virtual void positionBBox();
    50     virtual void calcBBoxSize();
    51 private:
    52 	ImageObj* icon;
    53 	QAction* button;
    54 };
    55 
    56 #endif