-rw-r--r-- | libopie2/opieui/opluginconfig.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/libopie2/opieui/opluginconfig.h b/libopie2/opieui/opluginconfig.h index 1ff4858..bfee5bf 100644 --- a/libopie2/opieui/opluginconfig.h +++ b/libopie2/opieui/opluginconfig.h @@ -14,9 +14,28 @@ namespace Core { namespace Ui { -class OPluginConfig : public QWidget { +/** + * With this widget you can configure one or many PluginLoaders either + * through an already existing Opie::Core::OPluginManager or Opie::Core::OGenericPluginLoader + * The sorted state will be read from the Loader. + * + * As with Opie::Ui::OKeyConfigWidget you can have two options. To either apply your changes + * directly through Opie::Core::OPluginManager or to use Queued where you manually need to + * call save. + * + * Internally we operate on Opie::Core::OPluginManager. + * + * @see Opie::Ui::OKeyConfigWidget + * @see Opie::Core::OPluginLoader + * @see Opie::Core::OPluginManager + * + * @author zecke + * @since Opie 1.1.5 + * + */ +class OPluginConfigWidget : public QWidget { public: - enum Mode { Queued, Immediate }; - OPluginConfig( QWidget* wid, const char*, WFlags fl ); - OPluginConfig( OGenericPluginManager* manager, QWidget* wid, - const char* name, WFlags fl ); - OPluginConfig( OPluginLoader* loader, QWidget* wid, const char* name, + enum ChangeMode { Queued, Immediate }; + OPluginConfigWidget( QWidget* wid = 0, const char* name = 0, WFlags fl = 0); + OPluginConfig( Opie::Core::OPluginManager* manager, QWidget* wid = 0, + const char* name = 0, WFlags fl = 0); + OPluginConfig( Opie::Core::OGenericPluginLoader* loader, QWidget* wid, const char* name, WFlags fl ); @@ -25,7 +44,16 @@ public: - void setMode( enum Mode ); - Mode mode()const; + void setChangeMode( enum Mode ); + ChangeMode mode()const; + + void insert( const QString&, const Opie::Core::OPluginManager* ); + void insert( const QString&, const Opie::Core::OPluginLoader* ); - void insert( const OPluginManager* ); - void insert( const OPluginLoader* , const QString& name ); +signals: + /** + * @param item The new OPluginItem + */ + void pluginChanged ( const Opie::Core::OPluginItem& item, bool old_state); + void pluginEnabled ( const Opie::Core::OPluginItem& item); + void pluginDisabled( const Opie::Core::OPluginItem& item); +public: @@ -33,2 +61,4 @@ public: void save(); +private: + }; |