3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2006 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
12
#ifndef CSWORDBIBLEMODULEINFO_H
13
#define CSWORDBIBLEMODULEINFO_H
16
#include "cswordmoduleinfo.h"
17
#include "cswordversekey.h"
20
#include <qstringlist.h>
26
* This is the CModuleInfo imlementation for Bible modules managed by Sword.
28
* @short Implementation for Sword Bibles
29
* @author The BibleTime team
30
* @version $Id: cswordbiblemoduleinfo.h,v 1.18 2006/02/25 11:38:15 joachim Exp $
33
class CSwordBibleModuleInfo : public CSwordModuleInfo {
42
* The constructor of this class
44
CSwordBibleModuleInfo( sword::SWModule* module, CSwordBackend* const = CPointers::backend() );
45
/** The copy constructor for this Bible module.
47
CSwordBibleModuleInfo( const CSwordBibleModuleInfo& m );
49
* The destructor of this class
51
~CSwordBibleModuleInfo();
53
* Returns the number of avalable verses for the given chapter and book.
55
* @param book The number book we should use
56
* @param chapter The chapter we should use
57
* @return The number of verses for the given book and chapter
59
virtual const unsigned int verseCount( const unsigned int book, const unsigned int chapter );
61
* Returns the number of avalable verses for the given chapter and book.
63
* @param book The name of the book we use
64
* @param chapter The number of the chapter we use
65
* @return The number of verses for the given book and chapter
67
virtual const unsigned int verseCount( const QString& book, const unsigned int chapter );
68
/** Information about the chapters in a book.
69
* @return The number of available chapters of the given book.
70
* @return The number of chapters for the given book
72
virtual const unsigned int chapterCount( const unsigned int book );
73
/** Information about the chapters in a book.
74
* @return The number of available chapters of the given book.
76
virtual const unsigned int chapterCount( const QString& book );
77
/** Return all book of this module.
78
* @return A QStringList containing the books which are available in this module.
80
virtual QStringList* const books();
82
* Reimplementation, Returns the type
84
virtual const CSwordModuleInfo::ModuleType type() const;
86
* @return the book number, values starting with 1; 0 if not found
88
const unsigned int bookNumber(const QString &book);
90
* Returns true if his module has the text of desired type of testament
92
const bool hasTestament( CSwordBibleModuleInfo::Testament );
93
/** Reimplementation to clone this object. */
94
virtual CSwordModuleInfo* clone();
96
* Returns the key which represents the lower bound of this module.
98
inline const CSwordVerseKey& lowerBound();
100
* Returns the key which represents the upper bound of this module.
102
inline const CSwordVerseKey& upperBound();
107
CSwordVerseKey m_lowerBound;
108
CSwordVerseKey m_upperBound;
110
QStringList* m_bookList; //This booklist is cached
111
QString m_cachedLocale;
116
inline const CSwordModuleInfo::ModuleType CSwordBibleModuleInfo::type() const {
117
return CSwordModuleInfo::Bible;
120
/** Returns the key which represents the lower bound of this module. */
121
inline const CSwordVerseKey& CSwordBibleModuleInfo::lowerBound() {
126
/** Returns the key which represents the lower bound of this module. */
127
inline const CSwordVerseKey& CSwordBibleModuleInfo::upperBound() {