Akonadi::ContactGroupViewer Class
A viewer component for contact groups in Akonadi. More...
| Header: | #include <Akonadi/ContactGroupViewer> |
| CMake: | find_package(KPim6AkonadiContactWidgets REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::AkonadiContactWidgets) |
Public Functions
| ContactGroupViewer(QWidget *parent = nullptr) | |
| virtual | ~ContactGroupViewer() override |
| Akonadi::Item | contactGroup() const |
| void | setContactGroupFormatter(Akonadi::AbstractContactGroupFormatter *formatter) |
| void | updateView() |
Public Slots
| void | setContactGroup(const Akonadi::Item &group) |
Signals
| void | urlClicked(const QUrl &url) |
Detailed Description
This widgets provides a way to show a contact group from the Akonadi storage.
Example:
using namespace Akonadi;
const Item group = ...
ContactGroupViewer *viewer = new ContactGroupViewer( this );
viewer->setContactGroup( group );
Author: Tobias Koenig <tokoe@kde.org>
Member Function Documentation
[explicit] ContactGroupViewer::ContactGroupViewer(QWidget *parent = nullptr)
Creates a new contact group viewer.
parent The parent widget.
[override virtual noexcept] ContactGroupViewer::~ContactGroupViewer()
Destroys the contact group viewer.
Akonadi::Item ContactGroupViewer::contactGroup() const
Returns the contact group that is currently displayed.
See also setContactGroup().
[slot] void ContactGroupViewer::setContactGroup(const Akonadi::Item &group)
Sets the contact group that shall be displayed in the viewer.
See also contactGroup().
void ContactGroupViewer::setContactGroupFormatter(Akonadi::AbstractContactGroupFormatter *formatter)
Sets the contact group formatter that should be used for formatting the contact group. If formatter is \ 0, the standard formatter will be used. formatter the formatter to use
Note: The contact viewer won't take ownership of the formatter.
void ContactGroupViewer::updateView()
[signal] void ContactGroupViewer::urlClicked(const QUrl &url)
This signal is emitted whenever the user has clicked on a URL in the viewer (e.g. a mailto: link).
url The url that has been clicked.