Signals
Signals are called when special actions are performed in the ui, allowing the plugin to respond to these actions. For example, should your plugin have some kind of page selection in the config area your plugin needs to get informed if a page gets renamed. That's exactly what signals are for.
Available signals¶
PageRename
¶
-
Description:
This signal is called whenever a page gets renamed in thePage Manager
.Callback arguments:
Name Description Type old_path The old path of the page. str new_path The new path of the page. str
PageDelete
¶
-
Description:
This signal is called whenever a page gets deleted in thePage Manager
.Callback arguments:
Name Description Type path The path of removed the page. str
PageAdd
¶
-
Description:
This signal is called whenever a page gets added in thePage Manager
.Callback arguments:
Name Description Type path The path of the added page. str
ChangePage
¶
-
Description:
This signal is called whenever a page gets changed in thePage Manager
.Callback arguments:
Name Description Type controller The controller of deck where the page was changed. DeckController old_path The old path of the page. str new_path The new path of the page. str
PluginInstall
¶
-
Description:
This signal is called whenever a new plugin gets installed.Callback arguments:
Name Description Type id The id of the plugin e.g. dev_core447_OSPlugin
str
How to use signals¶
- Import the signals module
- Connect to the signal
This is done by theconnect
method of theActionBase
: - Done !!
Now every time a page gets renamed theon_page_rename
method will be called.
Not enough?¶
Should you need a signal that is currently not availble feel free to open a issue or work on an own pull request.