BibleTime
|
Implementation for Sword Bibles. More...
#include <cswordbiblemoduleinfo.h>
Public Member Functions | |
unsigned int | bookNumber (const QString &book) const |
QStringList const & | books () const |
unsigned int | chapterCount (const QString &book) const |
unsigned int | chapterCount (const unsigned int book) const |
CSwordKey * | createKey () const final override |
CSwordBibleModuleInfo (sword::SWModule &module, CSwordBackend &backend, ModuleType type=Bible) | |
bool | hasNewTestament () const |
bool | hasOldTestament () const |
CSwordVerseKey const & | lowerBound () const |
CSwordVerseKey const & | upperBound () const |
unsigned int | verseCount (const QString &book, const unsigned int chapter) const |
unsigned int | verseCount (const unsigned int book, const unsigned int chapter) const |
~CSwordBibleModuleInfo () noexcept override | |
Public Member Functions inherited from CSwordModuleInfo | |
QString | aboutText () const |
void | buildIndex () |
CSwordModuleInfo::Category | category () const |
QString | config (const CSwordModuleInfo::ConfigEntry entry) const |
CSwordModuleInfo (CSwordModuleInfo &&)=delete | |
CSwordModuleInfo (CSwordModuleInfo const &)=delete | |
void | deleteEntry (CSwordKey *const key) |
void | deleteIndex () |
QString | getModuleBaseIndexLocation () const |
QString | getModuleStandardIndexLocation () const |
QString | getUnlockInfo () |
std::shared_ptr< Language const > | glossaryTargetlanguage () const |
bool | has (CSwordModuleInfo::Feature const feature) const noexcept |
bool | has (CSwordModuleInfo::FilterOption const &) const |
bool | hasIndex () const |
bool | hasVersion () const |
::qint64 | indexSize () const |
bool | isEncrypted () const |
bool | isHidden () const |
bool | isLocked () const |
bool | isUnicode () const noexcept |
virtual bool | isWritable () const |
std::shared_ptr< Language const > | language () const |
sword::SWVersion | minimumSwordVersion () const |
QIcon | moduleIcon () const |
QString const & | name () const |
CSwordModuleInfo & | operator= (CSwordModuleInfo &&)=delete |
CSwordModuleInfo & | operator= (CSwordModuleInfo const &)=delete |
CSwordModuleSearch::ModuleResultList | searchIndexed (QString const &searchedText, sword::ListKey const &scope) const |
bool | setHidden (bool hide) |
virtual bool | snap () const |
sword::SWModule & | swordModule () const |
CSwordModuleInfo::TextDirection | textDirection () const |
char const * | textDirectionAsHtml () const |
ModuleType | type () const |
bool | unlock (const QString &unlockKey) |
bool | unlockKeyIsValid () const |
void | write (CSwordKey *key, const QString &newText) |
Private Member Functions | |
void | initBounds () const |
Private Attributes | |
std::optional< QStringList > | m_bookList |
bool | m_boundsInitialized |
QString | m_cachedLocale |
bool | m_hasNT |
bool | m_hasOT |
CSwordVerseKey | m_lowerBound |
CSwordVerseKey | m_upperBound |
Implementation for Sword Bibles.
This is the CModuleInfo imlementation for Bible modules managed by Sword.
Definition at line 27 of file cswordbiblemoduleinfo.h.
CSwordBibleModuleInfo::CSwordBibleModuleInfo | ( | sword::SWModule & | module, |
CSwordBackend & | backend, | ||
ModuleType | type = Bible |
||
) |
Definition at line 25 of file cswordbiblemoduleinfo.cpp.
|
overridedefaultnoexcept |
unsigned int CSwordBibleModuleInfo::bookNumber | ( | const QString & | book | ) | const |
0 | if a book with the given name was not found. |
Definition at line 136 of file cswordbiblemoduleinfo.cpp.
References createKey(), and CSwordModuleInfo::swordModule().
Referenced by chapterCount(), and verseCount().
QStringList const & CSwordBibleModuleInfo::books | ( | ) | const |
Returns the books available in this module
Definition at line 64 of file cswordbiblemoduleinfo.cpp.
References CSwordModuleInfo::backend(), CSwordVerseKey::bookName(), CSwordBackend::booknameLanguage(), initBounds(), CSwordVerseKey::key(), m_bookList, m_boundsInitialized, m_cachedLocale, m_lowerBound, m_upperBound, CSwordVerseKey::next(), and CSwordVerseKey::setKey().
Referenced by BtBibleKeyWidget::populateBookMenu().
unsigned int CSwordBibleModuleInfo::chapterCount | ( | const QString & | book | ) | const |
Definition at line 106 of file cswordbiblemoduleinfo.cpp.
References bookNumber(), and chapterCount().
unsigned int CSwordBibleModuleInfo::chapterCount | ( | const unsigned int | book | ) | const |
Definition at line 91 of file cswordbiblemoduleinfo.cpp.
References createKey(), and CSwordModuleInfo::swordModule().
Referenced by chapterCount(), and BtBibleKeyWidget::populateChapterMenu().
|
finaloverridevirtual |
Implements CSwordModuleInfo.
Definition at line 150 of file cswordbiblemoduleinfo.cpp.
References BT_ASSERT, and CSwordModuleInfo::swordModule().
Referenced by bookNumber(), chapterCount(), and verseCount().
|
inline |
Definition at line 86 of file cswordbiblemoduleinfo.h.
References initBounds(), m_boundsInitialized, and m_hasNT.
|
inline |
Definition at line 77 of file cswordbiblemoduleinfo.h.
References initBounds(), m_boundsInitialized, and m_hasOT.
Referenced by CSwordVerseKey::bookName().
|
private |
Definition at line 36 of file cswordbiblemoduleinfo.cpp.
References BT_ASSERT.
Referenced by books(), hasNewTestament(), hasOldTestament(), lowerBound(), and upperBound().
|
inline |
Definition at line 95 of file cswordbiblemoduleinfo.h.
References initBounds(), m_boundsInitialized, and m_lowerBound.
Referenced by CSwordModuleInfo::buildIndex(), BtModuleTextModel::reloadModules(), and CSwordVerseKey::setModule().
|
inline |
Definition at line 104 of file cswordbiblemoduleinfo.h.
References initBounds(), m_boundsInitialized, and m_upperBound.
Referenced by CSwordModuleInfo::buildIndex(), BtModuleTextModel::reloadModules(), and CSwordVerseKey::setModule().
unsigned int CSwordBibleModuleInfo::verseCount | ( | const QString & | book, |
const unsigned int | chapter | ||
) | const |
book | The name of the book we use |
chapter | The number of the chapter we use |
Definition at line 130 of file cswordbiblemoduleinfo.cpp.
References bookNumber(), and verseCount().
unsigned int CSwordBibleModuleInfo::verseCount | ( | const unsigned int | book, |
const unsigned int | chapter | ||
) | const |
book | The number book we should use |
chapter | The chapter we should use |
Returns the number of verses for the given chapter.
Definition at line 112 of file cswordbiblemoduleinfo.cpp.
References createKey(), and CSwordModuleInfo::swordModule().
Referenced by BtBibleKeyWidget::populateVerseMenu(), and verseCount().
|
mutableprivate |
Definition at line 124 of file cswordbiblemoduleinfo.h.
Referenced by books().
|
mutableprivate |
Definition at line 118 of file cswordbiblemoduleinfo.h.
Referenced by books(), hasNewTestament(), hasOldTestament(), lowerBound(), and upperBound().
|
mutableprivate |
Definition at line 125 of file cswordbiblemoduleinfo.h.
Referenced by books().
|
mutableprivate |
Definition at line 122 of file cswordbiblemoduleinfo.h.
Referenced by hasNewTestament().
|
mutableprivate |
Definition at line 121 of file cswordbiblemoduleinfo.h.
Referenced by hasOldTestament().
|
mutableprivate |
Definition at line 119 of file cswordbiblemoduleinfo.h.
Referenced by books(), and lowerBound().
|
mutableprivate |
Definition at line 120 of file cswordbiblemoduleinfo.h.
Referenced by books(), and upperBound().