-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 | |||
@@ -12,25 +12,55 @@ namespace Core { | |||
12 | class OGenericPluginLoader; | 12 | class OGenericPluginLoader; |
13 | } | 13 | } |
14 | namespace Ui { | 14 | namespace Ui { |
15 | class OPluginConfig : public QWidget { | 15 | /** |
16 | * With this widget you can configure one or many PluginLoaders either | ||
17 | * through an already existing Opie::Core::OPluginManager or Opie::Core::OGenericPluginLoader | ||
18 | * The sorted state will be read from the Loader. | ||
19 | * | ||
20 | * As with Opie::Ui::OKeyConfigWidget you can have two options. To either apply your changes | ||
21 | * directly through Opie::Core::OPluginManager or to use Queued where you manually need to | ||
22 | * call save. | ||
23 | * | ||
24 | * Internally we operate on Opie::Core::OPluginManager. | ||
25 | * | ||
26 | * @see Opie::Ui::OKeyConfigWidget | ||
27 | * @see Opie::Core::OPluginLoader | ||
28 | * @see Opie::Core::OPluginManager | ||
29 | * | ||
30 | * @author zecke | ||
31 | * @since Opie 1.1.5 | ||
32 | * | ||
33 | */ | ||
34 | class OPluginConfigWidget : public QWidget { | ||
16 | public: | 35 | public: |
17 | enum Mode { Queued, Immediate }; | 36 | enum ChangeMode { Queued, Immediate }; |
18 | OPluginConfig( QWidget* wid, const char*, WFlags fl ); | 37 | OPluginConfigWidget( QWidget* wid = 0, const char* name = 0, WFlags fl = 0); |
19 | OPluginConfig( OGenericPluginManager* manager, QWidget* wid, | 38 | OPluginConfig( Opie::Core::OPluginManager* manager, QWidget* wid = 0, |
20 | const char* name, WFlags fl ); | 39 | const char* name = 0, WFlags fl = 0); |
21 | OPluginConfig( OPluginLoader* loader, QWidget* wid, const char* name, | 40 | OPluginConfig( Opie::Core::OGenericPluginLoader* loader, QWidget* wid, const char* name, |
22 | WFlags fl ); | 41 | WFlags fl ); |
23 | 42 | ||
24 | ~OPluginConfig(); | 43 | ~OPluginConfig(); |
25 | 44 | ||
26 | void setMode( enum Mode ); | 45 | void setChangeMode( enum Mode ); |
27 | Mode mode()const; | 46 | ChangeMode mode()const; |
47 | |||
48 | void insert( const QString&, const Opie::Core::OPluginManager* ); | ||
49 | void insert( const QString&, const Opie::Core::OPluginLoader* ); | ||
28 | 50 | ||
29 | void insert( const OPluginManager* ); | 51 | signals: |
30 | void insert( const OPluginLoader* , const QString& name ); | 52 | /** |
53 | * @param item The new OPluginItem | ||
54 | */ | ||
55 | void pluginChanged ( const Opie::Core::OPluginItem& item, bool old_state); | ||
56 | void pluginEnabled ( const Opie::Core::OPluginItem& item); | ||
57 | void pluginDisabled( const Opie::Core::OPluginItem& item); | ||
58 | public: | ||
31 | 59 | ||
32 | void load(); | 60 | void load(); |
33 | void save(); | 61 | void save(); |
62 | private: | ||
63 | |||
34 | }; | 64 | }; |
35 | } | 65 | } |
36 | } | 66 | } |