.. meta:: :description: Infrastructure Plugin Elements .. _pluginElements: Plugin elements =============== These are the elements defining a plugin. .. _plugin_elements_interface_methods: Interface methods ----------------- Interface methods are specified by methods decorated by the ``interfaceMethod`` decorator. See :func:`ORSServiceClass.decorators.infrastructure.interfaceMethod`. Interface methods are used for logging changes in the application, like the creation of a dataset or changing tool. Logging is used for macro creation and for debugging purposes (see :ref:`macro`). Menu items ---------- Menu items are specified by methods decorated by the ``menuItem`` decorator. See :func:`ORSServiceClass.decorators.infrastructure.menuItem`. Actions ------- Actions are specified by methods decorated by the ``action`` decorator. See :func:`ORSServiceClass.decorators.infrastructure.action`. Actions can be triggered by a keyboard key, by a mouse click or a combination of these. These keys are configurable in the preferences panel (in the *Configurable Actions* section). States ------ A plugin must declare his available states in his class variable ``stateDescriptors``. See :class:`ORSServiceClass.OrsPlugin.abstractPlugin.AbstractPlugin`. See also :ref:`OrsPlugin_States`. .. _pluginElementsInterests: Interests --------- Interests are specified by methods decorated by the ``interest`` decorator. See :func:`ORSServiceClass.decorators.infrastructure.interest`. An interest decorator should specify one or more entities for which the decorated method will be called when one of those entities is added or modified in the specified context. For more information about how to use entities, see :class:`OrsLibraries.workingcontext.WorkingContext`. UI descriptors -------------- A plugin must declare his UIs in his class variable ``UIDescriptors`` (see :class:`ORSServiceClass.OrsPlugin.abstractPlugin.AbstractPlugin`). By convention, the main form of a plugin is named *MainForm*.