akonadi
#include <collection.h>
Public Types | |
| typedef QList< Collection > | List |
| enum | Right { ReadOnly = 0x0, CanChangeItem = 0x1, CanCreateItem = 0x2, CanDeleteItem = 0x4, CanChangeCollection = 0x8, CanCreateCollection = 0x10, CanDeleteCollection = 0x20, CanLinkItem = 0x40, CanUnlinkItem = 0x80, AllRights } |
| enum | UrlType { UrlShort = 0, UrlWithName = 1 } |
Public Types inherited from Akonadi::Entity | |
| enum | CreateOption { AddIfMissing } |
| typedef qint64 | Id |
Public Member Functions | |
| Collection () | |
| Collection (Id id) | |
| Collection (const Collection &other) | |
| ~Collection () | |
| CachePolicy | cachePolicy () const |
| QStringList | contentMimeTypes () const |
| bool | isVirtual () const |
| QString | name () const |
| Id | parent () const |
| QString | parentRemoteId () const |
| QString | resource () const |
| Rights | rights () const |
| void | setCachePolicy (const CachePolicy &policy) |
| void | setContentMimeTypes (const QStringList &types) |
| void | setName (const QString &name) |
| void | setParent (Id parent) |
| void | setParent (const Collection &collection) |
| void | setParentRemoteId (const QString &identifier) |
| void | setResource (const QString &identifier) |
| void | setRights (Rights rights) |
| void | setStatistics (const CollectionStatistics &statistics) |
| void | setVirtual (bool isVirtual) |
| CollectionStatistics | statistics () const |
| KUrl | url () const |
| KUrl | url (UrlType type) const |
Public Member Functions inherited from Akonadi::Entity | |
| void | addAttribute (Attribute *attribute) |
| Attribute * | attribute (const QByteArray &name) const |
| template<typename T > | |
| T * | attribute (CreateOption option) |
| template<typename T > | |
| T * | attribute () const |
| Attribute::List | attributes () const |
| void | clearAttributes () |
| bool | hasAttribute (const QByteArray &name) const |
| template<typename T > | |
| bool | hasAttribute () const |
| Id | id () const |
| bool | isValid () const |
| bool | operator!= (const Entity &other) const |
| bool | operator< (const Entity &other) const |
| Entity & | operator= (const Entity &other) |
| bool | operator== (const Entity &other) const |
| Collection | parentCollection () const |
| Collection & | parentCollection () |
| QString | remoteId () const |
| QString | remoteRevision () const |
| void | removeAttribute (const QByteArray &name) |
| template<typename T > | |
| void | removeAttribute () |
| void | setId (Id identifier) |
| void | setParentCollection (const Collection &parent) |
| void | setRemoteId (const QString &id) |
| void | setRemoteRevision (const QString &revision) |
Static Public Member Functions | |
| static Collection | fromUrl (const KUrl &url) |
| static QString | mimeType () |
| static Collection | root () |
Additional Inherited Members | |
Protected Member Functions inherited from Akonadi::Entity | |
| Entity (const Entity &other) | |
| ~Entity () | |
Detailed Description
Represents a collection of PIM items.
This class represents a collection of PIM items, such as a folder on a mail- or groupware-server.
Collections are hierarchical, i.e., they may have a parent collection.
Definition at line 75 of file collection.h.
Member Typedef Documentation
| typedef QList<Collection> Akonadi::Collection::List |
Describes a list of collections.
Definition at line 81 of file collection.h.
Member Enumeration Documentation
Describes rights of a collection.
Definition at line 86 of file collection.h.
Describes the type of url which is returned in url().
- Since
- 4.7
| Enumerator | |
|---|---|
| UrlShort |
A short url which contains the identifier only (equivalent to url()) |
| UrlWithName |
A url with identifier and name. |
Definition at line 245 of file collection.h.
Constructor & Destructor Documentation
| Collection::Collection | ( | ) |
Creates an invalid collection.
Definition at line 58 of file collection.cpp.
|
explicit |
Create a new collection.
- Parameters
-
id The unique identifier of the collection.
Definition at line 66 of file collection.cpp.
| Collection::~Collection | ( | ) |
Destroys the collection.
Definition at line 76 of file collection.cpp.
| Collection::Collection | ( | const Collection & | other | ) |
Creates a collection from an other collection.
Definition at line 71 of file collection.cpp.
Member Function Documentation
| CachePolicy Collection::cachePolicy | ( | ) | const |
Returns the cache policy of the collection.
Definition at line 236 of file collection.cpp.
| QStringList Collection::contentMimeTypes | ( | ) | const |
Returns a list of possible content mimetypes, e.g.
message/rfc822, x-akonadi/collection for a mail folder that supports sub-folders.
Definition at line 107 of file collection.cpp.
|
static |
Creates a collection from the given url.
Definition at line 164 of file collection.cpp.
| bool Collection::isVirtual | ( | ) | const |
Returns whether the collection is virtual, for example a search collection.
- Since
- 4.6
Definition at line 248 of file collection.cpp.
|
static |
Returns the mimetype used for collections.
Definition at line 189 of file collection.cpp.
| QString Collection::name | ( | ) | const |
Returns the i18n'ed name of the collection.
Definition at line 80 of file collection.cpp.
| Collection::Id Collection::parent | ( | ) | const |
Returns the identifier of the parent collection.
Definition at line 121 of file collection.cpp.
| QString Collection::parentRemoteId | ( | ) | const |
Returns the parent remote identifier.
- Note
- This usually returns nothing for collections retrieved from the backend.
Definition at line 136 of file collection.cpp.
| QString Collection::resource | ( | ) | const |
Returns the identifier of the resource owning the collection.
Definition at line 194 of file collection.cpp.
| Collection::Rights Collection::rights | ( | ) | const |
Returns the rights the user has on the collection.
Definition at line 91 of file collection.cpp.
|
static |
Returns the root collection.
Definition at line 184 of file collection.cpp.
| void Collection::setCachePolicy | ( | const CachePolicy & | policy | ) |
Sets the cache policy of the collection.
Definition at line 241 of file collection.cpp.
| void Collection::setContentMimeTypes | ( | const QStringList & | types | ) |
Sets the list of possible content mime types.
Definition at line 112 of file collection.cpp.
| void Collection::setName | ( | const QString & | name | ) |
Sets the i18n'ed name of the collection.
- Parameters
-
name The new collection name.
Definition at line 85 of file collection.cpp.
| void Collection::setParent | ( | Id | parent | ) |
Sets the identifier of the parent collection.
Definition at line 126 of file collection.cpp.
| void Collection::setParent | ( | const Collection & | collection | ) |
Sets the parent collection.
Definition at line 131 of file collection.cpp.
| void Collection::setParentRemoteId | ( | const QString & | identifier | ) |
Sets the parent's remote identifier.
Definition at line 141 of file collection.cpp.
| void Collection::setResource | ( | const QString & | identifier | ) |
Sets the identifier of the resource owning the collection.
Definition at line 199 of file collection.cpp.
| void Collection::setRights | ( | Rights | rights | ) |
Sets the rights the user has on the collection.
Definition at line 101 of file collection.cpp.
| void Collection::setStatistics | ( | const CollectionStatistics & | statistics | ) |
Sets the collection statistics for the collection.
Definition at line 230 of file collection.cpp.
| void Akonadi::Collection::setVirtual | ( | bool | isVirtual | ) |
Sets whether the collection is virtual or not.
Virtual collections can't be converted to non-virtual and vice versa.
- Since
- 4.10
Definition at line 253 of file collection.cpp.
| CollectionStatistics Collection::statistics | ( | ) | const |
Returns the collection statistics of the collection.
Definition at line 225 of file collection.cpp.
| KUrl Collection::url | ( | ) | const |
Returns the url of the collection.
- Todo:
- KDE5 remove in favor of url( UrlType type = UrlShort ).
Definition at line 146 of file collection.cpp.
| KUrl Collection::url | ( | UrlType | type | ) | const |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Jun 5 2013 12:09:31 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
Public Types inherited from