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 ***************************************************************************/
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>
35 class KwLocalDisplayPreview
;
36 class KwDisplayManager
;
38 class KwPlaylistModel
;
59 * This class serves as the main window for kworship. It handles the
60 * menus, toolbars, and status bars.
62 * @short Main window class
63 * @author Andreas Pakulat <apaku@gmx.de>
66 class kworship
: public KXmlGuiWindow
84 /// Load a specified playlist.
85 void loadPlaylist(const KUrl
& url
);
88 void settingsChanged();
89 void toggleMainDisplay(bool checked
);
90 void mainDisplayClosed();
97 void toggleFullscreen(bool checked
);
98 void optionsPreferences();
99 void playlist_doubleClicked(QModelIndex
);
100 void playlistReset();
101 void presentationDelete();
102 void presentationSelected(int);
103 void presentationToggled(bool);
104 void presentationPreviousSlide();
105 void presentationNextSlide();
106 void presentationPreviousStep();
107 void presentationNextStep();
108 void slide_doubleClicked(QModelIndex
);
111 void presentationComboReset();
112 void changeSlideshowCombo(QString name
);
113 void changeSlideshowExternal(QString name
);
114 void refreshSlideshows();
115 void refreshSlides();
116 void addSlideshowLinkToPlaylist();
117 void addSlideshowCopyToPlaylist();
119 // From current presentation
120 void slideshowStarted(int numSlides
);
121 void slideshowStopped();
122 void slideshowSlideChanged(int slide
, int numSteps
);
123 void slideshowStepChanged(int step
);
130 void songdbEditSongBooks();
135 void bibleBookChanged();
136 void bibleChapterChanged();
141 int getCorrectDisplayScreen();
142 int getCurrentDisplayScreen();
145 void setDocument(KUrl url
= KUrl());
147 void setPresentation(UpPresentation
* presentation
, bool alreadyDestroyed
= false);
152 KwBibleManager
* manager
;
153 QComboBox
* comboBibles
;
156 void fillBiblesList(BibleManager
* mgr
);
159 Ui::prefs_base ui_prefs_base
;
160 Ui::prefsPresentations_base ui_prefsPresentations_base
;
161 kworshipView
*m_view
;
163 KwMediaManager
* m_mediaManager
;
164 KwDisplayManager
* m_displayManager
;
165 KwLocalDisplayController m_displayController
;
166 KwLocalDisplay
* m_mainDisplay
;
167 KwLocalDisplayPreview
* m_previewDisplay
;
169 KwDocument
* m_document
;
170 KwPlaylistModel
* m_playlistModel
;
172 KwSongdbModel
* m_songDbModel
;
173 KwSongdbTree
* m_songDbTree
;
174 KAction
* m_unlockSongDbAction
;
175 KAction
* m_lockSongDbAction
;
176 KActionMenu
* m_groupSongsByAction
;
177 KAction
* m_addSongAction
;
178 KAction
* m_editSongAction
;
179 KAction
* m_editSongBooksAction
;
181 QTabWidget
* m_bibleTabs
;
182 QList
<BibleManager
> m_bibles
;
184 UpManager
* m_presentationManager
;
185 QTreeView
* m_selectPresTree
;
186 QTextEdit
* m_slideNotes
;
187 KAction
* m_slideshowPrevSlideAction
;
188 KAction
* m_slideshowPrevStepAction
;
189 KAction
* m_slideshowNextStepAction
;
190 KAction
* m_slideshowNextSlideAction
;
191 KToggleAction
* m_slideshowAction
;
192 UpPresentation
* m_currentPresentation
;
195 KToggleAction
* m_mainDisplayAction
;
196 KToggleAction
*m_toolbarAction
;
197 KToggleAction
*m_statusbarAction
;
200 #endif // _kworship_h_