Akonadi::Relation
#include <relation.h>
Public Types | |
using | List = QVector< Relation > |
Public Member Functions | |
Relation () | |
Relation (const QByteArray &type, const Item &left, const Item &right) | |
Relation (const Relation &) | |
Relation (Relation &&) noexcept | |
bool | isValid () const |
Item | left () const |
bool | operator!= (const Relation &) const |
Relation & | operator= (const Relation &) |
Relation & | operator= (Relation &&) noexcept |
bool | operator== (const Relation &) const |
QByteArray | remoteId () const |
Item | right () const |
void | setLeft (const Item &item) |
void | setRemoteId (const QByteArray &type) |
void | setRight (const Akonadi::Item &item) |
void | setType (const QByteArray &type) |
QByteArray | type () const |
Static Public Attributes | |
static const char * | GENERIC = "GENERIC" |
Detailed Description
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 39 of file relation.h.
Constructor & Destructor Documentation
◆ Relation() [1/2]
Relation::Relation | ( | ) |
Creates an invalid relation.
Definition at line 24 of file relation.cpp.
◆ Relation() [2/2]
|
explicit |
Creates a relation.
Definition at line 29 of file relation.cpp.
Member Function Documentation
◆ left()
Item Relation::left | ( | ) | const |
Returns the identifier of the left side of the relation.
Definition at line 65 of file relation.cpp.
◆ remoteId()
QByteArray Relation::remoteId | ( | ) | const |
Returns the remote id of the relation.
Definition at line 95 of file relation.cpp.
◆ right()
Item Relation::right | ( | ) | const |
Returns the identifier of the right side of the relation.
Definition at line 75 of file relation.cpp.
◆ setLeft()
void Relation::setLeft | ( | const Item & | item | ) |
Sets the item
of the left side of the relation.
Definition at line 60 of file relation.cpp.
◆ setRemoteId()
void Relation::setRemoteId | ( | const QByteArray & | type | ) |
Sets the remote id of the relation.
Definition at line 90 of file relation.cpp.
◆ setRight()
void Relation::setRight | ( | const Akonadi::Item & | item | ) |
Sets the item
of the right side of the relation.
Definition at line 70 of file relation.cpp.
◆ setType()
void Relation::setType | ( | const QByteArray & | type | ) |
Sets the type of the relation.
Definition at line 80 of file relation.cpp.
◆ type()
QByteArray Relation::type | ( | ) | const |
Returns the type of the relation.
Definition at line 85 of file relation.cpp.
Member Data Documentation
◆ GENERIC
|
static |
The GENERIC type represents a generic relation between two items.
Definition at line 47 of file relation.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:52:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.