/
plugin.py
30 lines (23 loc) · 881 Bytes
/
plugin.py
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
30
"""Contains the Action Plugin."""
import os
from pcbnew import ActionPlugin # pylint: disable=import-error
from .mainwindow import JLCPCBTools
class JLCPCBPlugin(ActionPlugin):
"""JLCPCBPlugin instance of ActionPlugin."""
def defaults(self):
"""Define defaults."""
# pylint: disable=attribute-defined-outside-init
self.name = "JLCPCB Tools"
self.category = "Fabrication data generation"
self.description = (
"Generate JLCPCB-compatible Gerber, Excellon, BOM and CPL files"
)
self.show_toolbar_button = True
path, _ = os.path.split(os.path.abspath(__file__))
self.icon_file_name = os.path.join(path, "jlcpcb-icon.png")
self._pcbnew_frame = None
def Run(self):
"""Overwrite Run."""
dialog = JLCPCBTools(None)
dialog.Center()
dialog.Show()