KContacts

fieldgroup.h
1 /*
2  This file is part of the KContacts framework.
3  SPDX-FileCopyrightText: 2016-2019 Laurent Montel <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef FIELDGROUP_H
9 #define FIELDGROUP_H
10 
11 #include "kcontacts_export.h"
12 #include <QSharedDataPointer>
13 #include <QString>
14 #include <QMap>
15 
16 namespace KContacts {
17 
21 class KCONTACTS_EXPORT FieldGroup
22 {
23  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const FieldGroup &);
24  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, FieldGroup &);
25 public:
26  FieldGroup();
27  FieldGroup(const FieldGroup &other);
28  FieldGroup(const QString &fieldGroupName);
29 
30  ~FieldGroup();
31 
32  typedef QVector<FieldGroup> List;
33 
34  void setFieldGroupName(const QString &fieldGroup);
35  Q_REQUIRED_RESULT QString fieldGroupName() const;
36 
37  Q_REQUIRED_RESULT bool isValid() const;
38 
39  void setValue(const QString &value);
40  Q_REQUIRED_RESULT QString value() const;
41 
42  void setParameters(const QMap<QString, QStringList> &params);
43  Q_REQUIRED_RESULT QMap<QString, QStringList> parameters() const;
44 
45  Q_REQUIRED_RESULT bool operator==(const FieldGroup &other) const;
46  Q_REQUIRED_RESULT bool operator!=(const FieldGroup &other) const;
47 
48  FieldGroup &operator=(const FieldGroup &other);
49 
50  Q_REQUIRED_RESULT QString toString() const;
51 private:
52  class Private;
54 };
55 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const FieldGroup &object);
56 
57 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, FieldGroup &object);
58 }
59 Q_DECLARE_TYPEINFO(KContacts::FieldGroup, Q_MOVABLE_TYPE);
60 #endif // FIELDGROUP_H
Class that holds a FieldGroup for a contact.
Definition: fieldgroup.h:21
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-2020 The KDE developers.
Generated on Sat Aug 8 2020 22:53:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.