|
BibleTime
|
#include <cdisplaytemplatemgr.h>
Classes | |
| struct | Settings |
Public Member Functions | |
| QStringList const & | availableTemplates () const |
| CDisplayTemplateMgr (QString &errorMessage) | |
| QString | fillTemplate (const QString &name, QString content, const Settings &settings) const |
| Fills the template. | |
Static Public Member Functions | |
| static QString | activeTemplateName () |
| static CDisplayTemplateMgr * | instance () |
Private Member Functions | |
| void | loadCSSTemplate (const QString &filename) |
| void | loadTemplate (const QString &filename) |
Private Attributes | |
| QStringList | m_availableTemplateNamesCache |
| QHash< QString, QString > | m_cssMap |
| QHash< QString, QString > | m_templateMap |
Static Private Attributes | |
| static CDisplayTemplateMgr * | m_instance = nullptr |
Manages the display templates used in the filters and display classes.
Definition at line 27 of file cdisplaytemplatemgr.h.
|
explicit |
| [out] | errorMessage | Set to error string on error, otherwise set to QString(). |
Definition at line 48 of file cdisplaytemplatemgr.cpp.
References BT_ASSERT, loadCSSTemplate(), loadTemplate(), m_availableTemplateNamesCache, m_cssMap, m_instance, and m_templateMap.
|
static |
Definition at line 256 of file cdisplaytemplatemgr.cpp.
References btConfig(), instance(), m_availableTemplateNamesCache, and BtConfigCore::value().
Referenced by CDisplaySettingsPage::CDisplaySettingsPage(), Rendering::CTextRendering::finishText(), Rendering::CDisplayRendering::finishText(), BtPrinter::finishText(), Rendering::formatInfo(), ColorManager::getBackgroundColor(), ColorManager::getBackgroundHighlightColor(), ColorManager::getForegroundColor(), and ColorManager::replaceColors().
|
inline |
Definition at line 65 of file cdisplaytemplatemgr.h.
References m_availableTemplateNamesCache.
Referenced by CDisplaySettingsPage::CDisplaySettingsPage().
| QString CDisplayTemplateMgr::fillTemplate | ( | const QString & | name, |
| QString | content, | ||
| const Settings & | settings | ||
| ) | const |
Fills the template.
Fills rendered content into the template given by the name.
| name | The name of the template to fill. |
| content | The content which should be filled into the template. |
| settings | The settings which are used to process the templating process. |
Definition at line 103 of file cdisplaytemplatemgr.cpp.
References CSwordBackend::availableLanguages(), CSwordModuleInfo::Bible, BT_ASSERT, btConfig(), CSwordModuleInfo::Commentary, CSwordModuleInfo::GenericBook, BtConfig::getDefaultFont(), BtConfig::getFontForLanguage(), CSwordBackend::instance(), CDisplayTemplateMgr::Settings::langAbbrev, CSwordModuleInfo::LeftToRight, CSwordModuleInfo::Lexicon, m_cssMap, m_templateMap, CDisplayTemplateMgr::Settings::modules, CDisplayTemplateMgr::Settings::pageCSS_ID, CDisplayTemplateMgr::Settings::textDirection, CDisplayTemplateMgr::Settings::title, and U.
Referenced by Rendering::CTextRendering::finishText(), Rendering::CDisplayRendering::finishText(), BtPrinter::finishText(), and Rendering::formatInfo().
|
inlinestatic |
Definition at line 92 of file cdisplaytemplatemgr.h.
References BT_ASSERT, and m_instance.
Referenced by activeTemplateName(), CDisplaySettingsPage::CDisplaySettingsPage(), Rendering::CTextRendering::finishText(), Rendering::CDisplayRendering::finishText(), BtPrinter::finishText(), Rendering::formatInfo(), and BibleTimeApp::~BibleTimeApp().
|
private |
Definition at line 274 of file cdisplaytemplatemgr.cpp.
References BT_ASSERT, and m_cssMap.
Referenced by CDisplayTemplateMgr().
|
private |
Preloads a single template from disk:
Definition at line 266 of file cdisplaytemplatemgr.cpp.
References BT_ASSERT, and m_templateMap.
Referenced by CDisplayTemplateMgr().
|
private |
Definition at line 108 of file cdisplaytemplatemgr.h.
Referenced by activeTemplateName(), availableTemplates(), and CDisplayTemplateMgr().
|
private |
Definition at line 106 of file cdisplaytemplatemgr.h.
Referenced by CDisplayTemplateMgr(), fillTemplate(), and loadCSSTemplate().
|
staticprivate |
Definition at line 107 of file cdisplaytemplatemgr.h.
Referenced by CDisplayTemplateMgr(), and instance().
|
private |
Definition at line 105 of file cdisplaytemplatemgr.h.
Referenced by CDisplayTemplateMgr(), fillTemplate(), and loadTemplate().