|  | Home |  | 
The QMailPluginManager class is a helper class that simplifies plug-in loading for the Messaging framework. More...
#include <QMailPluginManager>
Inherits QObject.
| QMailPluginManager ( const QString & dir, QObject * parent = 0 ) | |
| ~QMailPluginManager () | |
| QObject * | instance ( const QString & name ) | 
| QStringList | list () const | 
The QMailPluginManager class is a helper class that simplifies plug-in loading for the Messaging framework.
The list() function returns a list of available plugins in the subdirectory specified in the constructor.
Plugin subdirectories are searched for from the directory specified by QMail::pluginPath().
In order to load a plugin, call the instance() function with the name of the plugin to load. qobject_cast() may then be used to query for the desired interface.
Creates a QMailPluginManager for plugins located in the plugin subdirectory dir with the given parent.
The plugins must be installed in the QMail::pluginPath()/dir directory.
Destroys the QMailPluginManager and releases any resources allocated by the PluginManager.
Load the plug-in specified by name.
Returns the plugin interface if found, otherwise 0.
    QObject *instance = pluginManager->instance("name");
    if (instance) {
        EffectsInterface *iface = 0;
        iface = qobject_cast<EffectsInterface*>(instance);
        if (iface) {
            // We have an instance of the desired type.
        }
    }
Returns the list of plugins that are available in the plugin subdirectory.
| Copyright © 2010 QtSoftware | Messaging Framework |