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