flagrow.h
author insilmaril
Thu, 18 Mar 2010 11:55:59 +0000
changeset 840 c13937960f1d
parent 774 2f002657dada
permissions -rw-r--r--
Added missing return values
     1 #ifndef FLAGROW_H
     2 #define FLAGROW_H
     3 
     4 #include <QStringList>
     5 #include <QToolBar>
     6 
     7 #include "flag.h"
     8 #include "xmlobj.h"
     9 
    10 /*! \brief A set of flags (Flag). 
    11 
    12    A toolbar can be created from the flags in this row.
    13    The data needed for represention in a vym map 
    14    is stored in FlagRowObj.
    15  */
    16 
    17 class FlagRow:public XMLObj {
    18 public:
    19     FlagRow ();
    20     ~FlagRow ();
    21 	void addFlag (Flag *flag);
    22 	Flag *getFlag (const QString &name);
    23 	QStringList  activeFlagNames();
    24 	bool isActive(const QString &name);
    25 
    26 	/*! \brief Toggle a Flag 
    27 		
    28 		To activate a flag it will be copied from masterRow to current row.
    29 	*/	
    30 	void toggle (const QString&, FlagRow *masterRow=NULL);
    31 	void activate(const QString&);
    32 	void deactivate(const QString&);
    33 	void deactivateAll();
    34 	void setEnabled (bool);
    35 	void setShowFlags (bool);
    36 	void resetUsedCounter();
    37 	QString saveToDir (const QString &,const QString &,bool);
    38 	void setName (const QString&);			// prefix for exporting flags to dir
    39 	void setToolBar   (QToolBar *tb);
    40 	void setMasterRow (FlagRow *row);
    41 	void updateToolBar(const QStringList &activeNames);
    42 
    43 private:	
    44 	QToolBar *toolBar;
    45 	FlagRow *masterRow;
    46 	QList <Flag*> flags; 
    47 	QStringList activeNames;	//! Lists all names of currently active flags
    48 	QString rowName;			//! Name of this collection of flags
    49 //	bool showFlags;				// FloatObjects want to hide their flags
    50 };
    51 #endif
    52