1 /*
2    SPDX-FileCopyrightText: 2015-2021 Laurent Montel <montel@kde.org>
3 
4    SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "contactprintthemeeditorutil.h"
8 
ContactPrintThemeEditorutil()9 ContactPrintThemeEditorutil::ContactPrintThemeEditorutil()
10 {
11 }
12 
defaultContact() const13 QString ContactPrintThemeEditorutil::defaultContact() const
14 {
15     const QString contact = QStringLiteral(
16         "BEGIN:VCARD\n"
17         "ADR;TYPE=home:;;10 street Eiffel Tower\n;Paris;;75016;France\n"
18         "EMAIL:test@kde.org\n"
19         "FN:Test\n"
20         "N:Test;;;;\n"
21         "ORG:kde\n"
22         "TEL;TYPE=HOME:+33 12345678\n"
23         "UID:{851e0b81-8f95-40d2-a6a6-a9dbee2be12d}\n"
24         "URL:www.kde.org\n"
25         "VERSION:3.0\n"
26         "END:VCARD");
27     return contact;
28 }
29 
defaultTemplate() const30 QString ContactPrintThemeEditorutil::defaultTemplate() const
31 {
32     const QString templateStr = QStringLiteral(
33         "<html>\n"
34         "{% if contacts %}\n"
35         "{% for contact in contacts %}\n"
36         "<h1>{{ contact.realName|safe }}</h1>\n"
37         "<p>{{ contact.emails|safe }}</p>\n"
38         "<p>{{ contact.note|safe }}</p>\n"
39         "<br>\n"
40         "<br>\n"
41         "{% endfor %}\n"
42         "{% endif %}\n"
43         "</html>");
44 
45     return templateStr;
46 }
47