summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/opluginconfig.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opieui/opluginconfig.h b/libopie2/opieui/opluginconfig.h
index 0db1fcb..c4f7213 100644
--- a/libopie2/opieui/opluginconfig.h
+++ b/libopie2/opieui/opluginconfig.h
@@ -1,94 +1,96 @@
1/* 1/*
2 * LGPLv2 zecke@handhelds.org 2 * LGPLv2 zecke@handhelds.org
3 */ 3 */
4#ifndef ODP_OPIE_UI_OPLUGIN_CONFIG_H 4#ifndef ODP_OPIE_UI_OPLUGIN_CONFIG_H
5#define ODP_OPIE_UI_OPLUGIN_CONFIG_H 5#define ODP_OPIE_UI_OPLUGIN_CONFIG_H
6 6
7#include <qwidget.h> 7#include <qwidget.h>
8 8
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 {
15/** 15/**
16 * API IDEA - not usable this moment!
17 *
16 * With this widget you can configure one or many PluginLoaders either 18 * With this widget you can configure one or many PluginLoaders either
17 * through an already existing Opie::Core::OPluginManager or Opie::Core::OGenericPluginLoader 19 * through an already existing Opie::Core::OPluginManager or Opie::Core::OGenericPluginLoader
18 * The sorted state will be read from the Loader. 20 * The sorted state will be read from the Loader.
19 * 21 *
20 * As with Opie::Ui::OKeyConfigWidget you can have two options. To either apply your changes 22 * 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 23 * directly through Opie::Core::OPluginManager or to use Queued where you manually need to
22 * call save. 24 * call save.
23 * 25 *
24 * Internally we operate on Opie::Core::OPluginManager. You can insert any numbers of loaders 26 * Internally we operate on Opie::Core::OPluginManager. You can insert any numbers of loaders
25 * or pluginmanagers. But you need to call load() after you've inserted new items. 27 * or pluginmanagers. But you need to call load() after you've inserted new items.
26 * 28 *
27 * @see Opie::Ui::OKeyConfigWidget 29 * @see Opie::Ui::OKeyConfigWidget
28 * @see Opie::Core::OPluginLoader 30 * @see Opie::Core::OPluginLoader
29 * @see Opie::Core::OPluginManager 31 * @see Opie::Core::OPluginManager
30 * 32 *
31 * @author zecke 33 * @author zecke
32 * @since Opie 1.1.5 34 * @since Opie 1.1.5
33 * 35 *
34 */ 36 */
35class OPluginConfigWidget : public QWidget { 37class OPluginConfigWidget : public QWidget {
36public: 38public:
37 enum ChangeMode { Queued, Immediate }; 39 enum ChangeMode { Queued, Immediate };
38 OPluginConfigWidget( QWidget* wid = 0, const char* name = 0, WFlags fl = 0); 40 OPluginConfigWidget( QWidget* wid = 0, const char* name = 0, WFlags fl = 0);
39 OPluginConfig( Opie::Core::OPluginManager* manager, QWidget* wid = 0, 41 OPluginConfig( Opie::Core::OPluginManager* manager, QWidget* wid = 0,
40 const char* name = 0, WFlags fl = 0); 42 const char* name = 0, WFlags fl = 0);
41 OPluginConfig( Opie::Core::OGenericPluginLoader* loader, QWidget* wid, const char* name, 43 OPluginConfig( Opie::Core::OGenericPluginLoader* loader, QWidget* wid, const char* name,
42 WFlags fl ); 44 WFlags fl );
43 45
44 virtual ~OPluginConfig(); 46 virtual ~OPluginConfig();
45 47
46 void setChangeMode( enum ChangeMode ); 48 void setChangeMode( enum ChangeMode );
47 ChangeMode mode()const; 49 ChangeMode mode()const;
48 50
49 void insert( const QString&, const Opie::Core::OPluginManager* ); 51 void insert( const QString&, const Opie::Core::OPluginManager* );
50 void insert( const QString&, const Opie::Core::OGenericPluginLoader* ); 52 void insert( const QString&, const Opie::Core::OGenericPluginLoader* );
51 53
52signals: 54signals:
53 /** 55 /**
54 * A PluginItem was changed. This signal is only emitted if you're 56 * A PluginItem was changed. This signal is only emitted if you're
55 * in the immediate ChangeMode. 57 * in the immediate ChangeMode.
56 * This is emitted on any change ( disable,enable,pos) 58 * This is emitted on any change ( disable,enable,pos)
57 * 59 *
58 * @param item The OPluginItem that was changed. This is how it looks now 60 * @param item The OPluginItem that was changed. This is how it looks now
59 * @param old_state If it was enabled before 61 * @param old_state If it was enabled before
60 */ 62 */
61 void pluginChanged ( const Opie::Core::OPluginItem& item, bool old_state); 63 void pluginChanged ( const Opie::Core::OPluginItem& item, bool old_state);
62 64
63 /** 65 /**
64 * emitted only if you're in Immediate when an Item was enabled 66 * emitted only if you're in Immediate when an Item was enabled
65 * 67 *
66 * @param item The Item that was enabled 68 * @param item The Item that was enabled
67 */ 69 */
68 void pluginEnabled ( const Opie::Core::OPluginItem& item); 70 void pluginEnabled ( const Opie::Core::OPluginItem& item);
69 71
70 /** 72 /**
71 * emitted only if you're in Immediate when an Item was enabled 73 * emitted only if you're in Immediate when an Item was enabled
72 * 74 *
73 * @param item The Item was disabled 75 * @param item The Item was disabled
74 */ 76 */
75 void pluginDisabled( const Opie::Core::OPluginItem& item); 77 void pluginDisabled( const Opie::Core::OPluginItem& item);
76 78
77 /** 79 /**
78 * Data was saved(). Normally this is emitted when save() is called 80 * Data was saved(). Normally this is emitted when save() is called
79 * @see changed 81 * @see changed
80 */ 82 */
81 void changed(); 83 void changed();
82public: 84public:
83 85
84 void load(); 86 void load();
85 void save(); 87 void save();
86private: 88private:
87 ChangeMode m_mode; 89 ChangeMode m_mode;
88 QMap<Opie::Core::OPluginManager*, bool> m_items; 90 QMap<Opie::Core::OPluginManager*, bool> m_items;
89 91
90}; 92};
91} 93}
92} 94}
93 95
94#endif 96#endif