author | insilmaril |
Wed Dec 05 14:58:03 2007 +0000 (2007-12-05) | |
changeset 631 | ba4a99830ad1 |
parent 425 | 7014be3ac7d0 |
child 766 | 7a71a914afdb |
permissions | -rw-r--r-- |
insilmaril@0 | 1 |
#ifndef FLAGROWOBJ_H |
insilmaril@0 | 2 |
#define FLAGROWOBJ_H |
insilmaril@0 | 3 |
|
insilmaril@366 | 4 |
#include <QMainWindow> |
insilmaril@0 | 5 |
|
insilmaril@0 | 6 |
#include "mapobj.h" |
insilmaril@0 | 7 |
#include "flagobj.h" |
insilmaril@0 | 8 |
|
insilmaril@468 | 9 |
/*! \brief A collection of flags (FlagObj). |
insilmaril@468 | 10 |
|
insilmaril@468 | 11 |
The flags are aligned horizontally in a row on the map. |
insilmaril@468 | 12 |
A toolbar can be created from the flags in this row. |
insilmaril@468 | 13 |
*/ |
insilmaril@468 | 14 |
|
insilmaril@425 | 15 |
class FlagRowObj:public MapObj { |
insilmaril@0 | 16 |
public: |
insilmaril@0 | 17 |
FlagRowObj (); |
insilmaril@408 | 18 |
FlagRowObj (QGraphicsScene *); |
insilmaril@0 | 19 |
~FlagRowObj (); |
insilmaril@0 | 20 |
virtual void init (); |
insilmaril@0 | 21 |
virtual void copy (FlagRowObj*); |
insilmaril@0 | 22 |
virtual void clone(FlagRowObj*); |
insilmaril@0 | 23 |
virtual void move (double,double); |
insilmaril@0 | 24 |
virtual void moveBy (double,double); |
insilmaril@0 | 25 |
virtual void setVisibility(bool); |
insilmaril@0 | 26 |
virtual FlagObj* addFlag (FlagObj *fo); // make deep copy of FlagObj |
insilmaril@0 | 27 |
virtual void positionBBox(); |
insilmaril@0 | 28 |
virtual void calcBBoxSize(); |
insilmaril@408 | 29 |
virtual QString getFlagName (const QPointF &p); // Find flag by position |
insilmaril@0 | 30 |
bool isActive(const QString&); |
insilmaril@103 | 31 |
void toggle (const QString&,bool); |
insilmaril@0 | 32 |
void activate(const QString&); |
insilmaril@0 | 33 |
void deactivate(const QString&); |
insilmaril@0 | 34 |
void deactivateAll(); |
insilmaril@103 | 35 |
void deactivateGroup(FlagObj *); |
insilmaril@366 | 36 |
void setToolBar (QToolBar *); |
insilmaril@0 | 37 |
void setEnabled (bool); |
insilmaril@257 | 38 |
void setShowFlags (bool); |
insilmaril@0 | 39 |
void resetUsedCounter(); |
insilmaril@0 | 40 |
QString saveToDir (const QString &,const QString &,bool); |
insilmaril@0 | 41 |
void setName (const QString&); // prefix for exporting flags to dir |
insilmaril@0 | 42 |
void makeToolbar (QMainWindow*, const QString &); // Create Toolbar buttons |
insilmaril@103 | 43 |
void updateToolbar(); // Update Toolbar buttons |
insilmaril@0 | 44 |
private: |
insilmaril@0 | 45 |
FlagRowObj* parentRow; // look for flags in this row |
insilmaril@0 | 46 |
FlagObj* findFlag (const QString&); |
insilmaril@406 | 47 |
QList <FlagObj*> flag; |
insilmaril@366 | 48 |
QToolBar *toolbar; |
insilmaril@0 | 49 |
QString name; |
insilmaril@257 | 50 |
bool showFlags; // FloatObjects want to hide their flags |
insilmaril@0 | 51 |
}; |
insilmaril@0 | 52 |
#endif |