Akonadi Contacts

contactviewerdialog.h
1/*
2 This file is part of Akonadi Contact.
3
4 SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#pragma once
10
11#include "akonadi-contact-widgets_export.h"
12
13#include <QDialog>
14
15#include <memory>
16
17namespace Akonadi
18{
19class Item;
20class ContactViewer;
21class ContactViewerDialogPrivate;
22
23/**
24 * @short A dialog for displaying a contact in Akonadi.
25 *
26 * This dialog provides a way to show a contact from the
27 * Akonadi storage.
28 *
29 * Example:
30 *
31 * @code
32 *
33 * using namespace Akonadi;
34 *
35 * const Item contact = ...
36 *
37 * ContactViewerDialog *dlg = new ContactViewerDialog( this );
38 * dlg->setContact( contact );
39 * dlg->show();
40 *
41 * @endcode
42 *
43 * @author Tobias Koenig <tokoe@kde.org>
44 * @since 4.4
45 */
46class AKONADI_CONTACT_WIDGETS_EXPORT ContactViewerDialog : public QDialog
47{
48 Q_OBJECT
49
50public:
51 /**
52 * Creates a new contact viewer dialog.
53 *
54 * @param parent The parent widget of the dialog.
55 */
56 explicit ContactViewerDialog(QWidget *parent = nullptr);
57
58 /**
59 * Destroys the contact viewer dialog.
60 */
61 ~ContactViewerDialog() override;
62
63 /**
64 * Returns the contact that is currently displayed.
65 */
66 [[nodiscard]] Akonadi::Item contact() const;
67
68 /**
69 * Returns the ContactViewer that is used by this dialog.
70 */
71 ContactViewer *viewer() const;
72
73public Q_SLOTS:
74 /**
75 * Sets the @p contact that shall be displayed in the dialog.
76 */
77 void setContact(const Akonadi::Item &contact);
78
79private:
80 //@cond PRIVATE
81 std::unique_ptr<ContactViewerDialogPrivate> const d;
82 //@endcond
83};
84}
A dialog for displaying a contact in Akonadi.
A viewer component for contacts in Akonadi.
A widget for editing the display name of a contact.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.