tooltip for playlist model
[jkt-jerboa.git] / include / Plugin.h
blobba52125783a89b94ad07b55654d326835a019bd8
1 /* LICENSE NOTICE
2 This file is part of Jerboa.
4 Jerboa 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), version 3 of the license.
9 Jerboa 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.
14 You should have received a copy of the GNU General Public License
15 along with Jerboa. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef _JERBOA_PLUGIN_H
18 #define _JERBOA_PLUGIN_H
20 #include "Types.h"
21 #include "TrackData.h"
23 class QWidget;
25 namespace Jerboa
27 class PlayerInterface;
28 /** Abstract class defining the plugin interface.
29 * All Jerboa plugins must inherit from this class.
31 class Plugin
33 public:
34 /** Gets the plugins name.
35 * This is potentially user-visible, so should be translated
37 virtual const QString& pluginName() const = 0;
39 /** Retrieves the plugins widget, if any.
40 * If a non-NULL pointer is returned, this widget will be added
41 * to the collection tab bar, using widget()->windowTitle() for the
42 * tab label.
44 virtual QWidget* widget() { return NULL; }
46 /** Gives the plugin a PlayerInterface object
47 * All communication with the player goes through this interface.
49 virtual void setPlayerInterface(PlayerInterface*){};
51 /** List of all components provided by the plugin.
52 * See ComponentInterface.
54 virtual ComponentMap components(){ return ComponentMap(); }
58 Q_DECLARE_INTERFACE(
59 Jerboa::Plugin,
60 "uk.co.fredemmott.jerboa.plugin/1.0"
62 #endif