1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
5 * KWorship is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
10 * KWorship is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with KWorship. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _KwBibleModuleBibleGateway_h_
21 #define _KwBibleModuleBibleGateway_h_
24 * @file KwBibleModuleBibleGateway.h
25 * @brief A BibleGateway bible module.
26 * @author James Hogan <james@albanarts.com>
29 #include "KwBibleModule.h"
35 /// A BibleGateway bible module.
36 class KwBibleModuleBibleGateway
: public KwBibleModule
41 * Constructors + destructor
44 /// Default constructor.
45 KwBibleModuleBibleGateway(int id
);
48 virtual ~KwBibleModuleBibleGateway();
55 virtual QString
name();
58 virtual QString
description();
61 virtual QString
managerId();
64 virtual int numChapters(int book
);
67 virtual int numVerses(int book
, int chapter
);
70 virtual bool fillPassageVerse(int bookIndex
, int chapterIndex
, int verseIndex
, KwBiblePassage
* outPassage
);
75 * Protected virtual interface
79 virtual void obtainBooks();
89 /// Ensure chapter contents are fetched and return the chapter object.
90 struct Chapter
* fetchChapter(int book
, int chapter
);
96 /// The name of the publisher.
99 /// The long version information.
100 QString m_versionInfo
;
102 /// The long copyright information.
103 QString m_copyrightInfo
;
108 /// Headings preceeding verse.
111 /// Content of verse.
118 /// BibleGateway.com URL for this chapter.
121 /// Whether the verses have been fetched.
124 /// List of verse contents.
131 /// Name of the book.
134 /// List of chapter information.
135 QList
<Chapter
> chapters
;
139 QList
<Book
> m_bookList
;
142 #endif // _KwBibleModuleBibleGateway_h_