BibleTime
|
#include <cswordkey.h>
Public Types | |
enum | TextRenderType { Normal , ProcessEntryAttributesOnly } |
Public Member Functions | |
virtual sword::SWKey const & | asSwordKey () const noexcept=0 |
virtual CSwordKey * | copy () const =0 |
bool | isValid () const |
virtual QString | key () const =0 |
CSwordModuleInfo const * | module () const |
virtual QString | normalizedKey () const |
CSwordKey & | operator= (CSwordKey const &)=delete |
QString | rawText () |
QString | renderedText (const CSwordKey::TextRenderType mode=CSwordKey::Normal) |
virtual bool | setKey (const char *key)=0 |
virtual bool | setKey (const QString &key)=0 |
virtual void | setModule (const CSwordModuleInfo *newModule) |
QString | strippedText () |
virtual | ~CSwordKey () noexcept |
Protected Member Functions | |
CSwordKey (CSwordKey const ©)=default | |
CSwordKey (CSwordModuleInfo const *const module=nullptr) | |
virtual const char * | rawKey () const =0 |
Protected Attributes | |
const CSwordModuleInfo * | m_module |
bool | m_valid = true |
Base class for all Sword based keys.
Definition at line 22 of file cswordkey.h.
Enumerator | |
---|---|
Normal | |
ProcessEntryAttributesOnly |
Definition at line 26 of file cswordkey.h.
|
virtualdefaultnoexcept |
|
inlineprotected |
Definition at line 99 of file cswordkey.h.
|
protecteddefault |
|
pure virtualnoexcept |
Implemented in CSwordVerseKey, CSwordTreeKey, and CSwordLDKey.
|
pure virtual |
Implemented in CSwordVerseKey, CSwordTreeKey, and CSwordLDKey.
Referenced by BtQmlInterface::copyRange().
|
inline |
Check whether key is valid. Can be invalidated during av11n mapping.
Definition at line 95 of file cswordkey.h.
References m_valid.
Referenced by Rendering::CTextRendering::renderEntry().
|
pure virtual |
Implemented in CSwordVerseKey, CSwordTreeKey, and CSwordLDKey.
Referenced by BTHistory::add(), CBookTreeChooser::addKeyChildren(), CExportManager::copyKey(), CSwordModuleInfo::deleteEntry(), Rendering::CDisplayRendering::entryLink(), BtQmlInterface::getCurrentModelIndex(), CDisplayWindow::lookupSwordKey(), BtModelViewReadDisplay::print(), CExportManager::printKey(), rawText(), renderedText(), Rendering::CTextRendering::renderEntry(), CExportManager::saveKey(), CBibleReadWindow::syncWindows(), BtModelViewReadDisplay::text(), and CSwordModuleInfo::write().
|
inline |
Definition at line 68 of file cswordkey.h.
References m_module.
Referenced by CSwordVerseKey::bookName(), CExportManager::copyKey(), BtQmlInterface::copyVerseRange(), CSwordVerseKey::CSwordVerseKey(), BtQmlInterface::getCurrentModelIndex(), BtQmlInterface::isBibleOrCommentary(), CSwordVerseKey::lowerBound(), CSwordVerseKey::next(), CSwordVerseKey::previous(), BtModelViewReadDisplay::print(), CExportManager::printKey(), CExportManager::saveKey(), BtModelViewReadDisplay::text(), and CSwordVerseKey::upperBound().
|
virtual |
Reimplemented in CSwordVerseKey.
Definition at line 43 of file cswordkey.cpp.
|
protectedpure virtual |
Implemented in CSwordVerseKey, CSwordTreeKey, and CSwordLDKey.
Referenced by rawText(), renderedText(), and strippedText().
QString CSwordKey::rawText | ( | ) |
Definition at line 45 of file cswordkey.cpp.
References key(), m_module, rawKey(), and CSwordModuleInfo::swordModule().
Referenced by BtQmlInterface::getRawText(), Rendering::CDisplayRendering::renderDisplayEntry(), and BtModuleTextModel::verseData().
QString CSwordKey::renderedText | ( | const CSwordKey::TextRenderType | mode = CSwordKey::Normal | ) |
Definition at line 58 of file cswordkey.cpp.
References BT_ASSERT, key(), CSwordModuleInfo::Lexicon, m_module, ProcessEntryAttributesOnly, rawKey(), CSwordModuleInfo::snap(), CSwordModuleInfo::swordModule(), and CSwordModuleInfo::type().
Referenced by Rendering::CTextRendering::renderEntry().
|
pure virtual |
Set the key using a utf8-decoded c-string.
[in] | key | The key which should be used to set the current one. |
Implemented in CSwordVerseKey, CSwordTreeKey, and CSwordLDKey.
|
pure virtual |
Sets the current key using a utf8 enabled QString.
[in] | key | The key which should be used to set the current one. |
Implemented in CSwordLDKey, CSwordVerseKey, and CSwordTreeKey.
Referenced by BtModelViewReadDisplay::BtModelViewReadDisplay(), Rendering::CTextRendering::renderEntry(), and CDisplayWindow::setupMainWindowToolBars().
|
inlinevirtual |
Sets the module which belongs to this key.
[in] | newModule | the module to set. |
Reimplemented in CSwordVerseKey, CSwordTreeKey, and CSwordLDKey.
Definition at line 74 of file cswordkey.h.
References m_module.
Referenced by Rendering::CTextRendering::renderEntry().
QString CSwordKey::strippedText | ( | ) |
Definition at line 118 of file cswordkey.cpp.
References m_module, rawKey(), and CSwordModuleInfo::swordModule().
Referenced by BtModelViewReadDisplay::text().
|
protected |
Definition at line 112 of file cswordkey.h.
Referenced by CSwordTreeKey::getLocalNameUnicode(), CSwordLDKey::key(), CSwordTreeKey::key(), module(), CSwordVerseKey::next(), CSwordLDKey::NextEntry(), CSwordVerseKey::previous(), CSwordLDKey::PreviousEntry(), rawText(), renderedText(), CSwordTreeKey::setKey(), CSwordLDKey::setKey(), CSwordLDKey::setModule(), setModule(), CSwordTreeKey::setModule(), CSwordVerseKey::setModule(), and strippedText().
|
protected |
Definition at line 113 of file cswordkey.h.
Referenced by isValid(), CSwordVerseKey::setKey(), and CSwordVerseKey::setModule().