13 #ifndef MAGICSMOKE_TEMPLATES_H
14 #define MAGICSMOKE_TEMPLATES_H
20 #ifndef MSIFACE_EXPORT
21 #define MSIFACE_EXPORT Q_DECL_IMPORT
41 void setFile(
const QString&);
44 QString cacheFileName()
const;
47 QString fileName()
const;
50 QString completeFileName()
const;
53 QString baseName()
const;
56 QString extension()
const;
59 QString variantID()
const;
62 QString checksum()
const;
65 QString description()
const;
71 QString targetExtension()
const;
86 QString
flags()
const{
return m_flags;}
103 OdfTemplateMask=0xff,
113 Q_DECLARE_FLAGS(Types,Type)
119 static QStringList legalBaseNames();
122 static Types legalTypes(QString);
125 static QStringList legalSuffixes(QString);
131 static
void setTemplateChoiceFunction(const TemplateChoserFunction&);
142 MTemplate(QString fn,QString chk,QString dsc,QString flg);
144 QString m_fname,m_checksum,m_descr,m_flags;
155 MTemplateStore(QString);
158 bool setTemplate(QString templatename,QString localfile);
161 bool setTemplateDescription(QString templatename,QString description);
164 bool setTemplateFlags(QString templatename,QString flags);
167 bool deleteTemplate(QString);
170 void updateTemplates(
bool force);
174 MTemplateStore()=
delete;
177 bool retrieveFile(QString,QString);
184 MTemplate getTemplate(QString base,
bool useFirst=
false);
187 MTemplate getTemplateByFile(QString full);
190 QList<MTemplate> allTemplates();
this class wraps a single template
Definition: templates.h:25
gives the user a choice of template variants; used by MTemplateStore only!
Definition: templatedlg.h:28
std::function< MTemplate(const QList< MTemplate > &)> TemplateChoserFunction
Definition: templates.h:127
Type
template type; currently only ODF and Labels are known
Definition: templates.h:89
Q_DECLARE_OPERATORS_FOR_FLAGS(MLocalFormat::MoneyFlags)
lets the user add and remove templates and variants to/from the database; used by MWebRequest! ...
Definition: templatedlg.h:44
this class implements the storage end of the template subsystem, its only instance exists in the webr...
Definition: templates.h:149
QString flags() const
returns the flags of this template
Definition: templates.h:86
#define MSIFACE_EXPORT
Definition: templates.h:21
the MagicSmoke specific interface class - enhances the basic interface by some functionality needed i...
Definition: msinterface.h:29