Kgapi

contactsgroup.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vrátil <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 
10 #ifndef LIBKGAPI2_CONTACTSGROUP_H
11 #define LIBKGAPI2_CONTACTSGROUP_H
12 
13 #include "object.h"
14 #include "types.h"
15 #include "kgapicontacts_export.h"
16 
17 #include <QDateTime>
18 
19 namespace KGAPI2
20 {
21 
22 /**
23  * @brief Represents a contacts group.
24  *
25  * Note that this is not the same as vCard contact groups. ContactsGroup is
26  * similar to an addressbook - it contains set of full-featured Contacts.
27  *
28  * Unlike regular addressbooks however, a single instance of contact can be
29  * present in multiple ContactsGroup.
30  *
31  * @author Daniel Vrátil <[email protected]>
32  * @since 0.1
33  */
34 class KGAPICONTACTS_EXPORT ContactsGroup : public KGAPI2::Object
35 {
36  public:
37 
38  /**
39  * @brief Constructor
40  */
41  ContactsGroup();
42 
43  /**
44  * @brief Copy constructor
45  */
46  ContactsGroup(const ContactsGroup &other);
47 
48  /**
49  * @brief Destructor
50  */
51  ~ContactsGroup() override;
52 
53  /**
54  * @brief Compares the groups
55  */
56  bool operator==(const ContactsGroup &other) const;
57 
58  /**
59  * @brief Sets group ID
60  *
61  * @param id
62  */
63  void setId(const QString &id);
64 
65  /**
66  * @brief Returns group ID.
67  */
68  QString id() const;
69 
70  /**
71  * @brief Sets group name.
72  *
73  * @param title
74  */
75  void setTitle(const QString &title);
76 
77  /**
78  * @brief Returns group name.
79  */
80  QString title() const;
81 
82  /**
83  * @brief Sets description what kind of contacts the group contains.
84  *
85  * @param content
86  */
87  void setContent(const QString &content);
88 
89  /**
90  * @brief Returns description of group content.
91  */
92  QString content() const;
93 
94  /**
95  * @brief Sets when was the group updated last time.
96  *
97  * @param updated
98  */
99  void setUpdated(const QDateTime &updated);
100 
101  /**
102  * @brief Returns date and time of last update.
103  */
104  QDateTime updated() const;
105 
106  /**
107  * @brief Sets whether this group is a system group.
108  *
109  * The system groups (Family, Co-workers, etc.) are present in all
110  * addressbooks.
111  *
112  * Default value is false.
113  *
114  * @param isSystemGroup
115  */
116  void setIsSystemGroup(const bool isSystemGroup);
117 
118  /**
119  * @brief Returns whether the group is a system group.
120  */
121  bool isSystemGroup() const;
122 
123  private:
124  class Private;
125  Private * const d;
126 
127 };
128 
129 } // namespace KGAPI2
130 
131 #endif // LIBKGAPI2_CONTACTSGROUP_H
Base class for all objects.
Definition: object.h:31
Represents a contacts group.
Definition: contactsgroup.h:34
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:10:03 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.