summaryrefslogtreecommitdiff
authorzecke <zecke>2004-05-18 20:58:40 (UTC)
committer zecke <zecke>2004-05-18 20:58:40 (UTC)
commitf12bce1641990d64067634b7817430bc080d9e23 (patch) (unidiff)
treef0831eadeacd8d09f6bdef3de91833e9611ab92f
parent59c6451a16405f19b1d4bc97906bd5778b5b0cd3 (diff)
downloadopie-f12bce1641990d64067634b7817430bc080d9e23.zip
opie-f12bce1641990d64067634b7817430bc080d9e23.tar.gz
opie-f12bce1641990d64067634b7817430bc080d9e23.tar.bz2
My Idea of a PluginConfig Widget part II :)
Now on to implementing it
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/opluginconfig.h50
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
@@ -9,30 +9,60 @@
9namespace Opie { 9namespace Opie {
10namespace Core { 10namespace Core {
11 class OPluginManager; 11 class OPluginManager;
12 class OGenericPluginLoader; 12 class OGenericPluginLoader;
13} 13}
14namespace Ui { 14namespace Ui {
15class 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 */
34class OPluginConfigWidget : public QWidget {
16public: 35public:
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* ); 51signals:
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);
58public:
31 59
32 void load(); 60 void load();
33 void save(); 61 void save();
62private:
63
34}; 64};
35} 65}
36} 66}
37 67
38#endif 68#endif