author | insilmaril |
Mon Apr 24 10:05:10 2006 +0000 (2006-04-24) | |
changeset 302 | 8f89af56933d |
parent 103 | c810a11d11d9 |
child 366 | e95081c21da2 |
permissions | -rw-r--r-- |
insilmaril@0 | 1 |
#ifndef FLAGROWOBJ_H |
insilmaril@0 | 2 |
#define FLAGROWOBJ_H |
insilmaril@0 | 3 |
|
insilmaril@0 | 4 |
#include <qmainwindow.h> |
insilmaril@0 | 5 |
|
insilmaril@0 | 6 |
#include "mapobj.h" |
insilmaril@0 | 7 |
#include "flagobj.h" |
insilmaril@0 | 8 |
|
insilmaril@0 | 9 |
class FlagRowObj:public QObject,public MapObj { |
insilmaril@0 | 10 |
public: |
insilmaril@0 | 11 |
FlagRowObj (); |
insilmaril@0 | 12 |
FlagRowObj (QCanvas*); |
insilmaril@0 | 13 |
~FlagRowObj (); |
insilmaril@0 | 14 |
virtual void init (); |
insilmaril@0 | 15 |
virtual void copy (FlagRowObj*); |
insilmaril@0 | 16 |
virtual void clone(FlagRowObj*); |
insilmaril@0 | 17 |
virtual void move (double,double); |
insilmaril@0 | 18 |
virtual void moveBy (double,double); |
insilmaril@0 | 19 |
virtual void setVisibility(bool); |
insilmaril@0 | 20 |
virtual FlagObj* addFlag (FlagObj *fo); // make deep copy of FlagObj |
insilmaril@0 | 21 |
virtual void positionBBox(); |
insilmaril@0 | 22 |
virtual void calcBBoxSize(); |
insilmaril@0 | 23 |
virtual QString getFlagName (const QPoint &p); // Find flag by position |
insilmaril@0 | 24 |
bool isActive(const QString&); |
insilmaril@103 | 25 |
void toggle (const QString&,bool); |
insilmaril@0 | 26 |
void activate(const QString&); |
insilmaril@0 | 27 |
void deactivate(const QString&); |
insilmaril@0 | 28 |
void deactivateAll(); |
insilmaril@103 | 29 |
void deactivateGroup(FlagObj *); |
insilmaril@0 | 30 |
void setEnabled (bool); |
insilmaril@257 | 31 |
void setShowFlags (bool); |
insilmaril@0 | 32 |
void resetUsedCounter(); |
insilmaril@0 | 33 |
QString saveToDir (const QString &,const QString &,bool); |
insilmaril@0 | 34 |
void setName (const QString&); // prefix for exporting flags to dir |
insilmaril@0 | 35 |
void makeToolbar (QMainWindow*, const QString &); // Create Toolbar buttons |
insilmaril@103 | 36 |
void updateToolbar(); // Update Toolbar buttons |
insilmaril@0 | 37 |
private: |
insilmaril@0 | 38 |
FlagRowObj* parentRow; // look for flags in this row |
insilmaril@0 | 39 |
FlagObj* findFlag (const QString&); |
insilmaril@0 | 40 |
QPtrList <FlagObj> flag; |
insilmaril@0 | 41 |
QString name; |
insilmaril@257 | 42 |
bool showFlags; // FloatObjects want to hide their flags |
insilmaril@0 | 43 |
}; |
insilmaril@0 | 44 |
#endif |