forked from jungmannlab/picasso
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin_template.py
More file actions
29 lines (22 loc) · 828 Bytes
/
Copy pathplugin_template.py
File metadata and controls
29 lines (22 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Template for creating a Picasso plugin. Any plugin should be moved to
picasso/gui/plugins/.
For more details, see https://picassosr.readthedocs.io/en/latest/plugins.html
Author:
Date:
"""
# Space to import packages
import numpy as np
# class that defines modifications to the GUI and actions
class Plugin:
def __init__(self, window):
self.name = "render" # input the name of the app
self.window = window
def execute(self):
"""This function is called when opening a GUI."""
your_action = self.window.plugin_menu.addAction(
"What does your plugin do?"
)
your_action.triggered.connect(self.run_your_plugin)
def run_your_plugin(self):
"""This function is called when clicking the menu entry."""
print(f"Hello world, pi is: {np.pi}")