MagicSmoke
$VERSION$
|
this class implements the storage end of the template subsystem, its only instance exists in the webrequest More...
#include <templates.h>
Public Member Functions | |
QList< MTemplate > | allTemplates () |
returns all templates (for MTemplateEditor) More... | |
MTemplate | getTemplate (QString base, bool useFirst=false) |
returns a specific template by its base name, opens a template choice dialog if necessary More... | |
MTemplate | getTemplateByFile (QString full) |
returns a specific template by its full name, returns an invalid template if it does not exist More... | |
Protected Member Functions | |
MTemplateStore (QString) | |
instantiates the template subsystem More... | |
bool | deleteTemplate (QString) |
deletes a template (requires full name), used by MTemplateEditor More... | |
bool | setTemplate (QString templatename, QString localfile) |
stores a specific template More... | |
bool | setTemplateDescription (QString templatename, QString description) |
stores a new description for a template More... | |
bool | setTemplateFlags (QString templatename, QString flags) |
stores a change of flags for a template More... | |
void | updateTemplates (bool force) |
updates the template directory, does not do anything if force==false and the last update was less than 5min ago More... | |
Friends | |
class | MSInterface |
class | MTemplateEditor |
this class implements the storage end of the template subsystem, its only instance exists in the webrequest
|
protected |
QList< MTemplate > MTemplateStore::allTemplates | ( | ) |
returns all templates (for MTemplateEditor)
References req, and updateTemplates().
|
protected |
deletes a template (requires full name), used by MTemplateEditor
References req.
MTemplate MTemplateStore::getTemplate | ( | QString | base, |
bool | useFirst = false |
||
) |
returns a specific template by its base name, opens a template choice dialog if necessary
base | the base name of the template to retrieve (eg. "ticket" or "voucher") |
useFirst | if true: use the first match regardless of whether there are more candidates |
References MSInterface::checkFlags(), MSInterface::instance(), req, templaceChoser(), and updateTemplates().
MTemplate MTemplateStore::getTemplateByFile | ( | QString | full | ) |
returns a specific template by its full name, returns an invalid template if it does not exist
full | the full name of the template to retrieve (eg. "ticket.xtt,1") |
References req, and updateTemplates().
Referenced by PrintingRun::PrintingRun(), and MPServerConfig::validateConfig().
|
protected |
stores a specific template
References req.
|
protected |
stores a new description for a template
References req.
|
protected |
stores a change of flags for a template
References req.
|
protected |
updates the template directory, does not do anything if force==false and the last update was less than 5min ago
References MProgressWrapper::create(), MTGetTemplateList::gettemplates(), MProgressWrapper::hide(), req, MOTemplateInfo::setdescription(), MOTemplateInfo::setfilename(), MOTemplateInfo::setflags(), MOTemplateInfo::sethash(), MProgressWrapper::setRange(), and MProgressWrapper::setValue().
Referenced by allTemplates(), getTemplate(), getTemplateByFile(), and MSInterface::updateTemplates().
|
friend |
|
friend |