#include <qdataschemadriverplugin.h>
Inherited by QDataSchemaDriverPlugin< type >.
Public Member Functions | |
QDataSchemaDriverPluginBase () | |
~QDataSchemaDriverPluginBase () | |
virtual QStringList | keys () const =0 |
virtual QDataSchemaDriver * | create (const QString &key)=0 |
Class for work with extensions
The Data schema driver plugin is a simple plugin interface that makes it easy to create your own data schema drivers plugins that can be loaded dynamically by application and Qt.
Writing a data schema driver plugin is achieved by subclassing this base class, reimplementing the pure virtual functions keys() and create(), and exporting the class with the QDS_EXPORT_PLUGIN
macro. See the Ananas extensions plugins that come with Ananas for example implementations (in the {extensions} subdirectory of the source distribution). Read the plugins documentation for more information on plugins.
QDataSchemaDriverPluginBase::QDataSchemaDriverPluginBase | ( | ) |
Constructs a QDataSchema plugin. This is invoked automatically by the Q_EXPORT_PLUGIN
macro.
QDataSchemaDriverPluginBase::~QDataSchemaDriverPluginBase | ( | ) |
Destroys the QDataSchema driver plugin.
You never have to call this explicitly. Qt destroys a plugin automatically when it is no longer used.
QDataSchemaDriver * QDataSchemaDriverPluginBase::create | ( | const QString & | key | ) | [pure virtual] |
Creates and returns a QDataSchemaDriver object for the driver key key. The driver key is usually the class name of the required driver.
QStringList QDataSchemaDriverPluginBase::keys | ( | ) | const [pure virtual] |
Returns the list of drivers (keys) this plugin supports.
These keys are usually the class names of the custom extension that are implemented in the plugin.