BibleTime
|
#include <cswordlexiconmoduleinfo.h>
Public Member Functions | |
CSwordKey * | createKey () const final override |
CSwordLexiconModuleInfo (sword::SWModule &module, CSwordBackend &backend) | |
const QStringList & | entries () const |
bool | hasStrongsKeys () const |
QString | normalizeStrongsKey (const QString &key) const |
bool | snap () const final 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) |
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 Attributes | |
QStringList | m_entries |
bool | m_hasLeadingStrongsLetter = false |
bool | m_hasStrongsKeys = false |
int | m_strongsDigitsLength = 0 |
The implementation of CModuleInfo for the Sword lexiccons and citionaries.
Definition at line 28 of file cswordlexiconmoduleinfo.h.
CSwordLexiconModuleInfo::CSwordLexiconModuleInfo | ( | sword::SWModule & | module, |
CSwordBackend & | backend | ||
) |
See if module keys are consistent with Strong's references and determine if keys start with "G" or "H" and the number of digits in the keys.
Definition at line 47 of file cswordlexiconmoduleinfo.cpp.
References m_hasLeadingStrongsLetter, m_hasStrongsKeys, and m_strongsDigitsLength.
|
finaloverridevirtual |
Implements CSwordModuleInfo.
Definition at line 194 of file cswordlexiconmoduleinfo.cpp.
References CSwordModuleInfo::swordModule().
const QStringList & CSwordLexiconModuleInfo::entries | ( | ) | const |
This method returns the entries of the modules represented by this object. If this function is called for the first time the list is load from disk and stored in a list which cahes it. If the function is called again, the cached list is returned so we have a major speed improvement.
Definition at line 73 of file cswordlexiconmoduleinfo.cpp.
References CACHE_FORMAT, CSwordModuleInfo::config(), util::directory::getUserCacheDir(), CSwordModuleInfo::isUnicode(), m_entries, CSwordModuleInfo::ModuleVersion, CSwordModuleInfo::name(), snap(), CSwordModuleInfo::swordModule(), and util::cp1252::toUnicode().
Referenced by BtModuleTextModel::lexiconData().
bool CSwordLexiconModuleInfo::hasStrongsKeys | ( | ) | const |
Return true if this lexicon has Strong's keys
Definition at line 163 of file cswordlexiconmoduleinfo.cpp.
References m_hasStrongsKeys.
QString CSwordLexiconModuleInfo::normalizeStrongsKey | ( | const QString & | key | ) | const |
Takes a Strong's key string and formats it consistent with the key strings of this module.
Definition at line 167 of file cswordlexiconmoduleinfo.cpp.
References m_hasLeadingStrongsLetter, and m_strongsDigitsLength.
|
finaloverridevirtual |
Jumps to the closest entry in the module.
Reimplemented from CSwordModuleInfo.
Definition at line 160 of file cswordlexiconmoduleinfo.cpp.
References CSwordModuleInfo::swordModule().
Referenced by entries().
|
mutableprivate |
This is the list which caches the entres of the module.
Definition at line 70 of file cswordlexiconmoduleinfo.h.
Referenced by entries().
|
private |
Definition at line 64 of file cswordlexiconmoduleinfo.h.
Referenced by CSwordLexiconModuleInfo(), and normalizeStrongsKey().
|
private |
Definition at line 63 of file cswordlexiconmoduleinfo.h.
Referenced by CSwordLexiconModuleInfo(), and hasStrongsKeys().
|
private |
Definition at line 65 of file cswordlexiconmoduleinfo.h.
Referenced by CSwordLexiconModuleInfo(), and normalizeStrongsKey().