flagobj.h
branchrelease-1-12-maintained
changeset 39 e37153bea487
child 2 608f976aa7bb
child 103 c810a11d11d9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/flagobj.h	Thu Jul 17 09:27:20 2008 +0000
     1.3 @@ -0,0 +1,53 @@
     1.4 +#ifndef FLAGOBJ_H
     1.5 +#define FLAGOBJ_H
     1.6 +
     1.7 +
     1.8 +#include <qcanvas.h>
     1.9 +#include <qaction.h>
    1.10 +
    1.11 +#include "mapobj.h"
    1.12 +#include "imageobj.h"
    1.13 +
    1.14 +/////////////////////////////////////////////////////////////////////////////
    1.15 +class FlagObj:public MapObj {
    1.16 +public:
    1.17 +    FlagObj ();
    1.18 +    FlagObj (QCanvas*);
    1.19 +    FlagObj (FlagObj*);
    1.20 +    ~FlagObj ();
    1.21 +    virtual void init ();
    1.22 +    virtual void copy (FlagObj*);
    1.23 +    virtual void move (double x,double y);      // move to absolute Position
    1.24 +    virtual void moveBy (double x,double y);    // move to relative Position
    1.25 +    virtual void setVisibility(bool);
    1.26 +	void load (const QString&);
    1.27 +	void load (const QPixmap&);
    1.28 +	void setName (const QString&);
    1.29 +	const QString getName ();
    1.30 +	void setToolTip(const QString&);
    1.31 +	const QString getToolTip();
    1.32 +	void setButton (QAction*);
    1.33 +	void updateButton ();
    1.34 +	QPixmap getPixmap();
    1.35 +	bool isActive();
    1.36 +	void toggle();
    1.37 +	void activate();
    1.38 +	void deactivate();
    1.39 +	void setEnabled (bool);
    1.40 +	void setUsed (bool);
    1.41 +	bool isUsed();
    1.42 +	void saveToDir (const QString&, const QString&);
    1.43 +	
    1.44 +protected:	
    1.45 +	QString name;
    1.46 +	QString tooltip;
    1.47 +	bool state;
    1.48 +	bool used;
    1.49 +    virtual void positionBBox();
    1.50 +    virtual void calcBBoxSize();
    1.51 +private:
    1.52 +	ImageObj* icon;
    1.53 +	QAction* button;
    1.54 +};
    1.55 +
    1.56 +#endif