.. link: .. description: .. tags: .. date: 2013/08/18 00:00:00 .. title: NINJA-IDE .. slug: plugin_interfaces .. class:: alert alert-info pull-top .. contents:: *Module:* `plugin_interfaces.py `_ API ============================================================================================ No description. *Global Functions:* --------------------- *Function:* `implements(iface) [at ln:32] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def implements(iface): | A decorator to check if interfaces are correctly implmented | #TODO: check if functions parameters are correct ---- *Class:* `IProjectTypeHandler(object) `_ ------------------------------------------------------------------------------------------------------------------------------------------ .. code:: python class IProjectTypeHandler(object): | Interface to create a Project type handler *Function:* `get_context_menus() [at ln:78] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_context_menus(): | " | Returns a iterable of QMenu ---- *Function:* `get_pages() [at ln:64] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_pages(): | Returns a collection of QWizardPage ---- *Function:* `on_wizard_finish(wizard) [at ln:71] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def on_wizard_finish(wizard): | Called when the user finish the wizard | @wizard: QWizard instance ---- *Class:* `IPluginPreferences() `_ ------------------------------------------------------------------------------------------------------------------------------------ .. code:: python class IPluginPreferences(): | Interface for plugin preferences widget *Function:* `save() [at ln:118] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def save(): | Save the plugin data as NINJA-IDE settings ---- *Class:* `ISymbolsHandler() `_ -------------------------------------------------------------------------------------------------------------------------------- .. code:: python class ISymbolsHandler(): | Interface to create a symbol handler | EXAMPLE: | { | 'attributes': | {name: line, name: line}, | 'functions': | {name: line, name: line}, | 'classes': | { | name: (line, { | 'attributes': {name: line}, | 'function': {name: line}} | ) | } | } *Function:* `obtain_symbols(source) [at ln:105] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def obtain_symbols(source): | Returns the dict needed by the tree | @source: Source code in plain text ---- *Class:* `MethodNotImplemented(Exception) `_ ---------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class MethodNotImplemented(Exception): No description.