Got OpenOffice.org unipresent backend to compile, but it can't yet connect to OO...
[kworship.git] / kworship / KwBiblePlugin.h
blob068fe63aceeab262dad40ecf89de8252a79d4385
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
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. *
9 * *
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. *
14 * *
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_
23 /**
24 * @file KwBiblePlugin.h
25 * @brief Bibles plugin.
26 * @author James Hogan <james@albanarts.com>
29 #include "KwPlugin.h"
31 #include <KwBibleModule.h>
33 class KwBibleManager;
35 class KAction;
37 class QDockWidget;
38 class QTabWidget;
39 class QComboBox;
40 class QLineEdit;
41 class QTextEdit;
42 class QToolBar;
44 /// Bibles plugin.
45 class KwBiblePlugin : public KwPlugin
47 Q_OBJECT
49 public:
52 * Constructors + destructor
55 /// Default constructor.
56 KwBiblePlugin();
58 /// Destructor.
59 virtual ~KwBiblePlugin();
62 * Accessors
65 /// Get the current bible passage information.
66 bool resolvePassage(KwBibleManager** manager, KwBibleModule** module, KwBibleModule::Key* key, bool* usedSearch = 0) const;
68 private slots:
71 * Private slots
74 /// Fired when the connect to bible button is pressed.
75 void slotConnect();
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.
90 void slotShowNow();
92 protected:
95 * Loading and unloading virtual interface
98 // Reimplemented
99 virtual void _load();
101 // Reimplemented
102 virtual void _unload();
104 private:
107 * Types
110 struct BibleManager
112 KwBibleManager* manager;
113 QComboBox* comboBibles;
114 QToolBar* toolBar;
118 * Private functions
121 /// Fill up the bibles list for a manager.
122 void fillBiblesList(BibleManager* mgr);
125 * Variables
128 /// The list of bible managers.
129 QList<BibleManager> m_managers;
132 * Actions
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;
142 * Widgets
145 /// Bible docker.
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;
157 /// Verse range box.
158 QLineEdit* m_editRange;
160 /// Main bible text display.
161 QTextEdit* m_textPassage;
164 #endif // _KwBiblePlugin_h_