X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=src%2Fflag.h;fp=src%2Fflag.h;h=d5fb9abfe4859830b595897b87e0f0ec595ab807;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=0000000000000000000000000000000000000000;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/src/flag.h b/src/flag.h new file mode 100644 index 0000000..d5fb9ab --- /dev/null +++ b/src/flag.h @@ -0,0 +1,71 @@ +#ifndef FLAG_H +#define FLAG_H + +#include +#include + +#include "imageobj.h" +#include "xmlobj.h" + +/*! \brief One flag belonging to a FlagRow. + + Each TreeItem in a VymModel has a set of standard flags and system + flags. +*/ + +///////////////////////////////////////////////////////////////////////////// +class Flag : public XMLObj { + public: + enum FlagType { + SystemFlag, + StandardFlag, + UserFlag, + FreemindFlag, + UndefinedFlag + }; + + Flag(); + Flag(const QString &fname); + ~Flag(); + virtual void init(); + bool load(const QString &); + void setName(const QString &); + const QString getName(); + const QString getPath(); + void setVisible(bool b); + bool isVisible(); + void setGroup(const QString &); + const QString getGroup(); + void unsetGroup(); + void setToolTip(const QString &); + const QString getToolTip(); + ImageObj *getImageObj(); + void setAction(QAction *a); + QAction *getAction(); + void setUsed(bool); + bool isUsed(); + FlagType getType(); + void setType(FlagType t); + void setUuid(const QUuid &id); + QUuid getUuid(); + QString getDefinition(const QString &prefix); + void saveDataToDir(const QString &); + QString saveState(); + + protected: + QString name; + bool visible; + QString group; + QString tooltip; + QAction *action; + bool state; + bool used; + FlagType type; + QUuid uuid; + + private: + ImageObj *image; + QString path; +}; + +#endif