... | ... | @@ -6,7 +6,7 @@ page need updating before they will be functional.**</span> |
|
|
## Plugin Architecture
|
|
|
There are two types of Plugins post 3.1:
|
|
|
- Core Plugins which reside within the main OpenLP code base and are supported by the COred Development team.
|
|
|
- Community Plugins which are optional and can be developed by anyone and are optional. These Plugins reside in the <data-Dir>/community/contrib directory and follow the standard plugin structure.
|
|
|
- Community Plugins which are optional and can be developed by anyone and are optional. These Plugins reside in the <data-Dir>/contrib directory and follow the standard plugin structure.
|
|
|
|
|
|
### Directory Structure
|
|
|
|
... | ... | @@ -57,7 +57,7 @@ class Plugin(object): |
|
|
def check_pre_conditions(self):
|
|
|
return True
|
|
|
|
|
|
def get_media_manager_item(self):
|
|
|
def create_media_manager_item(self):
|
|
|
pass
|
|
|
|
|
|
def add_import_menu_item(self, import_menu):
|
... | ... | @@ -66,28 +66,25 @@ class Plugin(object): |
|
|
def add_export_menu_item(self, export_menu):
|
|
|
pass
|
|
|
|
|
|
def get_settings_tab(self):
|
|
|
pass
|
|
|
|
|
|
def add_to_menu(self, menubar):
|
|
|
def add_tools_menu_item(self, export_menu):
|
|
|
pass
|
|
|
|
|
|
def handle_event(self, event):
|
|
|
def create_settings_tab(self, parent):
|
|
|
pass
|
|
|
|
|
|
def about(self):
|
|
|
def get_settings_tab(self):
|
|
|
pass
|
|
|
|
|
|
def save(self, data):
|
|
|
def upgrade_settings_tab(self):
|
|
|
pass
|
|
|
|
|
|
def load(self, string):
|
|
|
def add_to_menu(self, menubar):
|
|
|
pass
|
|
|
|
|
|
def render(self, theme, screen=None):
|
|
|
def about(self):
|
|
|
pass
|
|
|
|
|
|
def initalise(self):
|
|
|
def initialise(self):
|
|
|
pass
|
|
|
```
|
|
|
|
... | ... | @@ -195,24 +192,6 @@ each of them is activated, and what each one of them is supposed to do. |
|
|
Show a dialog when the user clicks on the 'About' button in the plugin
|
|
|
manager.
|
|
|
|
|
|
### `save(media_item)`
|
|
|
|
|
|
A plugin's media item is passed to this function, which should return a
|
|
|
`ServiceItem` object which can be written to the service file.
|
|
|
|
|
|
### `load(service_item)`
|
|
|
|
|
|
A `ServiceItem` object from the service file is passed in. This function
|
|
|
parses and sets up an instance of the plugin's media item for use within
|
|
|
the plugin.
|
|
|
|
|
|
### `render(screen, service_item, theme)`
|
|
|
|
|
|
Render the screenth screenful of the `service_item` (a `ServiceItem`
|
|
|
object), using theme settings in theme.
|
|
|
|
|
|
*What is screen? An object, a number, a canvas?*
|
|
|
|
|
|
### `get_media_manager_item()`
|
|
|
|
|
|
Construct a MediaManagerItem object with all the buttons and things you
|
... | ... | @@ -230,10 +209,6 @@ Given the export menu item, add an item to the Export menu. |
|
|
|
|
|
Add menu items to the menu, given the menubar.
|
|
|
|
|
|
### `handle_event(event)`
|
|
|
|
|
|
Handle the event contained in the event object.
|
|
|
|
|
|
### `initialise()`
|
|
|
|
|
|
Called by the plugin manager to setup any additional features on
|
... | ... | |