From f12bce1641990d64067634b7817430bc080d9e23 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 18 May 2004 20:58:40 +0000 Subject: My Idea of a PluginConfig Widget part II :) Now on to implementing it --- 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 @@ -12,25 +12,55 @@ namespace Core { class OGenericPluginLoader; } 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 ); ~OPluginConfig(); - 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: void load(); void save(); +private: + }; } } -- cgit v0.9.0.2