flag.h
author insilmaril
Mon Jul 27 12:53:17 2009 +0000 (2009-07-27)
changeset 783 85dec6a8c12c
child 837 5ecd0462f76b
permissions -rw-r--r--
Playing with dbus, fixed name of TW translation file
     1 #ifndef FLAG_H
     2 #define FLAG_H
     3 
     4 
     5 #include <QAction>
     6 #include <QPixmap>
     7 
     8 #include "xmlobj.h"
     9 
    10 /*! \brief One flag belonging to a FlagRow.
    11 
    12 	Each TreeItem in a VymModel has a set of standard flags and system
    13 	flags.
    14 */
    15 
    16 
    17 /////////////////////////////////////////////////////////////////////////////
    18 class Flag:public XMLObj {
    19 public:
    20     Flag ();
    21     Flag (Flag*);
    22     ~Flag ();
    23     virtual void init ();
    24     virtual void copy (Flag*);
    25 	void load (const QString&);
    26 	void load (const QPixmap&);
    27 	void setName (const QString&);
    28 	const QString getName ();
    29 	void setVisible (bool b);
    30 	bool isVisible ();
    31 	void setGroup (const QString&);
    32 	const QString getGroup();
    33 	void unsetGroup ();
    34 	void setToolTip(const QString&);
    35 	const QString getToolTip();
    36 	QPixmap getPixmap();
    37 	void setAction (QAction *a);
    38 	QAction* getAction ();
    39 	void setUsed (bool);	//FIXME-3 needed?
    40 	bool isUsed();
    41 	void saveToDir (const QString&, const QString&);
    42 	
    43 protected:	
    44 	QString name;
    45 	bool visible;
    46 	QString group;
    47 	QString tooltip;
    48 	QAction *action;
    49 	bool state;
    50 	bool used;
    51 private:
    52 	QPixmap pixmap;
    53 };
    54 
    55 #endif