Akonadi::Relation

#include <relation.h>

Public Types

typedef QVector< RelationList
 

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
 
Relationoperator= (const Relation &)
 
Relationoperator= (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

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 39 of file relation.h.

Constructor & Destructor Documentation

Relation::Relation ( )

Creates an invalid relation.

Definition at line 22 of file relation.cpp.

Relation::Relation ( const QByteArray type,
const Item &  left,
const Item &  right 
)
explicit

Creates a relation.

Definition at line 27 of file relation.cpp.

Member Function Documentation

Item Relation::left ( ) const

Returns the identifier of the left side of the relation.

Definition at line 66 of file relation.cpp.

QByteArray Relation::remoteId ( ) const

Returns the remote id of the relation.

Definition at line 96 of file relation.cpp.

Item Relation::right ( ) const

Returns the identifier of the right side of the relation.

Definition at line 76 of file relation.cpp.

void Relation::setLeft ( const Item &  item)

Sets the item of the left side of the relation.

Definition at line 61 of file relation.cpp.

void Relation::setRemoteId ( const QByteArray type)

Sets the remote id of the relation.

Definition at line 91 of file relation.cpp.

void Relation::setRight ( const Akonadi::Item &  item)

Sets the item of the right side of the relation.

Definition at line 71 of file relation.cpp.

void Relation::setType ( const QByteArray type)

Sets the type of the relation.

Definition at line 81 of file relation.cpp.

QByteArray Relation::type ( ) const

Returns the type of the relation.

Definition at line 86 of file relation.cpp.

Member Data Documentation

const char * Akonadi::Relation::GENERIC = "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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 2 2020 23:15:26 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.