File indexing completed on 2024-05-12 05:13:28
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "contactprintthemeeditorutil.h" 0008 0009 ContactPrintThemeEditorutil::ContactPrintThemeEditorutil() = default; 0010 0011 QString ContactPrintThemeEditorutil::defaultContact() const 0012 { 0013 const QString contact = QStringLiteral( 0014 "BEGIN:VCARD\n" 0015 "ADR;TYPE=home:;;10 street Eiffel Tower\n;Paris;;75016;France\n" 0016 "EMAIL:test@kde.org\n" 0017 "FN:Test\n" 0018 "N:Test;;;;\n" 0019 "ORG:kde\n" 0020 "TEL;TYPE=HOME:+33 12345678\n" 0021 "UID:{851e0b81-8f95-40d2-a6a6-a9dbee2be12d}\n" 0022 "URL:www.kde.org\n" 0023 "VERSION:3.0\n" 0024 "END:VCARD"); 0025 return contact; 0026 } 0027 0028 QString ContactPrintThemeEditorutil::defaultTemplate() const 0029 { 0030 const QString templateStr = QStringLiteral( 0031 "<html>\n" 0032 "{% if contacts %}\n" 0033 "{% for contact in contacts %}\n" 0034 "<h1>{{ contact.realName|safe }}</h1>\n" 0035 "<p>{{ contact.emails|safe }}</p>\n" 0036 "<p>{{ contact.note|safe }}</p>\n" 0037 "<br>\n" 0038 "<br>\n" 0039 "{% endfor %}\n" 0040 "{% endif %}\n" 0041 "</html>"); 0042 0043 return templateStr; 0044 }