#include <contactviewer.h>

Public Slots | |
void | setContact (const Akonadi::Item &contact) |
void | setRawContact (const KABC::Addressee &contact) |
Signals | |
void | addressClicked (const KABC::Address &address) |
void | emailClicked (const QString &name, const QString &email) |
void | phoneNumberClicked (const KABC::PhoneNumber &number) |
void | smsClicked (const KABC::PhoneNumber &number) |
void | urlClicked (const KUrl &url) |
Public Member Functions | |
ContactViewer (QWidget *parent=0) | |
~ContactViewer () | |
Akonadi::Item | contact () const |
KABC::Addressee | rawContact () const |
void | setContactFormatter (AbstractContactFormatter *formatter) |
Detailed Description
A viewer component for contacts in Akonadi.
This widgets provides a way to show a contact from the Akonadi storage or a raw contact object.
Examples:
using namespace Akonadi; const Item contact = ... ContactViewer *viewer = new ContactViewer( this ); viewer->setContact( contact );
using namespace Akonadi; const KABC::Addressee contact = ... ContactViewer *viewer = new ContactViewer( this ); viewer->setContact( contact );
- Since:
- 4.4
Constructor & Destructor Documentation
Akonadi::ContactViewer::ContactViewer | ( | QWidget * | parent = 0 | ) |
Creates a new contact viewer.
- Parameters:
-
parent The parent widget.
Akonadi::ContactViewer::~ContactViewer | ( | ) |
Destroys the contact viewer.
Member Function Documentation
void Akonadi::ContactViewer::addressClicked | ( | const KABC::Address & | address | ) | [signal] |
This signal is emitted whenever the user has clicked on an address in the viewer.
- Parameters:
-
address The corresponding address.
Akonadi::Item Akonadi::ContactViewer::contact | ( | ) | const |
Returns the contact that is currently displayed.
- Note:
- The returned contact is only valid if it was set with setContact() before.
void Akonadi::ContactViewer::emailClicked | ( | const QString & | name, |
const QString & | |||
) | [signal] |
This signal is emitted whenever the user has clicked on an email address in the viewer.
- Parameters:
-
name The name of the contact. email The plain email address of the contact.
void Akonadi::ContactViewer::phoneNumberClicked | ( | const KABC::PhoneNumber & | number | ) | [signal] |
This signal is emitted whenever the user has clicked on a phone number (that includes fax numbers as well) in the viewer.
- Parameters:
-
number The corresponding phone number.
KABC::Addressee Akonadi::ContactViewer::rawContact | ( | ) | const |
Returns the raw contact that is currently displayed.
- Since:
- 4.5
void Akonadi::ContactViewer::setContact | ( | const Akonadi::Item & | contact | ) | [slot] |
Sets the contact
that shall be displayed in the viewer.
void Akonadi::ContactViewer::setContactFormatter | ( | AbstractContactFormatter * | formatter | ) |
Sets the contact formatter
that should be used for formatting the contact.
If formatter is 0
, the standard formatter will be used.
- Note:
- The contact viewer won't take ownership of the formatter.
- Since:
- 4.6
void Akonadi::ContactViewer::setRawContact | ( | const KABC::Addressee & | contact | ) | [slot] |
Sets the raw contact
object that shall be displayed in the viewer.
- Since:
- 4.5
void Akonadi::ContactViewer::smsClicked | ( | const KABC::PhoneNumber & | number | ) | [signal] |
This signal is emitted whenever the user has clicked on a SMS link of a phone number in the viewer.
- Parameters:
-
number The corresponding phone number.
void Akonadi::ContactViewer::urlClicked | ( | const KUrl & | url | ) | [signal] |
This signal is emitted whenever the user has clicked on a url (e.g.
homepage or blog url) in the viewer.
- Parameters:
-
url The url that has been clicked.
The documentation for this class was generated from the following file: