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_prefsDatabase_base.h"
26 #include "ui_prefsPresentations_base.h"
27 #include "KwLocalDisplayController.h"
30 #include <kxmlguiwindow.h>
32 #include <QModelIndex>
36 class KwLocalDisplayPreview
;
37 class KwDisplayManager
;
39 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 KWMAIN_EXPORT kworship
: public KXmlGuiWindow
84 /// Load a specified playlist.
85 void loadPlaylist(const KUrl
& url
);
91 /// Get the main display manager.
92 KwDisplayManager
* displayManager();
94 /// Get the current document.
95 KwDocument
* document();
97 /// Get the playlist model.
98 KwPlaylistModel
* playlistModel();
101 void settingsChanged();
102 void toggleMainDisplay(bool checked
);
103 void mainDisplayClosed();
110 void toggleFullscreen(bool checked
);
111 void optionsPreferences();
112 void playlist_clicked(QModelIndex
);
113 void playlist_doubleClicked(QModelIndex
);
114 void playlistReset();
115 void playlistInsert();
116 void playlistDelete();
117 void playlistMoveUp();
118 void playlistMoveDown();
120 /// Add the new docker to the interface.
121 void newDocker(QDockWidget
* docker
);
123 void presentationDelete();
124 void presentationSelected(int);
125 void presentationToggled(bool);
126 void presentationPreviousSlide();
127 void presentationNextSlide();
128 void presentationPreviousStep();
129 void presentationNextStep();
130 void slide_doubleClicked(QModelIndex
);
133 void presentationComboReset();
134 void changeSlideshowCombo(QString name
);
135 void changeSlideshowExternal(QString name
);
136 void refreshSlideshows();
137 void refreshSlides();
138 void addSlideshowLinkToPlaylist();
139 void addSlideshowCopyToPlaylist();
141 // From current presentation
142 void slideshowStarted(int numSlides
);
143 void slideshowStopped();
144 void slideshowSlideChanged(int slide
, int numSteps
);
145 void slideshowStepChanged(int step
);
149 int getCorrectDisplayScreen();
150 int getCurrentDisplayScreen();
153 void clearDocument();
155 void setPresentation(UpPresentation
* presentation
, bool alreadyDestroyed
= false);
158 Ui::prefs_base ui_prefs_base
;
159 Ui::prefsPresentations_base ui_prefsPresentations_base
;
160 kworshipView
*m_view
;
162 KwMediaManager
* m_mediaManager
;
163 KwDisplayManager
* m_displayManager
;
164 KwLocalDisplayController m_displayController
;
165 KwLocalDisplay
* m_mainDisplay
;
166 KwLocalDisplayPreview
* m_previewDisplay
;
168 KwDocument
* m_document
;
169 KwPlaylistModel
* m_playlistModel
;
170 KAction
* m_playlistInsertAction
;
171 KAction
* m_playlistDeleteAction
;
172 KAction
* m_playlistMoveUpAction
;
173 KAction
* m_playlistMoveDownAction
;
175 UpManager
* m_presentationManager
;
176 QTreeView
* m_selectPresTree
;
177 QTextEdit
* m_slideNotes
;
178 KAction
* m_slideshowPrevSlideAction
;
179 KAction
* m_slideshowPrevStepAction
;
180 KAction
* m_slideshowNextStepAction
;
181 KAction
* m_slideshowNextSlideAction
;
182 KToggleAction
* m_slideshowAction
;
183 UpPresentation
* m_currentPresentation
;
186 KToggleAction
* m_mainDisplayAction
;
187 KToggleAction
*m_toolbarAction
;
188 KToggleAction
*m_statusbarAction
;
191 #endif // _kworship_h_