X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fplugins%2FPluginInterface.h;fp=src%2Fplugins%2FPluginInterface.h;h=a5ea554f1850ee27b94b656c8e95e06f8a681c30;hb=a988ddfbc3be7773bccd4017a70fcd8ce990d8c7;hp=d5ed6c81f5188c417637d8701138334c88fbbd69;hpb=a25be1792ef730256ea47908df24b1bbbded553d;p=qtrapids diff --git a/src/plugins/PluginInterface.h b/src/plugins/PluginInterface.h index d5ed6c8..a5ea554 100644 --- a/src/plugins/PluginInterface.h +++ b/src/plugins/PluginInterface.h @@ -37,8 +37,11 @@ namespace qtrapids * that implement the additional functionality * @note Implementing plugin host should inherit QObject. */ - class PluginHostInterface { + class PluginHostInterface + { public: + + /// @enum PluginWidgetType Allows plugin host to differentiate actions /// when passed as parameter to addWidget(). E.g. Popup a dialog or append tab etc. /// @todo add new types @@ -85,10 +88,20 @@ namespace qtrapids * The host application uses PluginInterface interface for calling the plugins * that extend the Host functionality */ - class PluginInterface : public QObject { + class PluginInterface : public QObject + { public: + + /// @struct Info Used to supply information from the host application to the plugin + /// for initialization. + struct Info { + Info() : directory("") {} //Constructor + QString directory; ///< directory from which the plugin is loaded + // ... + }; + /// @brief Initializes the plugin instance. - virtual void initialize(PluginHostInterface* host) = 0; + virtual void initialize(PluginHostInterface* host, Info info = Info()) = 0; virtual QWidget* getGui() = 0; };