1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/flag.h Mon Jul 27 12:53:17 2009 +0000
1.3 @@ -0,0 +1,55 @@
1.4 +#ifndef FLAG_H
1.5 +#define FLAG_H
1.6 +
1.7 +
1.8 +#include <QAction>
1.9 +#include <QPixmap>
1.10 +
1.11 +#include "xmlobj.h"
1.12 +
1.13 +/*! \brief One flag belonging to a FlagRow.
1.14 +
1.15 + Each TreeItem in a VymModel has a set of standard flags and system
1.16 + flags.
1.17 +*/
1.18 +
1.19 +
1.20 +/////////////////////////////////////////////////////////////////////////////
1.21 +class Flag:public XMLObj {
1.22 +public:
1.23 + Flag ();
1.24 + Flag (Flag*);
1.25 + ~Flag ();
1.26 + virtual void init ();
1.27 + virtual void copy (Flag*);
1.28 + void load (const QString&);
1.29 + void load (const QPixmap&);
1.30 + void setName (const QString&);
1.31 + const QString getName ();
1.32 + void setVisible (bool b);
1.33 + bool isVisible ();
1.34 + void setGroup (const QString&);
1.35 + const QString getGroup();
1.36 + void unsetGroup ();
1.37 + void setToolTip(const QString&);
1.38 + const QString getToolTip();
1.39 + QPixmap getPixmap();
1.40 + void setAction (QAction *a);
1.41 + QAction* getAction ();
1.42 + void setUsed (bool); //FIXME-3 needed?
1.43 + bool isUsed();
1.44 + void saveToDir (const QString&, const QString&);
1.45 +
1.46 +protected:
1.47 + QString name;
1.48 + bool visible;
1.49 + QString group;
1.50 + QString tooltip;
1.51 + QAction *action;
1.52 + bool state;
1.53 + bool used;
1.54 +private:
1.55 + QPixmap pixmap;
1.56 +};
1.57 +
1.58 +#endif