Plugin

Incomplete documentation - sorry!

Note

Neil - please put some data in technical/class_headings/Plugin.rst

methods and attributes

class lib_openmolar.common.qt4.plugin_tools.plugin.Plugin(plugin_type=0)[source]

Bases: object

This class should be inherited by any class to be added to openmolar2. Several key methods should be overwritten.

__init__(self, plugin_type=Plugin.UNKNOWN)[source]

registers the plugin with the application

FEE_SCALE = 1
IMPORTER = 2
PluginError

alias of _PluginError

SIMPLE = 0
TARGET = 'client'
TYPE[source]

returns the value which determines the nature of this plugin

TYPES = (0, 1, 2)
about_dialog(self, parent=None)[source]

Displays a QMessageBox with parent “parent” providing some basic information when the user requests it. can be overwritten by the plugin if required

authors = 'unknown'
config_dialog(self, parent=None)[source]

This method can be called by the user by pressing on a button in the preferences dialog. by default, Displays a QMessageBox with parent “parent” saying no config is possible.

NB - I have not coded a way to make these settings persistant yet.

description[source]

(String) Plugin.description(self)

this property should be overwritten by well behaved plugins which inherit from this class

file
get_estimate(patient)[source]

get_estimate called... this should be overwritten by fee scale plugins

icon[source]

An icon is presented to the preferences dialog. A default icon is provided, so overwriting is optional.

is_active = False
is_hot_pluggable = True

can this be installed without app restart?

is_signed = False
long_description[source]

(String) Plugin.long_description(self)

this property should be overwritten by well behaved plugins which inherit from this class

name = 'Unspecified'
set_unique_id(id)[source]
setup_plugin()[source]

by default, this does nothing, if overwritten, this is your chance to add to the gui. note - the gui can be accessed by SETTINGS.main_ui see also tear_down

tear_down()[source]

deactive the plugin this should reverse the setup_plugin function

unique_id = None
version = 'None'
website[source]

(String) Plugin.website(self)

a homepage for this plugin

Table Of Contents

Previous topic

PlugableMainWindow

Next topic

PluginDownloadWindow