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

KDE's Doxygen guidelines are available online.