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>
30 #include <kdemacros.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 KDE_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_doubleClicked(QModelIndex
);
113 void playlistReset();
115 /// Add the new docker to the interface.
116 void newDocker(QDockWidget
* docker
);
118 void presentationDelete();
119 void presentationSelected(int);
120 void presentationToggled(bool);
121 void presentationPreviousSlide();
122 void presentationNextSlide();
123 void presentationPreviousStep();
124 void presentationNextStep();
125 void slide_doubleClicked(QModelIndex
);
128 void presentationComboReset();
129 void changeSlideshowCombo(QString name
);
130 void changeSlideshowExternal(QString name
);
131 void refreshSlideshows();
132 void refreshSlides();
133 void addSlideshowLinkToPlaylist();
134 void addSlideshowCopyToPlaylist();
136 // From current presentation
137 void slideshowStarted(int numSlides
);
138 void slideshowStopped();
139 void slideshowSlideChanged(int slide
, int numSteps
);
140 void slideshowStepChanged(int step
);
144 int getCorrectDisplayScreen();
145 int getCurrentDisplayScreen();
148 void clearDocument();
150 void setPresentation(UpPresentation
* presentation
, bool alreadyDestroyed
= false);
153 Ui::prefs_base ui_prefs_base
;
154 Ui::prefsPresentations_base ui_prefsPresentations_base
;
155 kworshipView
*m_view
;
157 KwMediaManager
* m_mediaManager
;
158 KwDisplayManager
* m_displayManager
;
159 KwLocalDisplayController m_displayController
;
160 KwLocalDisplay
* m_mainDisplay
;
161 KwLocalDisplayPreview
* m_previewDisplay
;
163 KwDocument
* m_document
;
164 KwPlaylistModel
* m_playlistModel
;
166 UpManager
* m_presentationManager
;
167 QTreeView
* m_selectPresTree
;
168 QTextEdit
* m_slideNotes
;
169 KAction
* m_slideshowPrevSlideAction
;
170 KAction
* m_slideshowPrevStepAction
;
171 KAction
* m_slideshowNextStepAction
;
172 KAction
* m_slideshowNextSlideAction
;
173 KToggleAction
* m_slideshowAction
;
174 UpPresentation
* m_currentPresentation
;
177 KToggleAction
* m_mainDisplayAction
;
178 KToggleAction
*m_toolbarAction
;
179 KToggleAction
*m_statusbarAction
;
182 #endif // _kworship_h_