Commit 28fa493f authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Add a QGadget to collection



This makes it easier to access the properties of a collection from QML

Signed-off-by: Carl Schwan's avatarCarl Schwan <carl@carlschwan.eu>
parent ccf67827
Pipeline #179741 passed with stage
in 7 minutes and 32 seconds
......@@ -60,6 +60,18 @@ class CollectionStatistics;
*/
class AKONADICORE_EXPORT Collection
{
Q_GADGET
Q_PROPERTY(Id id READ id WRITE setId)
Q_PROPERTY(QString remoteIdd READ remoteId WRITE setRemoteId)
Q_PROPERTY(bool isValid READ isValid)
Q_PROPERTY(QString remoteRevision READ remoteRevision WRITE setRemoteRevision)
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
Q_PROPERTY(bool isVirtual READ isVirtual WRITE setVirtual)
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(QString displayName READ displayName)
Q_PROPERTY(Rights rights READ rights WRITE setRights)
Q_PROPERTY(QStringList contentMimeTypes READ contentMimeTypes WRITE setContentMimeTypes)
Q_PROPERTY(QString resource READ resource WRITE setResource)
public:
/**
* Describes the unique id type.
......@@ -88,6 +100,7 @@ public:
| CanDeleteCollection) ///< Has all rights on this storage collection
};
Q_DECLARE_FLAGS(Rights, Right)
Q_ENUM(Right)
/**
* Creates an invalid collection.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment