* 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
* 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;
};