Fix no newlines warnings. Patch by Peter Oberndorfer
[kdevelopdvcssupport.git] / shell / shellextension.h
blob75911ead0fc1dc736a066bfca51b2eace19e42c0
1 /***************************************************************************
2 * Copyright 2004 Alexander Dymo <adymo@kdevelop.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
19 #ifndef SHELLEXTENSION_H
20 #define SHELLEXTENSION_H
22 #include <QtCore/QString>
23 #include "shellexport.h"
25 namespace KDevelop
28 /**Default area parameters collection.*/
29 struct AreaParams {
30 /**Unique name for the area.*/
31 QString name;
32 /**User-visible area title.*/
33 QString title;
36 /**
37 Shell extension.
38 Provides application-dependent and shell-independent functionality.
39 Shell uses extensions to perform application dependent actions.
41 class KDEVPLATFORMSHELL_EXPORT ShellExtension {
42 public:
43 virtual ~ShellExtension() {}
45 /**Returns an instance of a shell. Subclasses must create an instance of a shell
46 by themselves. For example they could provide static init() method like:
47 @code
48 static void init()
50 s_instance = new MyExtension();
52 @endcode*/
53 static ShellExtension *getInstance();
55 /**Reimplement to return the name of KXMLGUI resource file for an application.*/
56 virtual QString xmlFile() = 0;
58 /**Reimplement to set a default profile for the shell. Default profile
59 will be used by a shell if no --profile argument is specified.*/
60 virtual QString defaultProfile() = 0;
62 /**Reimplement to return the name of the default ui area.*/
63 virtual AreaParams defaultArea() = 0;
65 /**Reimplement to return the filename extension for project files.*/
66 virtual QString projectFileExtension() = 0;
68 /**Reimplement to return the description for project files.*/
69 virtual QString projectFileDescription() = 0;
71 protected:
72 ShellExtension();
73 static ShellExtension *s_instance;
77 #endif