X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=src%2Fflagrow.h;fp=src%2Fflagrow.h;h=ba13042170456a0a04f6271eb0cc46be9ece3df3;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=0000000000000000000000000000000000000000;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/src/flagrow.h b/src/flagrow.h new file mode 100644 index 0000000..ba13042 --- /dev/null +++ b/src/flagrow.h @@ -0,0 +1,41 @@ +#ifndef FLAGROW_H +#define FLAGROW_H + +#include +#include +#include + +#include "flagrowmaster.h" +#include "xmlobj.h" + +class FlagRow +{ + public: + FlagRow (); + ~FlagRow (); + const QStringList activeFlagNames(); + const QList activeFlagUids(); + bool isActive(const QString &name); + bool isActive(const QUuid &uuid); + + /*! \brief Toggle a Flag + To activate a flag its uid will be copied from masterRow to activeUids in + current row. + */ + bool toggle(const QString &, bool useGroups = true); + bool toggle(const QUuid &, bool useGroups = true); + bool activate(const QString &); + bool activate(const QUuid &); + bool deactivate(const QString &); + bool deactivate(const QUuid &); + bool deactivateGroup(const QString &); + void deactivateAll(); + QString saveState(); + void setMasterRow(FlagRowMaster *row); + + private: + FlagRowMaster *masterRow; + QList activeUids; //! Used in treeitems: Lists all uids of currently + //! active flags +}; +#endif