Akonadi::Relation

Search for usage in LXR

#include <relation.h>

Public Types

using List = QList<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
 
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 40 of file relation.h.

Member Typedef Documentation

◆ List

Definition at line 43 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]

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

Creates a relation.

Definition at line 29 of file relation.cpp.

Member Function Documentation

◆ isValid()

bool Relation::isValid ( ) const

Definition at line 100 of file relation.cpp.

◆ left()

Item Relation::left ( ) const

Returns the identifier of the left side of the relation.

Definition at line 65 of file relation.cpp.

◆ operator!=()

bool Relation::operator!= ( const Relation & other) const

Definition at line 55 of file relation.cpp.

◆ operator==()

bool Relation::operator== ( const Relation & other) const

Definition at line 47 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

const char * Akonadi::Relation::GENERIC = "GENERIC"
static

The GENERIC type represents a generic relation between two items.

Definition at line 48 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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:39 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.