Akonadi Contacts

contactgroupeditor.h
1 /*
2  This file is part of Akonadi Contact.
3 
4  SPDX-FileCopyrightText: 2009 Tobias Koenig <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef AKONADI_CONTACTGROUPEDITOR_H
10 #define AKONADI_CONTACTGROUPEDITOR_H
11 
12 #include "akonadi-contact_export.h"
13 
14 #include <QWidget>
15 
16 namespace KContacts {
17 class ContactGroup;
18 }
19 
20 namespace Akonadi {
21 class Collection;
22 class Item;
23 
68 class AKONADI_CONTACT_EXPORT ContactGroupEditor : public QWidget
69 {
70  Q_OBJECT
71 
72 public:
76  enum Mode {
78  EditMode
79  };
80 
87  explicit ContactGroupEditor(Mode mode, QWidget *parent = nullptr);
88 
92  ~ContactGroupEditor() override;
93 
99  void setContactGroupTemplate(const KContacts::ContactGroup &group);
100 
105  void setDefaultAddressBook(const Akonadi::Collection &addressbook);
106 
107  void groupNameIsValid(bool isValid);
108 
109 public Q_SLOTS:
113  void loadContactGroup(const Akonadi::Item &group);
114 
120  bool saveContactGroup();
121 
122 Q_SIGNALS:
127  void contactGroupStored(const Akonadi::Item &group);
128 
133  void error(const QString &errorMsg);
134 
135 private:
136  //@cond PRIVATE
137  friend class ContactGroupEditorDialog;
138 
139  class Private;
140  Private *const d;
141 
142  Q_DISABLE_COPY(ContactGroupEditor)
143  //@endcond
144 };
145 }
146 
147 #endif
Mode
Describes the mode of the contact group editor.
A dialog for creating or editing a contact group in Akonadi.
An widget to edit contact groups in Akonadi.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Sep 21 2020 23:09:01 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.