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