author | zecke <zecke> | 2004-05-28 16:20:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-05-28 16:20:57 (UTC) |
commit | 9521c1627157bf15824b5b55b9782b87cc610df6 (patch) (side-by-side diff) | |
tree | ee0d9dc734e8db0e85a3e4d6ad0ee548c31f4115 /libopie2/opieui/opluginconfig.h | |
parent | 8db08a3d320e48924d0ccd78d2bd177e316fff90 (diff) | |
download | opie-9521c1627157bf15824b5b55b9782b87cc610df6.zip opie-9521c1627157bf15824b5b55b9782b87cc610df6.tar.gz opie-9521c1627157bf15824b5b55b9782b87cc610df6.tar.bz2 |
Ideas of the API of the Generic PluginLoader
Diffstat (limited to 'libopie2/opieui/opluginconfig.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/opluginconfig.h | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/libopie2/opieui/opluginconfig.h b/libopie2/opieui/opluginconfig.h index bfee5bf..0db1fcb 100644 --- a/libopie2/opieui/opluginconfig.h +++ b/libopie2/opieui/opluginconfig.h @@ -18,13 +18,14 @@ namespace Ui { * 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. + * Internally we operate on Opie::Core::OPluginManager. You can insert any numbers of loaders + * or pluginmanagers. But you need to call load() after you've inserted new items. * * @see Opie::Ui::OKeyConfigWidget * @see Opie::Core::OPluginLoader * @see Opie::Core::OPluginManager * * @author zecke @@ -37,32 +38,57 @@ public: 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(); + virtual ~OPluginConfig(); - void setChangeMode( enum Mode ); + void setChangeMode( enum ChangeMode ); ChangeMode mode()const; void insert( const QString&, const Opie::Core::OPluginManager* ); - void insert( const QString&, const Opie::Core::OPluginLoader* ); + void insert( const QString&, const Opie::Core::OGenericPluginLoader* ); signals: /** - * @param item The new OPluginItem + * A PluginItem was changed. This signal is only emitted if you're + * in the immediate ChangeMode. + * This is emitted on any change ( disable,enable,pos) + * + * @param item The OPluginItem that was changed. This is how it looks now + * @param old_state If it was enabled before */ void pluginChanged ( const Opie::Core::OPluginItem& item, bool old_state); + + /** + * emitted only if you're in Immediate when an Item was enabled + * + * @param item The Item that was enabled + */ void pluginEnabled ( const Opie::Core::OPluginItem& item); + + /** + * emitted only if you're in Immediate when an Item was enabled + * + * @param item The Item was disabled + */ void pluginDisabled( const Opie::Core::OPluginItem& item); + + /** + * Data was saved(). Normally this is emitted when save() is called + * @see changed + */ + void changed(); public: void load(); void save(); private: + ChangeMode m_mode; + QMap<Opie::Core::OPluginManager*, bool> m_items; }; } } #endif |