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
;
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>
65 class kworship
: public KXmlGuiWindow
83 /// Load a specified playlist.
84 void loadPlaylist(const KUrl
& url
);
90 /// Get the main display manager.
91 KwDisplayManager
* displayManager();
93 /// Get the current document.
94 KwDocument
* document();
96 /// Get the playlist model.
97 KwPlaylistModel
* playlistModel();
100 void settingsChanged();
101 void toggleMainDisplay(bool checked
);
102 void mainDisplayClosed();
109 void toggleFullscreen(bool checked
);
110 void optionsPreferences();
111 void playlist_doubleClicked(QModelIndex
);
112 void playlistReset();
114 /// Add the new docker to the interface.
115 void newDocker(QDockWidget
* docker
);
117 void presentationDelete();
118 void presentationSelected(int);
119 void presentationToggled(bool);
120 void presentationPreviousSlide();
121 void presentationNextSlide();
122 void presentationPreviousStep();
123 void presentationNextStep();
124 void slide_doubleClicked(QModelIndex
);
127 void presentationComboReset();
128 void changeSlideshowCombo(QString name
);
129 void changeSlideshowExternal(QString name
);
130 void refreshSlideshows();
131 void refreshSlides();
132 void addSlideshowLinkToPlaylist();
133 void addSlideshowCopyToPlaylist();
135 // From current presentation
136 void slideshowStarted(int numSlides
);
137 void slideshowStopped();
138 void slideshowSlideChanged(int slide
, int numSteps
);
139 void slideshowStepChanged(int step
);
146 void songdbEditSongBooks();
150 int getCorrectDisplayScreen();
151 int getCurrentDisplayScreen();
154 void setDocument(KUrl url
= KUrl());
156 void setPresentation(UpPresentation
* presentation
, bool alreadyDestroyed
= false);
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 UpManager
* m_presentationManager
;
182 QTreeView
* m_selectPresTree
;
183 QTextEdit
* m_slideNotes
;
184 KAction
* m_slideshowPrevSlideAction
;
185 KAction
* m_slideshowPrevStepAction
;
186 KAction
* m_slideshowNextStepAction
;
187 KAction
* m_slideshowNextSlideAction
;
188 KToggleAction
* m_slideshowAction
;
189 UpPresentation
* m_currentPresentation
;
192 KToggleAction
* m_mainDisplayAction
;
193 KToggleAction
*m_toolbarAction
;
194 KToggleAction
*m_statusbarAction
;
197 #endif // _kworship_h_