author | insilmaril |
Tue Feb 21 16:18:23 2006 +0000 (2006-02-21) | |
changeset 217 | 375be2baa976 |
parent 0 | 7a96bd401351 |
child 366 | e95081c21da2 |
permissions | -rw-r--r-- |
insilmaril@0 | 1 |
#ifndef FLAGOBJ_H |
insilmaril@0 | 2 |
#define FLAGOBJ_H |
insilmaril@0 | 3 |
|
insilmaril@0 | 4 |
|
insilmaril@0 | 5 |
#include <qcanvas.h> |
insilmaril@0 | 6 |
#include <qaction.h> |
insilmaril@0 | 7 |
|
insilmaril@0 | 8 |
#include "mapobj.h" |
insilmaril@0 | 9 |
#include "imageobj.h" |
insilmaril@0 | 10 |
|
insilmaril@0 | 11 |
///////////////////////////////////////////////////////////////////////////// |
insilmaril@0 | 12 |
class FlagObj:public MapObj { |
insilmaril@0 | 13 |
public: |
insilmaril@0 | 14 |
FlagObj (); |
insilmaril@0 | 15 |
FlagObj (QCanvas*); |
insilmaril@0 | 16 |
FlagObj (FlagObj*); |
insilmaril@0 | 17 |
~FlagObj (); |
insilmaril@0 | 18 |
virtual void init (); |
insilmaril@0 | 19 |
virtual void copy (FlagObj*); |
insilmaril@0 | 20 |
virtual void move (double x,double y); // move to absolute Position |
insilmaril@0 | 21 |
virtual void moveBy (double x,double y); // move to relative Position |
insilmaril@0 | 22 |
virtual void setVisibility(bool); |
insilmaril@0 | 23 |
void load (const QString&); |
insilmaril@0 | 24 |
void load (const QPixmap&); |
insilmaril@0 | 25 |
void setName (const QString&); |
insilmaril@0 | 26 |
const QString getName (); |
insilmaril@103 | 27 |
void setGroup (const QString&); |
insilmaril@103 | 28 |
const QString getGroup(); |
insilmaril@0 | 29 |
void setToolTip(const QString&); |
insilmaril@0 | 30 |
const QString getToolTip(); |
insilmaril@0 | 31 |
void setButton (QAction*); |
insilmaril@0 | 32 |
void updateButton (); |
insilmaril@0 | 33 |
QPixmap getPixmap(); |
insilmaril@0 | 34 |
bool isActive(); |
insilmaril@0 | 35 |
void toggle(); |
insilmaril@0 | 36 |
void activate(); |
insilmaril@0 | 37 |
void deactivate(); |
insilmaril@0 | 38 |
void setEnabled (bool); |
insilmaril@0 | 39 |
void setUsed (bool); |
insilmaril@0 | 40 |
bool isUsed(); |
insilmaril@0 | 41 |
void saveToDir (const QString&, const QString&); |
insilmaril@0 | 42 |
|
insilmaril@0 | 43 |
protected: |
insilmaril@0 | 44 |
QString name; |
insilmaril@103 | 45 |
QString group; |
insilmaril@0 | 46 |
QString tooltip; |
insilmaril@0 | 47 |
bool state; |
insilmaril@0 | 48 |
bool used; |
insilmaril@0 | 49 |
virtual void positionBBox(); |
insilmaril@0 | 50 |
virtual void calcBBoxSize(); |
insilmaril@0 | 51 |
private: |
insilmaril@0 | 52 |
ImageObj* icon; |
insilmaril@0 | 53 |
QAction* button; |
insilmaril@0 | 54 |
}; |
insilmaril@0 | 55 |
|
insilmaril@0 | 56 |
#endif |