flagrowobj.h
author insilmaril
Mon May 18 09:41:31 2009 +0000 (2009-05-18)
changeset 770 57ce1ba6d1cb
parent 766 7a71a914afdb
child 819 8f987e376035
permissions -rw-r--r--
Fixed Standard Flags finally
     1 #ifndef FLAGROWOBJ_H
     2 #define FLAGROWOBJ_H
     3 
     4 #include <QMainWindow>
     5 
     6 //#include "mapobj.h"
     7 #include "flagobj.h"
     8 
     9 class Flag;
    10 
    11 /*! \brief A collection of flags (FlagObj) in a map. 
    12 
    13    The flags are aligned horizontally  in a row on the map. 
    14  */
    15 
    16 class FlagRowObj:public MapObj {
    17 public:
    18     FlagRowObj ();
    19     FlagRowObj (QGraphicsScene *);
    20     ~FlagRowObj ();
    21     virtual void init ();
    22     virtual void copy (FlagRowObj*);
    23     virtual void move   (double,double);
    24     virtual void moveBy (double,double);
    25     virtual void setVisibility(bool);
    26     virtual FlagObj* addFlag (FlagObj *fo);			// make deep copy of FlagObj
    27 	virtual QStringList activeFlagNames();
    28     virtual void positionBBox();
    29     virtual void calcBBoxSize();
    30 	virtual QString getFlagName (const QPointF &p);	// Find flag by position
    31 	bool isActive(const QString&);
    32 	void activate (Flag *flag);
    33 	void deactivate(const QString&);
    34 	void setShowFlags (bool);
    35 private:	
    36 	FlagObj* findFlag (const QString&);
    37     QList <FlagObj*> flag; 
    38 	bool showFlags;							// FloatObjects want to hide their flags
    39 };
    40 #endif