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 _KwBiblePlugin_h_
21 #define _KwBiblePlugin_h_
24 * @file KwBiblePlugin.h
25 * @brief Bibles plugin.
26 * @author James Hogan <james@albanarts.com>
31 #include "KwBibleModule.h"
45 class KwBiblePlugin
: public KwPlugin
52 * Constructors + destructor
55 /// Default constructor.
56 KwBiblePlugin(QObject
* parent
= 0, const QStringList
& params
= QStringList());
59 virtual ~KwBiblePlugin();
65 /// Get the current bible passage information.
66 bool resolvePassage(KwBibleManager
** manager
, KwBibleModule
** module
, KwBibleModule::Key
* key
, bool* usedSearch
= 0) const;
74 /// Fired when the connect to bible button is pressed.
77 /// Fired when the bible is changed.
78 void slotBibleChanged();
80 /// Fired when the bible book is changed.
81 void slotBookChanged();
83 /// Fired when the bible text needs to be retrieved.
84 void slotVerseRange();
86 /// Fired by the insert into playlist action.
87 void slotInsertIntoPlaylist();
89 /// Fired by the show now action.
95 * Loading and unloading virtual interface
102 virtual void _unload();
112 KwBibleManager
* manager
;
113 QComboBox
* comboBibles
;
121 /// Fill up the bibles list for a manager.
122 void fillBiblesList(BibleManager
* mgr
);
128 /// The list of bible managers.
129 QList
<BibleManager
> m_managers
;
135 /// Action for inserting the current passage into the playlist.
136 KAction
* m_insertIntoPlaylistAction
;
138 /// Action for showing the current passage on the screen.
139 KAction
* m_showNowAction
;
146 QDockWidget
* m_docker
;
148 /// Tabs for each bible manager.
149 QTabWidget
* m_managerTabs
;
151 /// Book of bible selector.
152 QComboBox
* m_comboBook
;
154 /// Chapter of bible book selector.
155 QComboBox
* m_comboChapter
;
158 QLineEdit
* m_editRange
;
160 /// Main bible text display.
161 QTextEdit
* m_textPassage
;
164 #endif // _KwBiblePlugin_h_