Warning, /frameworks/ktexttemplate/docs/examples.dox is written in an unsupported language. File is not indexed.
0001
0002 namespace KTextTemplate
0003 {
0004
0005 /**
0006
0007 @page examples Examples of KTextTemplate use
0008
0009 @section books_example Books
0010
0011 The Books application from %Qt Demos is modified to export the available data to a rendered html file. The example shows a use of the <tt>extends</tt> tag to override some parts of a base template. The templates can be edited to change the exported content without any recompiling. The themer has broad control over how the data os rendered and can even alter the structure of the presented data.
0012
0013 <center><b>
0014 @image html ktexttemplate_book_simple.png "A simple export of the data"
0015 <br/>
0016 @image html ktexttemplate_book_coloured.png "A coloured export of the data showing the use of the "<tt>cycle</tt>" tag."
0017 <br/>
0018 @image html ktexttemplate_book_coloured_grouped.png "A restructured export of the data showing the use of the "<tt>ifchanged</tt>" tag."
0019 </b></center>
0020
0021 @section codegen_example Codegen
0022
0023 The codegen example shows how to use %KTextTemplate for code generation in multiple languages. The application can be used to generate classes in C++, python and ruby based on the content of the dialog. The user can define properties, which are generated appropriately to the language. For C++ it uses the <tt>Q_PROPERTY</tt> macro and creates an accessor a mutator and a notify signal. It can also be used to generate methods with arguments of any type in each language.
0024
0025 <center><b>
0026 @image html codegen.png "The property and method configuration UI"
0027 <br/>
0028 @image html codegen-output.png "The output of the codegen tool"
0029 </b></center>
0030
0031 @subsection codegen_blogs Related blog article
0032 <a href="http://steveire.wordpress.com/2010/04/06/using-grantlee-for-code-generation/">Using Grantlee for code generation</a>
0033
0034 @section contacts_example Contacts
0035
0036 The contacts application demostrates the use of the internationalization and localization features in %KTextTemplate. The user can select several contacts, whose details are formatted in templates for display in different themes. All strings in the templates are translatable, and the numbers, dates and currencies can be localized. The Contacts example can be used with the %Qt or the KDE localization systems.
0037
0038 <center><b>
0039 @image html contacts_multi_lang_tables.png "A theme showing selected contacts in localized tables"
0040 <br/>
0041 @image html contacts_multi_lang_headers.png "An alternative theme showing a single table with localized headers."
0042 </b></center>
0043
0044
0045 @subsection contacts_blogs Related blog article
0046 <a href="http://steveire.wordpress.com/2010/11/11/localization-tricky-issue/">Localization: Tricky issue</a>
0047
0048 @section htmlapps_example Html application framework
0049
0050 The htmlapps example demonstrates how string templates can form part of a larger platform for html based applications. The application consists of a an extensible set of templates containing html applications, a %KTextTemplate plugin to extract data from rss feeds, and various infrastructure to handle local and remote network requests and render the result in WebKit.
0051
0052 Several html applications are part of the example, such as capabilities for showing weather information, flickr feeds, identica microblogging etc.
0053
0054 <center><b>
0055 @image html htmlapps.png "A weather application written in HTML"
0056 <br/>
0057 @image html htmlapps1.png "A flickr application written in HTML"
0058 </b></center>
0059
0060 @subsection htmlapps_blogs Related blog article
0061 <a href="http://steveire.wordpress.com/2011/02/06/templating-html-applications-with-grantlee/">Templating HTML Applications with Grantlee</a>
0062
0063 @section textedit_example Textedit application example
0064
0065 The textedit application example is a modified version of the same example which is bundled with %Qt. The example shows how a custom type can be used in a text document and processed with the KTextTemplate::Textdocument library. It further demostrates how to add theming to the output using the KTextTemplate::Templates library.
0066
0067 @subsection textedit_blogs Related blog article
0068 <a href="http://steveire.wordpress.com/2010/04/05/grantleerichtextbuilders/">KTextTemplate::RichTextBuilders</a>
0069
0070 @section kdepim KDE PIM 4.6
0071
0072 KDE PIM started using %KTextTemplate in its 4.6.0 release. The applications KJots and KAddressBook already use KTextTemplate::Templates to render content for user consumption.
0073
0074 */
0075
0076 }