Make plasma libs build.
[amarok.git] / src / plugin / pluginconfig.h
blob27a4491ffd1766b8b9d218ba08fe6751d7a3cb13
1 // (c) 2004 Mark Kretschmann <markey@web.de>
2 // See COPYING file for licensing information.
4 #ifndef AMAROK_PLUGINCONFIG_H
5 #define AMAROK_PLUGINCONFIG_H
6 #include "amarok_export.h"
7 #include <QObject>
9 class QWidget;
11 namespace Amarok
13 /**
14 * Class to allow user configuration of your plugin; you provide a GUI widget via view()
17 class AMAROK_EXPORT PluginConfig : public QObject
19 Q_OBJECT
21 signals:
22 /** Emit whenever some view setting is changed by the user */
23 void viewChanged();
25 /** Emit after settings have been saved to config. Can be used for updating engine state. */
26 void settingsSaved();
28 public:
29 /** Return the view widget,
30 * The PluginConfig object owns this pointer, nobody else will delete it for you
32 virtual QWidget* view() = 0;
34 /** Return true if any of the view settings are different to the currently saved state */
35 virtual bool hasChanged() const = 0;
37 /** Return true if all view settings are in their default states */
38 virtual bool isDefault() const = 0;
40 public slots:
41 /** Save view state using, eg KConfig */
42 virtual void save() = 0;
46 #endif /*AMAROK_PLUGINCONFIG_H*/