1 /***************************************************************************
2 * Copyright 2007 Alexander Dymo <adymo@kdevelop.org> *
3 * Copyright 2007 Kris Wong <kris.p.wong@gmail.com> *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
10 * This program 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 Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
23 #include "shellexport.h"
24 #include <interfaces/icore.h>
29 class PluginController
;
30 class ProjectController
;
31 class LanguageController
;
33 class DocumentController
;
35 class SessionController
;
37 class KDEVPLATFORMSHELL_EXPORT Core
: public ICore
{
39 enum Setup
{ Default
=0, NoUi
=1 };
41 static void initialize(Setup mode
=Default
);
46 /** @copydoc ICore::uiController() */
47 virtual IUiController
*uiController();
49 /** @copydoc ICore::pluginController() */
50 virtual IPluginController
*pluginController();
52 /** @copydoc ICore::projectController() */
53 virtual IProjectController
*projectController();
55 /** @copydoc ICore::languageController() */
56 virtual ILanguageController
*languageController();
58 /** @copydoc ICore::partManager() */
59 virtual KParts::PartManager
*partManager();
61 /** @copydoc ICore::documentController() */
62 virtual IDocumentController
*documentController();
64 /** @copydoc ICore::runController() */
65 virtual IRunController
*runController();
67 /** @copydoc ICore::activeSession() */
68 virtual ISession
*activeSession();
70 virtual KComponentData
componentData() const;
72 /// The following methods may only be used within the shell.
74 /** @return ui controller */
75 UiController
*uiControllerInternal();
77 /** @return plugin controller */
78 PluginController
*pluginControllerInternal();
80 /** @return project controller */
81 ProjectController
*projectControllerInternal();
83 /** @return language controller */
84 LanguageController
*languageControllerInternal();
86 /** @return part manager */
87 PartController
*partManagerInternal();
89 /** @return document controller */
90 DocumentController
*documentControllerInternal();
92 /** @return run controller */
93 RunController
*runControllerInternal();
96 * @return session controller
99 SessionController
*sessionController();
103 Core::Setup
setupFlags() const;
106 Core(QObject
*parent
= 0);
108 struct CorePrivate
*d
;