KContacts

related.h
1/*
2 This file is part of the KContacts framework.
3 SPDX-FileCopyrightText: 2015-2019 Laurent Montel <montel@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef RELATED_H
9#define RELATED_H
10
11#include "kcontacts_export.h"
12
13#include <QMap>
14#include <QSharedDataPointer>
15#include <QString>
16
17class RelatedTest;
18
19namespace KContacts
20{
21class ParameterMap;
22
23/** Describes a relationship of an Addressee. */
24class KCONTACTS_EXPORT Related
25{
26 friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Related &);
27 friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Related &);
28 friend class VCardTool;
29 friend class ::RelatedTest;
30
31public:
32 Related();
33 Related(const Related &other);
34 Related(const QString &related);
35
36 ~Related();
37
38 typedef QList<Related> List;
39
40 void setRelated(const QString &relatedTo);
41 Q_REQUIRED_RESULT QString related() const;
42
43 Q_REQUIRED_RESULT bool isValid() const;
44
45 Q_REQUIRED_RESULT bool operator==(const Related &other) const;
46 Q_REQUIRED_RESULT bool operator!=(const Related &other) const;
47
48 Related &operator=(const Related &other);
49
50 Q_REQUIRED_RESULT QString toString() const;
51
52private:
53 // exported for RelatedTest
54 void setParams(const ParameterMap &params);
55 Q_REQUIRED_RESULT ParameterMap params() const;
56
57 class Private;
59};
60KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Related &object);
61
62KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Related &object);
63}
64Q_DECLARE_TYPEINFO(KContacts::Related, Q_RELOCATABLE_TYPE);
65#endif // LANG_H
Describes a relationship of an Addressee.
Definition related.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:58:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.