KContacts

gender.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 GENDER_H
9 #define GENDER_H
10 #include "kcontacts_export.h"
11 #include <QSharedDataPointer>
12 #include <QString>
13 
14 namespace KContacts {
15 
19 class KCONTACTS_EXPORT Gender
20 {
21  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Gender &);
22  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Gender &);
23 public:
27  Gender();
28  Gender(const Gender &other);
29  Gender(const QString &gender);
30 
31  ~Gender();
32 
33  void setGender(const QString &gender);
34  Q_REQUIRED_RESULT QString gender() const;
35 
36  void setComment(const QString &comment);
37  Q_REQUIRED_RESULT QString comment() const;
38 
39  Q_REQUIRED_RESULT bool isValid() const;
40 
41  Q_REQUIRED_RESULT bool operator==(const Gender &other) const;
42  Q_REQUIRED_RESULT bool operator!=(const Gender &other) const;
43 
44  Gender &operator=(const Gender &other);
45 
46  Q_REQUIRED_RESULT QString toString() const;
47 private:
48  class Private;
50 };
51 
52 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Gender &object);
53 
54 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Gender &object);
55 }
56 Q_DECLARE_TYPEINFO(KContacts::Gender, Q_MOVABLE_TYPE);
57 #endif // GENDER_H
QDataStream & operator>>(QDataStream &in, KDateTime::Spec &spec)
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
Class that holds a Gender for a contact.
Definition: gender.h:19
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jul 3 2020 22:54:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.