flagobj.h
author insilmaril
Thu, 17 Jul 2008 09:27:20 +0000
branchrelease-1-12-maintained
changeset 39 e37153bea487
parent 0 7a96bd401351
child 2 608f976aa7bb
child 103 c810a11d11d9
permissions -rw-r--r--
removed pixel garbage on right side of exported images
     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 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&);
    40 	
    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 };
    52 
    53 #endif