Warning, /pim/kaddressbook/src/printing/grantlee/README.themes is written in an unsupported language. File is not indexed.
0001 How to create kaddressbook printing based on Grantlee:
0002 ------------------------------------------------------
0003 You need to provide a:
0004 - theme.desktop which define name/description about theme
0005 - theme.html html template used by Grantlee
0006
0007 Example:
0008 <html>
0009
0010 <h1>KAddressBook</h1>
0011 {% if contacts %}
0012 {% for contact in contacts %}
0013 <h1>{{ contact.realName|safe }}</h1>
0014 <p>{{ contact.emails|safe }}</p>
0015 <p>{{ contact.note|safe }}</p>
0016 <br>
0017 <br>
0018 {% endfor %}
0019 {% endif %}
0020
0021 </html>
0022
0023
0024 Default i18n variable:
0025 "birthdayi18n" => i18n( "Birthday" );
0026 "anniversaryi18n" => i18n( "Anniversary" );
0027 "emailsi18n" => i18n( "Emails" );
0028 "websitei18n" => i18n("Website");
0029 "blogUrli18n" => i18n( "Blog Feed" );
0030 "addressBookNamei18n" => i18n( "Address Book" );
0031 "notei18n" => i18n( "Note" );
0032 "departmenti18n" => i18n( "Department" );
0033 "Professioni18n" => i18n( "Profession" );
0034 "officei18n" => i18n( "Office" );
0035 "manageri18n" => i18n( "Manager's Name" );
0036 "assistanti18n" => i18n( "Assistant's Name" );
0037 "spousei18n" => i18n( "Partner's Name" );
0038 "imAddressi18n" => i18n( "IM Address" );
0039 "latitudei18n" => i18n( "Latitude" );
0040 "longitudei18n" => i18n( "Longitude" );
0041 "titlei18n" => i18n("Title");
0042
0043
0044 => All contact is stored in contacts object => We use a loop for as in example.
0045 We can use as variable:
0046 - name (QString)
0047 realName (QString)
0048 formattedName (QString)
0049 prefix (QString)
0050 givenName (QString)
0051 additionalName (QString)
0052 familyName (QString)
0053 suffix (QString)
0054 nickName (QString)
0055 emails (QStringList => use loop for)
0056 organization (QString)
0057 note (QString)
0058 webPage (QString)
0059 title (QString)
0060 preferredEmail (QString)
0061 role (QString)
0062 birthday (QString)
0063 department (QString)
0064 addresses (QVariant) we have more info see below
0065 phones (QVariant) we have more info see below
0066 instantManging (QVariant) we have more info see below
0067 geo (QVariant) we have more info see below
0068 addressBookName (QString)
0069 photo (QString)
0070 logo (QString)
0071 anniversary (QString)
0072 profession (QString)
0073 office (QString)
0074 manager (QString)
0075 assistant (QString)
0076 spouse (QString)
0077
0078
0079 Element for address:
0080 - type (QString)
0081 - street (QString)
0082 - postOfficeBox (QString)
0083 - locality (QString)
0084 - region (QString)
0085 - postalCode (QString)
0086 - country (QString)
0087 - label (QString)
0088 - formattedAddress (QString)
0089
0090 Element for Phones:
0091 - type (QString)
0092 - number (QString)
0093
0094 Element for IM:
0095 - type (QString)
0096 - address (QString)
0097
0098 Element for geo:
0099 - latitude (float)
0100 - longitude (float)
0101 - isValid (bool) return true if valid
0102 - toString (QString) return information as string
0103
0104 Element for crypto:
0105 - signaturePreference (QString)
0106 - cryptoPreference (QString)
0107