| MagicSmoke
    $VERSION$
    | 
this class wraps a single template More...
#include <templates.h>
| Public Types | |
| typedef std::function < MTemplate(const QList < MTemplate > &)> | TemplateChoserFunction | 
| enum | Type { UnknownTemplate =0, OdtTemplate =1, OdsTemplate =2, OdpTemplate =4, OdgTemplate =8, OdbTemplate =0x10, OdfTemplateMask =0xff, LabelTemplate =0x100, ZipTemplate =0x200, HtmlTemplate =0x400, MimeTemplate =0x800 } | 
| template type; currently only ODF and Labels are known  More... | |
| Public Member Functions | |
| MTemplate () | |
| creates an invalid template  More... | |
| MTemplate (QString fn) | |
| creates a temporary template by a physical file name  More... | |
| MTemplate (const MTemplate &)=default | |
| copies a template  More... | |
| QString | baseName () const | 
| returns the base name of the template (eg.  More... | |
| QString | cacheFileName () const | 
| returns the name/path of the cache file, if it exists  More... | |
| QString | checksum () const | 
| returns the checksum (calculated by the server)  More... | |
| QString | completeFileName () const | 
| returns the complete encoded name of the template (eg.  More... | |
| QString | description () const | 
| returns the description  More... | |
| QString | extension () const | 
| returns the extension of the template (eg.  More... | |
| QString | fileName () const | 
| returns the file name of the template (eg.  More... | |
| QString | flags () const | 
| returns the flags of this template  More... | |
| bool | isHtml () const | 
| returns whether this is a HTML template  More... | |
| bool | isLabel () const | 
| returns whether this is a label template  More... | |
| bool | isOdf () const | 
| returns whether this is an ODF template  More... | |
| bool | isValid () const | 
| returns whether this is a valid template  More... | |
| bool | isZip () const | 
| returns whether this is a ZipTemplate  More... | |
| MTemplate & | operator= (const MTemplate &)=default | 
| copies a template  More... | |
| void | setFile (const QString &) | 
| reinitializes the template from the given file name  More... | |
| QString | targetExtension () const | 
| returns the extension of the target document if it is saved (empty if the template cannot be saved)  More... | |
| Type | type () const | 
| returns the template type  More... | |
| QString | variantID () const | 
| returns the variant ID of the template (warning: it has no meaning outside the template storage system  More... | |
| Static Public Member Functions | |
| static QStringList | legalBaseNames () | 
| returns the currently known (by the client) template base names  More... | |
| static QStringList | legalSuffixes (QString) | 
| returns the legal template file suffixes (as understood by the client) for a template base name; returns empty if none is legal  More... | |
| static Types | legalTypes (QString) | 
| returns the legal file types (as understood by the client) for a template base name; returns UnknownTemplate if none is legal  More... | |
| static void | setTemplateChoiceFunction (const TemplateChoserFunction &) | 
| set a function to handle multiple template choices, the default is a function that choses the first one  More... | |
| Protected Member Functions | |
| MTemplate (QString fn, QString chk, QString dsc, QString flg) | |
| creates a template wrapper from a cache file name; this constructor is used internally in the storage system  More... | |
| Friends | |
| class | MTemplateChoice | 
| class | MTemplateStore | 
this class wraps a single template
| typedef std::function<MTemplate(const QList<MTemplate>&)> MTemplate::TemplateChoserFunction | 
| enum MTemplate::Type | 
template type; currently only ODF and Labels are known
| MTemplate::MTemplate | ( | ) | 
creates an invalid template
| MTemplate::MTemplate | ( | QString | fn | ) | 
creates a temporary template by a physical file name
| 
 | default | 
copies a template
| 
 | protected | 
creates a template wrapper from a cache file name; this constructor is used internally in the storage system
| fn | physical file name of the template | 
| chk | server side check sum of the template | 
| dsc | description of the template | 
| flg | flags of the template | 
| QString MTemplate::baseName | ( | ) | const | 
returns the base name of the template (eg.
mytemplate for mytemplate.odtt)
| QString MTemplate::cacheFileName | ( | ) | const | 
returns the name/path of the cache file, if it exists
Referenced by MLabelRenderer::MLabelRenderer(), MOdtRenderer::MOdtRenderer(), and MEventView::resetPattern().
| QString MTemplate::checksum | ( | ) | const | 
returns the checksum (calculated by the server)
Referenced by MPServerConfig::validateConfig().
| QString MTemplate::completeFileName | ( | ) | const | 
returns the complete encoded name of the template (eg.
mytemplate.odtt,v1)
| QString MTemplate::description | ( | ) | const | 
returns the description
| QString MTemplate::extension | ( | ) | const | 
returns the extension of the template (eg.
odtt for mytemplate.odtt)
Referenced by targetExtension(), and type().
| QString MTemplate::fileName | ( | ) | const | 
returns the file name of the template (eg.
mytemplate.odtt)
| 
 | inline | 
returns the flags of this template
| bool MTemplate::isHtml | ( | ) | const | 
returns whether this is a HTML template
References HtmlTemplate, and type().
Referenced by MEventView::resetPattern().
| bool MTemplate::isLabel | ( | ) | const | 
returns whether this is a label template
References LabelTemplate, and type().
| bool MTemplate::isOdf | ( | ) | const | 
returns whether this is an ODF template
References OdfTemplateMask, and type().
| bool MTemplate::isValid | ( | ) | const | 
returns whether this is a valid template
Referenced by MEventView::resetPattern(), and MPServerConfig::validateConfig().
| bool MTemplate::isZip | ( | ) | const | 
returns whether this is a ZipTemplate
References type(), and ZipTemplate.
| 
 | static | 
returns the currently known (by the client) template base names
References tempBaseNames.
| 
 | static | 
returns the legal template file suffixes (as understood by the client) for a template base name; returns empty if none is legal
References HtmlTemplate, LabelTemplate, legalTypes(), MimeTemplate, OdfTemplateMask, and ZipTemplate.
| 
 | static | 
returns the legal file types (as understood by the client) for a template base name; returns UnknownTemplate if none is legal
References HtmlTemplate, LabelTemplate, MimeTemplate, OdfTemplateMask, UnknownTemplate, and ZipTemplate.
Referenced by legalSuffixes().
| void MTemplate::setFile | ( | const QString & | s | ) | 
reinitializes the template from the given file name
| 
 | static | 
set a function to handle multiple template choices, the default is a function that choses the first one
References templaceChoser().
Referenced by initTemplateChoser().
| QString MTemplate::targetExtension | ( | ) | const | 
returns the extension of the target document if it is saved (empty if the template cannot be saved)
References extension().
Referenced by MOdtRenderer::MOdtRenderer().
| MTemplate::Type MTemplate::type | ( | ) | const | 
returns the template type
References extension(), HtmlTemplate, LabelTemplate, MimeTemplate, OdbTemplate, OdgTemplate, OdpTemplate, OdsTemplate, OdtTemplate, UnknownTemplate, and ZipTemplate.
| QString MTemplate::variantID | ( | ) | const | 
returns the variant ID of the template (warning: it has no meaning outside the template storage system
| 
 | friend | 
| 
 | friend |