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 <QMap>
13 #include <QSharedDataPointer>
14 #include <QString>
15 
16 namespace KContacts
17 {
18 /** @short Class that holds a FieldGroup for a contact.
19  * @since 5.3
20  */
21 class KCONTACTS_EXPORT FieldGroup
22 {
23  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const FieldGroup &);
24  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, FieldGroup &);
25 
26 public:
27  FieldGroup();
28  FieldGroup(const FieldGroup &other);
29  FieldGroup(const QString &fieldGroupName);
30 
31  ~FieldGroup();
32 
33  typedef QVector<FieldGroup> List;
34 
35  void setFieldGroupName(const QString &fieldGroup);
36  Q_REQUIRED_RESULT QString fieldGroupName() const;
37 
38  Q_REQUIRED_RESULT bool isValid() const;
39 
40  void setValue(const QString &value);
41  Q_REQUIRED_RESULT QString value() const;
42 
43  void setParameters(const QMap<QString, QStringList> &params);
44  Q_REQUIRED_RESULT QMap<QString, QStringList> parameters() const;
45 
46  Q_REQUIRED_RESULT bool operator==(const FieldGroup &other) const;
47  Q_REQUIRED_RESULT bool operator!=(const FieldGroup &other) const;
48 
49  FieldGroup &operator=(const FieldGroup &other);
50 
51  Q_REQUIRED_RESULT QString toString() const;
52 
53 private:
54  class Private;
56 };
57 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const FieldGroup &object);
58 
59 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, FieldGroup &object);
60 }
61 Q_DECLARE_TYPEINFO(KContacts::FieldGroup, Q_MOVABLE_TYPE);
62 #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-2021 The KDE developers.
Generated on Thu Apr 15 2021 22:54:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.