Akonadi Contacts

contactgroupviewerdialog.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 #pragma once
10 
11 #include "akonadi-contact_export.h"
12 
13 #include <QDialog>
14 
15 namespace Akonadi
16 {
17 class Item;
18 
19 class ContactGroupViewer;
20 
21 /**
22  * @short A dialog for displaying a contact group in Akonadi.
23  *
24  * This dialog provides a way to show a contact group from the
25  * Akonadi storage.
26  *
27  * Example:
28  *
29  * @code
30  *
31  * using namespace Akonadi;
32  *
33  * const Item group = ...
34  *
35  * ContactGroupViewerDialog *dlg = new ContactGroupViewerDialog( this );
36  * dlg->setContactGroup( group );
37  * dlg->show();
38  *
39  * @endcode
40  *
41  * @author Tobias Koenig <[email protected]>
42  * @since 4.4
43  */
44 class AKONADI_CONTACT_EXPORT ContactGroupViewerDialog : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  /**
50  * Creates a new contact group viewer dialog.
51  *
52  * @param parent The parent widget of the dialog.
53  */
54  explicit ContactGroupViewerDialog(QWidget *parent = nullptr);
55 
56  /**
57  * Destroys the contact group viewer dialog.
58  */
59  ~ContactGroupViewerDialog() override;
60 
61  /**
62  * Returns the contact group that is currently displayed.
63  */
64  Q_REQUIRED_RESULT Akonadi::Item contactGroup() const;
65 
66  /**
67  * Returns the ContactGroupViewer that is used by this dialog.
68  */
69  ContactGroupViewer *viewer() const;
70 
71 public Q_SLOTS:
72  /**
73  * Sets the contact @p group that shall be displayed in the dialog.
74  */
75  void setContactGroup(const Akonadi::Item &group);
76 
77 private:
78  //@cond PRIVATE
79  class Private;
80  Private *const d;
81  //@endcond
82 };
83 }
84 
A dialog for displaying a contact group in Akonadi.
A viewer component for contact groups in Akonadi.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jun 23 2021 23:09:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.