BibleTime
Public Member Functions | Private Attributes | List of all members
CSwordBookModuleInfo Class Referencefinal

Class for generic book support. More...

#include <cswordbookmoduleinfo.h>

Inheritance diagram for CSwordBookModuleInfo:

Public Member Functions

CSwordKeycreateKey () const final override
 
 CSwordBookModuleInfo (sword::SWModule &module, CSwordBackend &usedBackend)
 
int depth () const noexcept
 
sword::TreeKeyIdx * tree () const
 
- 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
 
CSwordModuleInfooperator= (CSwordModuleInfo &&)=delete
 
CSwordModuleInfooperator= (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 Attributes

int const m_depth
 

Additional Inherited Members

- Public Types inherited from CSwordModuleInfo
enum  Category {
  UnknownCategory = 0x0 , NoCategory = 0x0 , Bibles = 0x01 , Commentaries = 0x02 ,
  Books = 0x04 , Lexicons = 0x08 , Glossary = 0x10 , DailyDevotional = 0x20 ,
  Images = 0x40 , Cult = 0x80 , AllCategories = 0xff
}
 
enum  ConfigEntry {
  AboutInformation , AbsoluteDataPath , CipherKey , DataPath ,
  Description , ModuleVersion , MinimumSwordVersion , TextDir ,
  DisplayLevel , GlossaryFrom , GlossaryTo , DistributionLicense ,
  DistributionSource , DistributionNotes , TextSource , CopyrightNotes ,
  CopyrightHolder , CopyrightDate , CopyrightContactName , CopyrightContactAddress ,
  CopyrightContactEmail , Markup
}
 
enum  Feature {
  FeatureStrongsNumbers = 1 , FeatureGreekDef = 1 << 1 , FeatureHebrewDef = 1 << 2 , FeatureGreekParse = 1 << 3 ,
  FeatureHebrewParse = 1 << 4 , FeatureDailyDevotion = 1 << 5 , FeatureGlossary = 1 << 6 , FeatureImages = 1 << 7 ,
  FeatureNoParagraphs = 1 << 8
}
 
enum  ModuleType {
  Unknown , Bible , Commentary , Lexicon ,
  GenericBook
}
 
enum  TextDirection { LeftToRight , RightToLeft }
 
enum  UnlockErrorCode { noError , wrongUnlockKey , notLocked , noPermission }
 
- Public Slots inherited from CSwordModuleInfo
void cancelIndexing (std::memory_order const memoryOrder=std::memory_order_relaxed) noexcept
 
- Signals inherited from CSwordModuleInfo
void hasIndexChanged (bool hasIndex)
 
void hiddenChanged (bool hidden)
 
void indexingFinished ()
 
void indexingProgress (int)
 
void unlockedChanged (bool unlocked)
 
- Static Public Member Functions inherited from CSwordModuleInfo
static QIcon const & categoryIcon (CSwordModuleInfo::Category category)
 
static QString categoryName (const CSwordModuleInfo::Category &category)
 
static void deleteIndexForModule (const QString &name)
 
static QString getGlobalBaseIndexLocation ()
 
static QIcon const & moduleIcon (CSwordModuleInfo const &module)
 
- Static Public Attributes inherited from CSwordModuleInfo
static FilterOption const footnotes
 
static FilterOption const greekAccents
 
static FilterOption const headings
 
static FilterOption const hebrewCantillation
 
static FilterOption const hebrewPoints
 
static FilterOption const lemmas
 
static FilterOption const morphSegmentation
 
static FilterOption const morphTags
 
static FilterOption const redLetterWords
 
static FilterOption const scriptureReferences
 
static FilterOption const strongNumbers
 
static FilterOption const textualVariants
 
- Protected Member Functions inherited from CSwordModuleInfo
CSwordBackendbackend () const
 
 CSwordModuleInfo (sword::SWModule &module, CSwordBackend &backend, ModuleType type)
 
QString getFormattedConfigEntry (const QString &name) const
 
QString getSimpleConfigEntry (const QString &name) const
 
bool hasImportantFilterOption () const
 
void setImportantFilterOptions (bool enable)
 

Detailed Description

Class for generic book support.

Definition at line 28 of file cswordbookmoduleinfo.h.

Constructor & Destructor Documentation

◆ CSwordBookModuleInfo()

CSwordBookModuleInfo::CSwordBookModuleInfo ( sword::SWModule &  module,
CSwordBackend usedBackend 
)
Parameters
moduleThe module which belongs to this object.
backendThe parent backend for this book module.

Definition at line 37 of file cswordbookmoduleinfo.cpp.

References depth(), and tree().

Member Function Documentation

◆ createKey()

CSwordKey * CSwordBookModuleInfo::createKey ( ) const
finaloverridevirtual

Implements CSwordModuleInfo.

Definition at line 70 of file cswordbookmoduleinfo.cpp.

References tree().

◆ depth()

int CSwordBookModuleInfo::depth ( ) const
inlinenoexcept
Returns
the maximal depth of sections and subsections.

Definition at line 41 of file cswordbookmoduleinfo.h.

References m_depth.

Referenced by CSwordBookModuleInfo().

◆ tree()

sword::TreeKeyIdx * CSwordBookModuleInfo::tree ( ) const
Returns
A treekey filled with the structure of this module. Don't delete the returned key because it's casted from the module object.

Definition at line 64 of file cswordbookmoduleinfo.cpp.

References BT_ASSERT, and CSwordModuleInfo::swordModule().

Referenced by BtModuleTextModel::bookData(), createKey(), CSwordBookModuleInfo(), and BtModuleTextModel::indexToBookKey().

Member Data Documentation

◆ m_depth

int const CSwordBookModuleInfo::m_depth
private

Definition at line 53 of file cswordbookmoduleinfo.h.

Referenced by depth().


The documentation for this class was generated from the following files: