1
/***************************************************************************
2
* Copyright (C) 2005/06 by the Quassel Project *
3
* devel@quassel-irc.org *
5
* This program 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) version 3. *
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 General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
24
// TODO disable GUI-related stuff for core-only compile
30
* Header that needs to be included by all plugins and defines the interfaces a plugin
34
/// The base class for the generic plugin interfaces.
35
class PluginInterface {
41
/// All GUI plugins need to implement this interface.
42
class GuiPluginInterface : public PluginInterface {
47
Q_DECLARE_INTERFACE(GuiPluginInterface,
48
"eu.quassel.plugins.GuiPluginInterface/1.0");
50
/// All core plugins need to implement this interface.
51
class CorePluginInterface: public PluginInterface {
57
Q_DECLARE_INTERFACE(CorePluginInterface,
58
"eu.quassel.plugins.CorePluginInterface/1.0");
60
/** Plugins implementing this interface can provide a settings widget that will be shown in
61
* the application's settings dialog.
62
* This is also used by built-in settings dialogs.
65
class SettingsInterface {
67
virtual ~SettingsInterface() {};
68
virtual QString category() = 0;
69
virtual QString title() = 0;
70
virtual QWidget *settingsWidget() = 0;
71
virtual void applyChanges() = 0;
75
Q_DECLARE_INTERFACE(SettingsInterface,
76
"eu.quassel.plugins.SettingsInterface/1.0");
79
/** Plugins implementing this interface will be provided with the raw text the users enters.
80
* The output they generate is in turn treated like generic user input. Note that the order in
81
* which plugins are called is not defined.
83
class UserInputFilterInterface {
89
Q_DECLARE_INTERFACE(UserInputFilterInterface,
90
"eu.quassel.plugins.UserInputFilterInterface/1.0");
92
/** Plugins implementing this interface receive and can process all messages coming from the core.
94
class CoreMessageFilterInterface {
100
Q_DECLARE_INTERFACE(CoreMessageFilterInterface,
101
"eu.quassel.plugins.CoreMessageFilterInterface/1.0");
103
/** Plugins implementing this interface receive core messages for a single buffer only.
104
* Any ChatWidgetPlugin has to provide a widget it outputs these messages to, to be used
105
* in a ChannelWidget.
107
class ChatWidgetInterface {
113
Q_DECLARE_INTERFACE(ChatWidgetInterface,
114
"eu.quassel.plugins.ChatWidgetInterface/1.0");