Akonadi::StandardContactFormatter Class
A class that formats a contact as HTML code. More...
| Header: | #include <Akonadi/StandardContactFormatter> |
| CMake: | find_package(KPim6AkonadiContactCore REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::AkonadiContactCore) |
| Inherits: | Akonadi::AbstractContactFormatter |
Public Functions
| StandardContactFormatter() | |
| virtual | ~StandardContactFormatter() override |
| bool | displayQRCode() const |
| void | setDisplayQRCode(bool show) |
Reimplemented Public Functions
| virtual QString | toHtml(Akonadi::AbstractContactFormatter::HtmlForm form = SelfcontainedForm) const override |
Detailed Description
Examples:
using namespace Akonadi;
const KContacts::Addressee contact = ...
StandardContactFormatter formatter;
formatter.setContact( contact );
QTextBrowser *view = new QTextBrowser;
view->setHtml( formatter.toHtml() );
Author: Tobias Koenig <tokoe@kde.org>
Member Function Documentation
StandardContactFormatter::StandardContactFormatter()
Creates a new standard contact formatter.
[override virtual noexcept] StandardContactFormatter::~StandardContactFormatter()
Destroys the standard contact formatter.
bool StandardContactFormatter::displayQRCode() const
Returns whether the QR code should be displayed for this contact.
\returnsTrue if the QR code should be displayed, false otherwise.
See also setDisplayQRCode().
void StandardContactFormatter::setDisplayQRCode(bool show)
Sets whether the QR code should be displayed for this contact.
show Whether to display the QR code.
See also displayQRCode().
[override virtual] QString StandardContactFormatter::toHtml(Akonadi::AbstractContactFormatter::HtmlForm form = SelfcontainedForm) const
Reimplements: AbstractContactFormatter::toHtml(Akonadi::AbstractContactFormatter::HtmlForm form) const.
Returns the contact formatted as HTML.