flagrowobj.h
author insilmaril
Wed Mar 21 11:51:38 2007 +0000 (2007-03-21)
changeset 439 717b20c56358
parent 408 c2a05fa925a1
child 468 82bd254b58da
permissions -rw-r--r--
Slightly improved scripting abilities
     1 #ifndef FLAGROWOBJ_H
     2 #define FLAGROWOBJ_H
     3 
     4 #include <QMainWindow>
     5 
     6 #include "mapobj.h"
     7 #include "flagobj.h"
     8 
     9 class FlagRowObj:public MapObj {
    10 public:
    11     FlagRowObj ();
    12     FlagRowObj (QGraphicsScene *);
    13     ~FlagRowObj ();
    14     virtual void init ();
    15     virtual void copy (FlagRowObj*);
    16     virtual void clone(FlagRowObj*);
    17     virtual void move   (double,double);
    18     virtual void moveBy (double,double);
    19     virtual void setVisibility(bool);
    20     virtual FlagObj* addFlag (FlagObj *fo);			// make deep copy of FlagObj
    21     virtual void positionBBox();
    22     virtual void calcBBoxSize();
    23 	virtual QString getFlagName (const QPointF &p);	// Find flag by position
    24 	bool isActive(const QString&);
    25 	void toggle (const QString&,bool);
    26 	void activate(const QString&);
    27 	void deactivate(const QString&);
    28 	void deactivateAll();
    29 	void deactivateGroup(FlagObj *);
    30 	void setToolBar (QToolBar *);
    31 	void setEnabled (bool);
    32 	void setShowFlags (bool);
    33 	void resetUsedCounter();
    34 	QString saveToDir (const QString &,const QString &,bool);
    35 	void setName (const QString&);			// prefix for exporting flags to dir
    36 	void makeToolbar (QMainWindow*, const QString &);	// Create Toolbar buttons
    37 	void updateToolbar();					// Update Toolbar buttons	
    38 private:	
    39 	FlagRowObj* parentRow;					// look for flags in this row
    40 	FlagObj* findFlag (const QString&);
    41     QList <FlagObj*> flag; 
    42 	QToolBar *toolbar;
    43 	QString name;
    44 	bool showFlags;							// FloatObjects want to hide their flags
    45 };
    46 #endif