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