summaryrefslogtreecommitdiff
authorzecke <zecke>2004-05-18 20:58:40 (UTC)
committer zecke <zecke>2004-05-18 20:58:40 (UTC)
commitf12bce1641990d64067634b7817430bc080d9e23 (patch) (side-by-side diff)
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
@@ -13,23 +13,53 @@ namespace Core {
}
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:
+
};
}