flagrowobj.h
author jhilmer
Mon, 01 Aug 2005 19:33:16 +0000
changeset 144 f4bbdc809fec
parent 103 c810a11d11d9
child 257 199f2626fe70
permissions -rw-r--r--
Fix: closing of editor when text are modified
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@0
    31
	void resetUsedCounter();
insilmaril@0
    32
	QString saveToDir (const QString &,const QString &,bool);
insilmaril@0
    33
	void setName (const QString&);			// prefix for exporting flags to dir
insilmaril@0
    34
	void makeToolbar (QMainWindow*, const QString &);	// Create Toolbar buttons
insilmaril@103
    35
	void updateToolbar();					// Update Toolbar buttons	
insilmaril@0
    36
private:	
insilmaril@0
    37
	FlagRowObj* parentRow;					// look for flags in this row
insilmaril@0
    38
	FlagObj* findFlag (const QString&);
insilmaril@0
    39
    QPtrList <FlagObj> flag; 
insilmaril@0
    40
	QString name;
insilmaril@0
    41
};
insilmaril@0
    42
#endif