18 #include <QStringList>
20 #include "../../util/btassert.h"
21 #include "../bookshelfmodel/btbookshelfmodel.h"
22 #include "../btglobal.h"
23 #include "../drivers/cswordmoduleinfo.h"
24 #include "../drivers/btconstmoduleset.h"
25 #include "../filters/gbftohtml.h"
26 #include "../filters/osistohtml.h"
27 #include "../filters/plaintohtml.h"
28 #include "../filters/teitohtml.h"
29 #include "../filters/thmltohtml.h"
30 #include "../language.h"
33 #pragma GCC diagnostic push
34 #pragma GCC diagnostic ignored "-Wextra-semi"
35 #pragma GCC diagnostic ignored "-Wunused-parameter"
36 #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
38 #pragma GCC diagnostic pop
75 std::set<std::shared_ptr<Language const>>;
93 CSwordBackend(
const QString & path,
const bool augmentHome =
true);
115 std::shared_ptr<AvailableLanguagesCacheContainer const>
208 {
return QString::fromLatin1(
m_manager.prefixPath); }
222 using sword::SWMgr::SWMgr;
227 sword::ConfigEntMap & section)
override;
240 std::shared_ptr<AvailableLanguagesCacheContainer const>
QList< CSwordModuleInfo const * > BtConstModuleList
The backend layer main class, a backend implementation of Sword.
void shutdownModules()
Deinitializes and frees the modules.
void setOption(CSwordModuleInfo::FilterOption const &type, const int state)
Sets the state of the given filter option.
std::shared_ptr< AvailableLanguagesCacheContainer const > availableLanguages() noexcept
CSwordBackend::LoadError initModules()
Initializes the Sword modules.
QStringList swordDirList() const
Sword prefix list.
std::set< std::shared_ptr< Language const > > AvailableLanguagesCacheContainer
static CSwordBackend * m_instance
void reloadModules()
Reloads all Sword modules.
std::shared_ptr< BtBookshelfModel > const m_dataModel
QList< CSwordModuleInfo * > getPointerList(const QStringList &names) const
CSwordModuleInfo * findFirstAvailableModule(CSwordModuleInfo::ModuleType type)
CSwordBackend::Private m_manager
void deleteOrphanedIndices()
QList< CSwordModuleInfo * > const & moduleList() const
CSwordModuleInfo * findModuleByName(const QString &name) const
Searches for a module with the given name.
QString prefixPath() const
sword::SWConfig * getConfig() const
static CSwordBackend & instance() noexcept
void uninstallModules(BtConstModuleSet const &modules)
Uninstalls the given modules.
void sigSwordSetupChanged()
CSwordBackend()
Creates the regular CSwordBackend instance.
BtConstModuleList getConstPointerList(const QStringList &names) const
LoadError
The error codes which may be returned by the Load() call.
void setFilterOptions(const FilterOptions &options)
CSwordModuleInfo * findSwordModuleByPointer(const sword::SWModule *const swmodule) const
Searches for a module with the given sword module as module().
~CSwordBackend() override
void setBooknameLanguage(QString const &langName)
Sets the language for the international booknames of Sword.
std::shared_ptr< AvailableLanguagesCacheContainer const > m_availableLanguagesCache
std::shared_ptr< BtBookshelfModel > model()
QString booknameLanguage() const
GBF to HTML conversion filter.
OSIS to HTMl conversion filter.
Plain text to HTML conversion filter.
TEI to HTML conversion filter.
ThML to HTML conversion filter.
Filters::TeiToHtml m_teiFilter
Filters::ThmlToHtml m_thmlFilter
Filters::OsisToHtml m_osisFilter
Filters::GbfToHtml m_gbfFilter
void addRenderFilters(sword::SWModule *module, sword::ConfigEntMap §ion) override
Filters::PlainToHtml m_plainFilter