flagrowobj.h
author insilmaril
Thu Sep 14 11:38:17 2006 +0000 (2006-09-14)
changeset 382 8b0ab4c0f767
parent 257 199f2626fe70
child 406 1c8ff1928b97
permissions -rw-r--r--
1.8.57 - more changes in history window, Note Editor is QT4 now
     1 #ifndef FLAGROWOBJ_H
     2 #define FLAGROWOBJ_H
     3 
     4 #include <QMainWindow>
     5 //Added by qt3to4:
     6 #include <Q3PtrList>
     7 
     8 #include "mapobj.h"
     9 #include "flagobj.h"
    10 
    11 class FlagRowObj:public QObject,public MapObj {
    12 public:
    13     FlagRowObj ();
    14     FlagRowObj (Q3Canvas*);
    15     ~FlagRowObj ();
    16     virtual void init ();
    17     virtual void copy (FlagRowObj*);
    18     virtual void clone(FlagRowObj*);
    19     virtual void move   (double,double);
    20     virtual void moveBy (double,double);
    21     virtual void setVisibility(bool);
    22     virtual FlagObj* addFlag (FlagObj *fo);			// make deep copy of FlagObj
    23     virtual void positionBBox();
    24     virtual void calcBBoxSize();
    25 	virtual QString getFlagName (const QPoint &p);	// Find flag by position
    26 	bool isActive(const QString&);
    27 	void toggle (const QString&,bool);
    28 	void activate(const QString&);
    29 	void deactivate(const QString&);
    30 	void deactivateAll();
    31 	void deactivateGroup(FlagObj *);
    32 	void setToolBar (QToolBar *);
    33 	void setEnabled (bool);
    34 	void setShowFlags (bool);
    35 	void resetUsedCounter();
    36 	QString saveToDir (const QString &,const QString &,bool);
    37 	void setName (const QString&);			// prefix for exporting flags to dir
    38 	void makeToolbar (QMainWindow*, const QString &);	// Create Toolbar buttons
    39 	void updateToolbar();					// Update Toolbar buttons	
    40 private:	
    41 	FlagRowObj* parentRow;					// look for flags in this row
    42 	FlagObj* findFlag (const QString&);
    43     Q3PtrList <FlagObj> flag; 
    44 	QToolBar *toolbar;
    45 	QString name;
    46 	bool showFlags;							// FloatObjects want to hide their flags
    47 };
    48 #endif