KContacts

related.h
1 /*
2  This file is part of the KContacts framework.
3  SPDX-FileCopyrightText: 2015-2019 Laurent Montel <[email protected]>
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 #include <QMap>
13 #include <QSharedDataPointer>
14 #include <QString>
15 
16 namespace KContacts
17 {
18 /** Descripes a relationship of an Addressee. */
19 class KCONTACTS_EXPORT Related
20 {
21  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Related &);
22  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Related &);
23 
24 public:
25  Related();
26  Related(const Related &other);
27  Related(const QString &related);
28 
29  ~Related();
30 
31  typedef QVector<Related> List;
32 
33  void setRelated(const QString &relatedTo);
34  Q_REQUIRED_RESULT QString related() const;
35 
36  Q_REQUIRED_RESULT bool isValid() const;
37 
38  void setParameters(const QMap<QString, QStringList> &params);
39  Q_REQUIRED_RESULT QMap<QString, QStringList> parameters() const;
40 
41  Q_REQUIRED_RESULT bool operator==(const Related &other) const;
42  Q_REQUIRED_RESULT bool operator!=(const Related &other) const;
43 
44  Related &operator=(const Related &other);
45 
46  Q_REQUIRED_RESULT QString toString() const;
47 
48 private:
49  class Private;
51 };
52 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Related &object);
53 
54 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Related &object);
55 }
56 Q_DECLARE_TYPEINFO(KContacts::Related, Q_MOVABLE_TYPE);
57 #endif // LANG_H
Descripes a relationship of an Addressee.
Definition: related.h:19
QDataStream & operator>>(QDataStream &in, KDateTime::Spec &spec)
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jun 12 2021 22:55:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.