Basic sword integration, verse at time keys, very basic\!
[kworship.git] / kworship / kworship.h
blobc28a1527f669a8ade9793522da20cc11a3238a35
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 _kworship_h_
21 #define _kworship_h_
23 #include "ui_prefs_base.h"
24 #include "ui_prefsDisplay_base.h"
25 #include "ui_prefsSongDB_base.h"
26 #include "ui_prefsPresentations_base.h"
27 #include "KwLocalDisplayController.h"
29 #include <kxmlguiwindow.h>
31 #include <QModelIndex>
33 class kworshipView;
34 class KwLocalDisplay;
35 class KwLocalDisplayPreview;
36 class KwDisplayManager;
37 class KwPlaylistList;
38 class KwPlaylistModel;
39 class KwMediaManager;
40 class KwSongdbModel;
41 class KwSongdbTree;
42 class KwDocument;
44 class UpManager;
45 class UpPresentation;
47 class KPrinter;
48 class KToggleAction;
49 class KUrl;
50 class KAction;
51 class KActionMenu;
52 class KToggleAction;
54 class QTreeView;
55 class QTextEdit;
57 /**
58 * This class serves as the main window for kworship. It handles the
59 * menus, toolbars, and status bars.
61 * @short Main window class
62 * @author Andreas Pakulat <apaku@gmx.de>
63 * @version 0.1
65 class kworship : public KXmlGuiWindow
67 Q_OBJECT
68 public:
69 /**
70 * Default Constructor
72 kworship();
74 /**
75 * Default Destructor
77 virtual ~kworship();
80 * Public interface
83 /// Load a specified playlist.
84 void loadPlaylist(const KUrl& url);
86 private slots:
87 void settingsChanged();
88 void toggleMainDisplay(bool checked);
89 void mainDisplayClosed();
90 void displayClear();
91 bool askToSave();
92 void fileNew();
93 void fileOpen();
94 void fileSave();
95 void fileSaveAs();
96 void toggleFullscreen(bool checked);
97 void optionsPreferences();
98 void playlist_doubleClicked(QModelIndex);
99 void playlistReset();
100 void presentationDelete();
101 void presentationSelected(int);
102 void presentationToggled(bool);
103 void presentationPreviousSlide();
104 void presentationNextSlide();
105 void presentationPreviousStep();
106 void presentationNextStep();
107 void slide_doubleClicked(QModelIndex);
109 // Custom slideshows
110 void presentationComboReset();
111 void changeSlideshowCombo(QString name);
112 void changeSlideshowExternal(QString name);
113 void refreshSlideshows();
114 void refreshSlides();
115 void addSlideshowLinkToPlaylist();
116 void addSlideshowCopyToPlaylist();
118 // From current presentation
119 void slideshowStarted(int numSlides);
120 void slideshowStopped();
121 void slideshowSlideChanged(int slide, int numSteps);
122 void slideshowStepChanged(int step);
124 // Song DB
125 void songdbUnlock();
126 void songdbLock();
127 void songdbAdd();
128 void songdbEdit();
129 void songdbEditSongBooks();
131 // Bibles
132 void bibleSearch();
134 private:
135 void setupActions();
136 int getCorrectDisplayScreen();
137 int getCurrentDisplayScreen();
139 // Documents
140 void setDocument(KUrl url = KUrl());
141 // Presentations
142 void setPresentation(UpPresentation* presentation, bool alreadyDestroyed = false);
144 private:
145 Ui::prefs_base ui_prefs_base ;
146 Ui::prefsPresentations_base ui_prefsPresentations_base ;
147 kworshipView *m_view;
149 KwMediaManager* m_mediaManager;
150 KwDisplayManager* m_displayManager;
151 KwLocalDisplayController m_displayController;
152 KwLocalDisplay* m_mainDisplay;
153 KwLocalDisplayPreview* m_previewDisplay;
155 KwDocument* m_document;
156 KwPlaylistModel* m_playlistModel;
158 KwSongdbModel* m_songDbModel;
159 KwSongdbTree* m_songDbTree;
160 KAction* m_unlockSongDbAction;
161 KAction* m_lockSongDbAction;
162 KActionMenu* m_groupSongsByAction;
163 KAction* m_addSongAction;
164 KAction* m_editSongAction;
165 KAction* m_editSongBooksAction;
167 UpManager* m_presentationManager;
168 QTreeView* m_selectPresTree;
169 QTextEdit* m_slideNotes;
170 KAction* m_slideshowPrevSlideAction;
171 KAction* m_slideshowPrevStepAction;
172 KAction* m_slideshowNextStepAction;
173 KAction* m_slideshowNextSlideAction;
174 KToggleAction* m_slideshowAction;
175 UpPresentation* m_currentPresentation;
177 KPrinter *m_printer;
178 KToggleAction* m_mainDisplayAction;
179 KToggleAction *m_toolbarAction;
180 KToggleAction *m_statusbarAction;
183 #endif // _kworship_h_