Basic openoffice.org control, and listening for new presentation documents, still...
[kworship.git] / kworship / KwApplication.h
blob74dac83bb452758b0f6766430dcb02515023b33f
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
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. *
9 * *
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. *
14 * *
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_
23 /**
24 * @file KwApplication.h
25 * @brief Application global data.
26 * @author James Hogan <james@albanarts.com>
29 #include "KwExport.h"
31 #include <KApplication>
33 #include <QSqlDatabase>
35 class KwPluginManager;
36 class KwFilterManager;
37 class kworship;
39 /// Application global data.
40 class KWMAIN_EXPORT KwApplication
42 public:
45 * Singletonhood
48 /// Get the singleton application object.
49 static KwApplication* self();
52 * Constructors + destructor
55 /// Primary constructor.
56 KwApplication();
58 /// Destructor.
59 virtual ~KwApplication();
62 * Main interface
65 /// Execute the application.
66 int exec();
69 * Accessors
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();
84 private:
87 * Static singleton data
90 /// Singleton application.
91 static KwApplication* s_self;
94 * Variables
97 /// KApplication object.
98 KApplication m_app;
100 /// Main window widget.
101 kworship* m_mainWindow;
103 /// Plugin manager.
104 KwPluginManager* m_pluginManager;
106 /// Filter manager.
107 KwFilterManager* m_filterManager;
109 /// Database object.
110 QSqlDatabase m_database;
113 #endif // _KwApplication_h_