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 ***************************************************************************/
20 #ifndef _KwApplication_h_
21 #define _KwApplication_h_
24 * @file KwApplication.h
25 * @brief Application global data.
26 * @author James Hogan <james@albanarts.com>
31 #include <KApplication>
33 #include <QSqlDatabase>
35 class KwPluginManager
;
36 class KwFilterManager
;
39 /// Application global data.
40 class KWMAIN_EXPORT KwApplication
48 /// Get the singleton application object.
49 static KwApplication
* self();
52 * Constructors + destructor
55 /// Primary constructor.
59 virtual ~KwApplication();
65 /// Execute the application.
72 /// Get the main window widget.
73 kworship
* mainWindow();
75 /// Get the plugin manager.
76 KwPluginManager
* pluginManager();
78 /// Get the filter manager.
79 KwFilterManager
* filterManager();
81 /// Get the database object.
82 QSqlDatabase
& database();
87 * Static singleton data
90 /// Singleton application.
91 static KwApplication
* s_self
;
97 /// KApplication object.
100 /// Main window widget.
101 kworship
* m_mainWindow
;
104 KwPluginManager
* m_pluginManager
;
107 KwFilterManager
* m_filterManager
;
110 QSqlDatabase m_database
;
113 #endif // _KwApplication_h_