#include <relation.h>
Public Types | |
typedef QVector< Relation > | List |
Public Member Functions | |
Relation () | |
Relation (const QByteArray &type, const Item &left, const Item &right) | |
Relation (const Relation &other) | |
bool | isValid () const |
Item | left () const |
bool | operator!= (const Relation &) const |
Relation & | operator= (const Relation &) |
bool | operator== (const Relation &) const |
QByteArray | remoteId () const |
Item | right () const |
void | setLeft (const Item &item) |
void | setRemoteId (const QByteArray &type) const |
void | setRight (const Akonadi::Item &item) |
void | setType (const QByteArray &type) const |
QByteArray | type () const |
Static Public Attributes | |
static const char * | GENERIC = "GENERIC" |
Detailed Description
An Akonadi Relation.
A Relation object represents an relation between two Akonadi items.
An example usecase could be a association of a note with an email. The note (that for instance contains personal notes for the email), can be stored independently but is easily retrieved by asking for relations the email.
The relation type allows to distinguish various types of relations that could for instance be bidirectional or not.
- Since
- 4.15
Definition at line 52 of file relation.h.
Constructor & Destructor Documentation
Relation::Relation | ( | ) |
Creates an invalid relation.
Definition at line 35 of file relation.cpp.
|
explicit |
Creates a relation.
Definition at line 41 of file relation.cpp.
Member Function Documentation
PimItem Relation::left | ( | ) | const |
Returns the identifier of the left side of the relation.
Definition at line 89 of file relation.cpp.
QString Relation::remoteId | ( | ) | const |
Returns the remote id of the relation.
Definition at line 119 of file relation.cpp.
PimItem Relation::right | ( | ) | const |
Returns the identifier of the right side of the relation.
Definition at line 99 of file relation.cpp.
void Relation::setLeft | ( | const Item & | item | ) |
Sets the item
of the left side of the relation.
Definition at line 84 of file relation.cpp.
void Relation::setRemoteId | ( | const QByteArray & | type | ) | const |
Sets the remote id of the relation.
Definition at line 114 of file relation.cpp.
void Akonadi::Relation::setRight | ( | const Akonadi::Item & | item | ) |
Sets the item
of the right side of the relation.
void Relation::setType | ( | const QByteArray & | type | ) | const |
Sets the type of the relation.
Definition at line 104 of file relation.cpp.
QByteArray Relation::type | ( | ) | const |
Returns the type of the relation.
Definition at line 109 of file relation.cpp.
Member Data Documentation
|
static |
The GENERIC type represents a generic relation between two items.
Definition at line 60 of file relation.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2019 The KDE developers.
Generated on Wed Dec 11 2019 07:11:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.