# class KPluginFactory

###

Module | kdecore
Namespace |
Class | KPluginFactory
Inherits | QObject

### methods

- KPluginFactory (componentName, catalogName, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  componentName | char | 0
  catalogName | char | 0
  parent | QObject | 0

  This constructor creates a factory for a plugin with the given componentName and catalogName. Those values are used to initialize a KComponentData object for the plugin. You can later access it with componentData(). If componentName is 0, an invalid KComponentData object will be created.

  componentName - the component name of the plugin

  catalogName - the translation catalog to use

  parent - a parent object

- KPluginFactory (aboutData, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  aboutData | KAboutData |
  parent | QObject | 0

  This constructor creates a factory for a plugin with the given KAboutData object. This object is used to initialize a KComponentData object for the plugin. You can later access it with componentData(). KPluginFactory takes ownership of the aboutData object, so don't delete it yourself!

  aboutData - the KAboutData for the plugin

  parent - a parent object

- KPluginFactory (aboutData, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  aboutData | KAboutData |
  parent | QObject | 0

  Deprecated

- KPluginFactory (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QObject |

  Deprecated

- KPluginFactory (dd, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  dd | KPluginFactoryPrivate |
  parent | QObject | 0

- KPluginFactory (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | char | 0
  a1 | char | 0
  a2 | QObject | 0

- KPluginFactory (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KAboutData |
  a1 | QObject | 0

- KPluginFactory (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KAboutData |
  a1 | QObject | 0

- KPluginFactory (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QObject |

- KPluginFactory (a0, a1)

  returns ctor
  Not implemented
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KPluginFactoryPrivate |
  a1 | QObject | 0

- componentData ( )

  returns KComponentData

  You can use this method to get the component data of the plugin. It is filled with the information given to the constructor of KPluginFactory. The K_PLUGIN_FACTORY macros provide a static version of this method, this can be used from any place within the plugin.

  \returns The KComponentData for the plugin

- create (parent, classname, args)

  returns QObject

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0
  classname | char | "QObject"
  args | QStringList | QStringList()

  Deprecated

- create (iface, parentWidget, parent, args, keyword)

  returns QObject

  Argument | Type | Default
  --- | --- | ---
  iface | char |
  parentWidget | QWidget |
  parent | QObject |
  args | QVariantList |
  keyword | QString |

  This function is called when the factory asked to create an Object.

  You may reimplement it to provide a very flexible factory. This is especially useful to provide generic factories for plugins implemeted using a scripting language.

  iface - The staticMetaObject.className() string identifying the plugin interface that was requested. E.g. for KCModule plugins this string will be "KCModule".

  parentWidget - Only used if the requested plugin is a KPart.

  parent - The parent object for the plugin object.

  args - A plugin specific list of arbitrary arguments.

  keyword - A string that uniquely identifies the plugin. If a KService is used this keyword is read from the X-KDE-PluginKeyword entry in the .desktop file.

- createObject (parent, className, args)

  returns QObject

  Argument | Type | Default
  --- | --- | ---
  parent | QObject |
  className | char |
  args | QStringList |

- createPartObject (parentWidget, parent, classname, args)

  returns KParts.Part
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  parentWidget | QWidget |
  parent | QObject |
  classname | char |
  args | QStringList |

  Deprecated

- objectCreated (object)

  returns Nothing
  SIGNAL ("objectCreated (QObject*)")

  Argument | Type | Default
  --- | --- | ---
  object | QObject |

- setComponentData (componentData)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  componentData | KComponentData |

  This method sets the component data of the plugin. You can access the component data object later with componentData(). Normally you don't have to call this, because the factory constructs a component data object from the information given to the constructor. The object is destroyed, when the module containing the plugin is unloaded. Normally this happens only on application shutdown.

  componentData - the new KComponentData object

- setupTranslations ( )

  returns Nothing

- stringListToVariantList (list)

  returns QVariantList

  Argument | Type | Default
  --- | --- | ---
  list | QStringList |

  Internal Converts a QStringList to a QVariantList

- variantListToStringList (list)

  returns QStringList

  Argument | Type | Default
  --- | --- | ---
  list | QVariantList |

  Internal Converts a QVariantList of strings to a QStringList