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 {
16 /** @short Class that holds a Gender for a contact.
17  * @since 4.14.5
18  */
19 class KCONTACTS_EXPORT Gender
20 {
21  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Gender &);
22  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Gender &);
23 
24 public:
25  /**
26  * Creates an empty Gender object.
27  */
28  Gender();
29  Gender(const Gender &other);
30  Gender(const QString &gender);
31 
32  ~Gender();
33 
34  void setGender(const QString &gender);
35  Q_REQUIRED_RESULT QString gender() const;
36 
37  void setComment(const QString &comment);
38  Q_REQUIRED_RESULT QString comment() const;
39 
40  Q_REQUIRED_RESULT bool isValid() const;
41 
42  Q_REQUIRED_RESULT bool operator==(const Gender &other) const;
43  Q_REQUIRED_RESULT bool operator!=(const Gender &other) const;
44 
45  Gender &operator=(const Gender &other);
46 
47  Q_REQUIRED_RESULT QString toString() const;
48 
49 private:
50  class Private;
52 };
53 
54 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Gender &object);
55 
56 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Gender &object);
57 }
58 Q_DECLARE_TYPEINFO(KContacts::Gender, Q_MOVABLE_TYPE);
59 #endif // GENDER_H
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
Class that holds a Gender for a contact.
Definition: gender.h:19
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:49:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.