diff --git a/CHANGELOG.md b/CHANGELOG.md
index b6260b5f..db04bd5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta
=================================================
+29.01.2021
+
+- some refactoring
+- working on Milling Tool and Drilling Tool: made sure that the plugin UI is initialized only when the plugin (Tool) is run in order to avoid errors like (wrapped C++ objects was deleted)
+
28.01.2021
- added a new preprocessor by Georg Ziegler, used with a laser (cleaned it for PEP8)
@@ -5207,7 +5212,7 @@ now there is a Tool Table in CNC Object UI and each tool GCode can be enabled or
- if a geometry is a closed shape then create a Polygon out of it
- some fixes in Non Copper Clearing Tool
- Geometry Tool table: added option to delete_tool function for delete_all
-- Geometry Tool table: added ability to delete even the last tool in tool_table and added an warning if the user try to generate a CNC Job without a tool in tool table
+- Geometry Tool table: added ability to delete even the last tool in plugin_table and added an warning if the user try to generate a CNC Job without a tool in tool table
- if a geometry is painted inside the Geometry Editor then it will store the tool diameter used for this painting. Only one tool cn be stored (the last one) so if multiple paintings are done with different tools in the same geometry it will store only the last used tool.
- if multiple geometries have different tool diameters associated (contain a paint geometry) they aren't allowed to be joined and a message is displayed letting the user know
@@ -5377,7 +5382,7 @@ Of course one can edit the isolation geometry and delete the isolation for the g
19.10.2018
-- solved some value update bugs in tool_table in Excellon Editor when editing tools followed by deleting another tool,
+- solved some value update bugs in plugin_table in Excellon Editor when editing tools followed by deleting another tool,
and then re-adding the just-deleted tool.
- added support for chaining blocks in DXF Import
- fixed the DXF arc import
@@ -5681,7 +5686,7 @@ saving an Excellon object from editor to FlatCAM, selecting drills by left click
- added awareness for missing coordinates in Gerber parsing. It will try to use the previous coordinates but if there are not any those lines will be ignored and an Warning will be printed in Tcl Shell.
- fixed TCL commands AlignDrillGrid and DrilCncJob
- added TCL script file load_and_run support in GUI
-- made the tool_table in Excellon to automatically adjust the table height depending on the number of rows such that all the rows will be displayed.
+- made the plugin_table in Excellon to automatically adjust the table height depending on the number of rows such that all the rows will be displayed.
- structural changes in the Excellon build_ui()
- icon changes and menu compress
diff --git a/appDatabase.py b/appDatabase.py
index 2ad29bf2..200a4c26 100644
--- a/appDatabase.py
+++ b/appDatabase.py
@@ -1788,7 +1788,7 @@ class ToolsDB2(QtWidgets.QWidget):
dia = dict_val['tooldia']
try:
- # self.add_tool_table_line(row, name=t_name, tooldict=dict_val)
+ # self.add_plugin_table_line(row, name=t_name, tooldict=dict_val)
self.ui.tree_widget.blockSignals(True)
try:
item = self.ui.tree_widget.addParentEditable(
@@ -1800,7 +1800,7 @@ class ToolsDB2(QtWidgets.QWidget):
print('FlatCAMCoomn.ToolDB2.build_db_ui() -> ', str(e))
self.ui.tree_widget.blockSignals(False)
except Exception as e:
- self.app.log.error("ToolDB.build_db_ui.add_tool_table_line() --> %s" % str(e))
+ self.app.log.error("ToolDB.build_db_ui.add_plugin_table_line() --> %s" % str(e))
header = self.ui.tree_widget.header()
header.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
@@ -2096,10 +2096,10 @@ class ToolsDB2(QtWidgets.QWidget):
:return:
"""
for item in self.ui.tree_widget.selectedItems():
- toolname_to_remove = item.data(0, QtCore.Qt.DisplayRole)
+ pluginName_to_remove = item.data(0, QtCore.Qt.DisplayRole)
for toolid, dict_val in list(self.db_tool_dict.items()):
- if int(toolname_to_remove) == int(toolid):
+ if int(pluginName_to_remove) == int(toolid):
# remove from the storage
self.db_tool_dict.pop(toolid, None)
@@ -2692,19 +2692,19 @@ class ToolsDB2(QtWidgets.QWidget):
self.app_ui.plot_tab_area.removeTab(idx)
self.app.inform.emit('%s' % _("Cancelled adding tool from DB."))
- # def resize_new_tool_table_widget(self, min_size, max_size):
+ # def resize_new_plugin_table_widget(self, min_size, max_size):
# """
# Resize the table widget responsible for adding new tool in the Tool Database
#
- # :param min_size: passed by rangeChanged signal or the self.new_tool_table_widget.horizontalScrollBar()
- # :param max_size: passed by rangeChanged signal or the self.new_tool_table_widget.horizontalScrollBar()
+ # :param min_size: passed by rangeChanged signal or the self.new_plugin_table_widget.horizontalScrollBar()
+ # :param max_size: passed by rangeChanged signal or the self.new_plugin_table_widget.horizontalScrollBar()
# :return:
# """
# t_height = self.t_height
# if max_size > min_size:
- # t_height = self.t_height + self.new_tool_table_widget.verticalScrollBar().height()
+ # t_height = self.t_height + self.new_plugin_table_widget.verticalScrollBar().height()
#
- # self.new_tool_table_widget.setMaximumHeight(t_height)
+ # self.new_plugin_table_widget.setMaximumHeight(t_height)
def closeEvent(self, QCloseEvent):
super().closeEvent(QCloseEvent)
@@ -3030,9 +3030,9 @@ class ToolsDB2(QtWidgets.QWidget):
#
# t_name = dict_val['name']
# try:
-# self.add_tool_table_line(row, name=t_name, widget=self.table_widget, tooldict=dict_val)
+# self.add_plugin_table_line(row, name=t_name, widget=self.table_widget, tooldict=dict_val)
# except Exception as e:
-# self.app.log.debug("ToolDB.build_db_ui.add_tool_table_line() --> %s" % str(e))
+# self.app.log.debug("ToolDB.build_db_ui.add_plugin_table_line() --> %s" % str(e))
# vertical_header = self.table_widget.verticalHeader()
# vertical_header.hide()
#
@@ -3054,7 +3054,7 @@ class ToolsDB2(QtWidgets.QWidget):
#
# self.ui_connect()
#
-# def add_tool_table_line(self, row, name, widget, tooldict):
+# def add_plugin_table_line(self, row, name, widget, tooldict):
# data = tooldict['data']
#
# nr_crt = row + 1
@@ -3315,10 +3315,10 @@ class ToolsDB2(QtWidgets.QWidget):
# """
# for model_index in self.table_widget.selectionModel().selectedRows():
# # index = QtCore.QPersistentModelIndex(model_index)
-# toolname_to_remove = self.table_widget.item(model_index.row(), 0).text()
+# pluginName_to_remove = self.table_widget.item(model_index.row(), 0).text()
#
# for toolid, dict_val in list(self.db_tool_dict.items()):
-# if int(toolname_to_remove) == int(toolid):
+# if int(pluginName_to_remove) == int(toolid):
# # remove from the storage
# self.db_tool_dict.pop(toolid, None)
#
@@ -3601,19 +3601,19 @@ class ToolsDB2(QtWidgets.QWidget):
# self.app_ui.plot_tab_area.removeTab(idx)
# self.app.inform.emit('%s' % _("Cancelled adding tool from DB."))
#
-# # def resize_new_tool_table_widget(self, min_size, max_size):
+# # def resize_new_plugin_table_widget(self, min_size, max_size):
# # """
# # Resize the table widget responsible for adding new tool in the Tool Database
# #
-# # :param min_size: passed by rangeChanged signal or the self.new_tool_table_widget.horizontalScrollBar()
-# # :param max_size: passed by rangeChanged signal or the self.new_tool_table_widget.horizontalScrollBar()
+# # :param min_size: passed by rangeChanged signal or the self.new_plugin_table_widget.horizontalScrollBar()
+# # :param max_size: passed by rangeChanged signal or the self.new_plugin_table_widget.horizontalScrollBar()
# # :return:
# # """
# # t_height = self.t_height
# # if max_size > min_size:
-# # t_height = self.t_height + self.new_tool_table_widget.verticalScrollBar().height()
+# # t_height = self.t_height + self.new_plugin_table_widget.verticalScrollBar().height()
# #
-# # self.new_tool_table_widget.setMaximumHeight(t_height)
+# # self.new_plugin_table_widget.setMaximumHeight(t_height)
#
# def closeEvent(self, QCloseEvent):
# super().closeEvent(QCloseEvent)
diff --git a/appEditors/AppExcEditor.py b/appEditors/AppExcEditor.py
index e80072ff..ab01483b 100644
--- a/appEditors/AppExcEditor.py
+++ b/appEditors/AppExcEditor.py
@@ -1339,7 +1339,7 @@ class ResizeEditorExc(FCShapeTool):
dia_on_row = self.draw_app.ui.tools_table_exc.item(row, 1).text()
self.selected_dia_set.add(float(dia_on_row))
- # since we add a new tool, we update also the intial state of the tool_table through it's dictionary
+ # since we add a new tool, we update also the intial state of the plugin_table through it's dictionary
# we add a new entry in the tool2tooldia dict
self.draw_app.tool2tooldia[len(self.draw_app.olddia_newdia)] = new_dia
@@ -1414,9 +1414,9 @@ class ResizeEditorExc(FCShapeTool):
# remove the geometry with the old size
self.current_storage.remove(select_shape)
- # a hack to make the tool_table display less drills per diameter when shape(drill) is deleted
+ # a hack to make the plugin_table display less drills per diameter when shape(drill) is deleted
# self.points_edit it's only useful first time when we load the data into the storage
- # but is still used as reference when building tool_table in self.build_ui()
+ # but is still used as reference when building plugin_table in self.build_ui()
# the number of drills displayed in column 2 is just a len(self.points_edit) therefore
# deleting self.points_edit elements (doesn't matter who but just the number)
# solved the display issue.
@@ -1439,10 +1439,10 @@ class ResizeEditorExc(FCShapeTool):
sel_shapes_to_be_deleted.append(select_shape)
- # a hack to make the tool_table display more drills/slots per diameter when shape(drill/slot)
+ # a hack to make the plugin_table display more drills/slots per diameter when shape(drill/slot)
# is added.
# self.points_edit it's only useful first time when we load the data into the storage
- # but is still used as reference when building tool_table in self.build_ui()
+ # but is still used as reference when building plugin_table in self.build_ui()
# the number of drills displayed in column 2 is just a len(self.points_edit) therefore
# deleting self.points_edit elements (doesn't matter who but just the number)
# solved the display issue.
@@ -1766,7 +1766,7 @@ class AppExcEditor(QtCore.QObject):
# here store the tools dict for the new excellon object
self.new_tools = {}
- # dictionary to store the tool_row and diameters in Tool_table
+ # dictionary to store the tool_row and diameters in plugin_table
# it will be updated everytime self.build_ui() is called
self.olddia_newdia = {}
@@ -1956,7 +1956,7 @@ class AppExcEditor(QtCore.QObject):
self.olddia_newdia.clear()
self.tool2tooldia.clear()
- # update the olddia_newdia dict to make sure we have an updated state of the tool_table
+ # update the olddia_newdia dict to make sure we have an updated state of the plugin_table
for key in self.points_edit:
self.olddia_newdia[key] = key
@@ -2296,7 +2296,7 @@ class AppExcEditor(QtCore.QObject):
"Save and reedit Excellon if you need to add this tool. "))
return
- # since we add a new tool, we update also the initial state of the tool_table through it's dictionary
+ # since we add a new tool, we update also the initial state of the plugin_table through it's dictionary
# we add a new entry in the tool2tooldia dict
self.tool2tooldia[len(self.olddia_newdia)] = tool_dia
@@ -2414,7 +2414,7 @@ class AppExcEditor(QtCore.QObject):
# tool diameter is already in use so we move the drills from the prior tool to the new tool
destination_storage = self.storage_dict[new_dia]
- # since we add a new tool, we update also the intial state of the tool_table through it's dictionary
+ # since we add a new tool, we update also the intial state of the plugin_table through it's dictionary
# we add a new entry in the tool2tooldia dict
self.tool2tooldia[len(self.olddia_newdia)] = new_dia
@@ -3780,9 +3780,9 @@ class AppExcEditor(QtCore.QObject):
if del_shape in self.storage_dict[storage].get_objects():
if isinstance(del_shape.geo, MultiLineString):
self.storage_dict[storage].remove(del_shape)
- # a hack to make the tool_table display less drills per diameter
+ # a hack to make the plugin_table display less drills per diameter
# self.points_edit it's only useful first time when we load the data into the storage
- # but is still used as referecen when building tool_table in self.build_ui()
+ # but is still used as referecen when building plugin_table in self.build_ui()
# the number of drills displayed in column 2 is just a len(self.points_edit) therefore
# deleting self.points_edit elements (doesn't matter who but just the number)
# solved the display issue.
@@ -3806,15 +3806,15 @@ class AppExcEditor(QtCore.QObject):
self.delete_selected()
self.replot()
- def select_tool(self, toolname):
+ def select_tool(self, pluginName):
"""
Selects a drawing tool. Impacts the object and appGUI.
- :param toolname: Name of the tool.
+ :param pluginName: Name of the tool.
:return: None
"""
- self.tools_exc[toolname]["button"].setChecked(True)
- self.on_tool_select(toolname)
+ self.tools_exc[pluginName]["button"].setChecked(True)
+ self.on_tool_select(pluginName)
def set_selected(self, sel_shape):
diff --git a/appEditors/AppGeoEditor.py b/appEditors/AppGeoEditor.py
index 9266e735..0e599f08 100644
--- a/appEditors/AppGeoEditor.py
+++ b/appEditors/AppGeoEditor.py
@@ -54,7 +54,7 @@ class BufferSelectionTool(AppTool):
Simple input for buffer distance.
"""
- toolName = _("Buffer Selection")
+ pluginName = _("Buffer Selection")
def __init__(self, app, draw_app):
AppTool.__init__(self, app)
@@ -63,7 +63,7 @@ class BufferSelectionTool(AppTool):
self.decimals = app.decimals
# Title
- title_label = FCLabel("%s" % ('Editor ' + self.toolName))
+ title_label = FCLabel("%s" % ('Editor ' + self.pluginName))
title_label.setStyleSheet("""
QLabel
{
@@ -144,14 +144,14 @@ class BufferSelectionTool(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.callback_on_close = self.on_tab_close
@@ -222,7 +222,7 @@ class TextInputTool(AppTool):
Simple input for buffer distance.
"""
- toolName = _("Text Input Tool")
+ pluginName = _("Text Input Tool")
def __init__(self, app, draw_app):
AppTool.__init__(self, app)
@@ -244,7 +244,7 @@ class TextInputTool(AppTool):
self.text_tool_frame.setLayout(self.text_tools_box)
# Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
@@ -384,14 +384,14 @@ class TextInputTool(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.callback_on_close = self.on_tab_close
@@ -463,7 +463,7 @@ class PaintOptionsTool(AppTool):
Inputs to specify how to paint the selected polygons.
"""
- toolName = _("Paint Tool")
+ pluginName = _("Paint Tool")
def __init__(self, app, fcdraw):
AppTool.__init__(self, app)
@@ -473,7 +473,7 @@ class PaintOptionsTool(AppTool):
self.decimals = self.app.decimals
# Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
@@ -600,14 +600,14 @@ class PaintOptionsTool(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.callback_on_close = self.on_tab_close
@@ -675,7 +675,7 @@ class TransformEditorTool(AppTool):
Inputs to specify how to paint the selected polygons.
"""
- toolName = _("Transform Tool")
+ pluginName = _("Transform Tool")
rotateName = _("Rotate")
skewName = _("Skew/Shear")
scaleName = _("Scale")
@@ -691,7 +691,7 @@ class TransformEditorTool(AppTool):
self.decimals = self.app.decimals
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
@@ -1095,23 +1095,23 @@ class TransformEditorTool(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.callback_on_close = self.on_tab_close
if toggle:
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName:
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
else:
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
except AttributeError:
pass
@@ -5164,15 +5164,15 @@ class AppGeoEditor(QtCore.QObject):
return storage
- def select_tool(self, toolname):
+ def select_tool(self, pluginName):
"""
Selects a drawing tool. Impacts the object and appGUI.
- :param toolname: Name of the tool.
+ :param pluginName: Name of the tool.
:return: None
"""
- self.tools[toolname]["button"].setChecked(True)
- self.on_tool_select(toolname)
+ self.tools[pluginName]["button"].setChecked(True)
+ self.on_tool_select(pluginName)
def set_selected(self, shape):
diff --git a/appEditors/AppGerberEditor.py b/appEditors/AppGerberEditor.py
index 6bf333a1..4daabde3 100644
--- a/appEditors/AppGerberEditor.py
+++ b/appEditors/AppGerberEditor.py
@@ -3270,7 +3270,7 @@ class AppGerberEditor(QtCore.QObject):
# store here the plot promises, if empty the delayed plot will be activated
self.grb_plot_promises = []
- # dictionary to store the tool_row and aperture codes in Tool_table
+ # dictionary to store the tool_row and aperture codes in plugin_table
# it will be updated everytime self.build_ui() is called
self.oldapcode_newapcode = {}
@@ -3505,7 +3505,7 @@ class AppGerberEditor(QtCore.QObject):
self.oldapcode_newapcode.clear()
self.tid2apcode.clear()
- # update the oldapcode_newapcode dict to make sure we have an updated state of the tool_table
+ # update the oldapcode_newapcode dict to make sure we have an updated state of the plugin_table
for key in self.storage_dict:
self.oldapcode_newapcode[key] = key
@@ -3793,7 +3793,7 @@ class AppGerberEditor(QtCore.QObject):
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Aperture already in the aperture table."))
return
- # since we add a new tool, we update also the initial state of the tool_table through it's dictionary
+ # since we add a new tool, we update also the initial state of the plugin_table through it's dictionary
# we add a new entry in the tid2apcode dict
self.tid2apcode[len(self.oldapcode_newapcode)] = int(ap_code)
@@ -5684,15 +5684,15 @@ class AppGerberEditor(QtCore.QObject):
self.delete_selected()
self.plot_all()
- def select_tool(self, toolname):
+ def select_tool(self, pluginName):
"""
Selects a drawing tool. Impacts the object and appGUI.
- :param toolname: Name of the tool.
+ :param pluginName: Name of the tool.
:return: None
"""
- self.tools_gerber[toolname]["button"].setChecked(True)
- self.on_tool_select(toolname)
+ self.tools_gerber[pluginName]["button"].setChecked(True)
+ self.on_tool_select(pluginName)
def set_selected(self, geo_el):
@@ -6652,7 +6652,7 @@ class TransformEditorTool(AppTool):
Inputs to specify how to paint the selected polygons.
"""
- toolName = _("Transform Tool")
+ pluginName = _("Transform Tool")
rotateName = _("Rotate")
skewName = _("Skew/Shear")
scaleName = _("Scale")
@@ -6668,7 +6668,7 @@ class TransformEditorTool(AppTool):
self.decimals = self.app.decimals
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
@@ -7072,23 +7072,23 @@ class TransformEditorTool(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.callback_on_close = self.on_tab_close
if toggle:
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName:
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
else:
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
except AttributeError:
pass
diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py
index 36f82097..9747a87e 100644
--- a/appGUI/MainGUI.py
+++ b/appGUI/MainGUI.py
@@ -1414,15 +1414,15 @@ class MainGUI(QtWidgets.QMainWindow):
# ########################################################################
# ########################## TOOL Tab # ##################################
# ########################################################################
- self.tool_tab = QtWidgets.QWidget()
- self.tool_tab.setObjectName("tool_tab")
- self.tool_tab_layout = QtWidgets.QVBoxLayout(self.tool_tab)
- self.tool_tab_layout.setContentsMargins(2, 2, 2, 2)
- # self.notebook.addTab(self.tool_tab, _("Tool"))
+ self.plugin_tab = QtWidgets.QWidget()
+ self.plugin_tab.setObjectName("plugin_tab")
+ self.plugin_tab_layout = QtWidgets.QVBoxLayout(self.plugin_tab)
+ self.plugin_tab_layout.setContentsMargins(2, 2, 2, 2)
+ # self.notebook.addTab(self.plugin_tab, _("Tool"))
- self.tool_scroll_area = VerticalScrollArea()
- # self.tool_scroll_area.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
- self.tool_tab_layout.addWidget(self.tool_scroll_area)
+ self.plugin_scroll_area = VerticalScrollArea()
+ # self.plugin_scroll_area.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
+ self.plugin_tab_layout.addWidget(self.plugin_scroll_area)
# ########################################################################
# ########################## RIGHT Widget # ##############################
@@ -3910,7 +3910,7 @@ class MainGUI(QtWidgets.QMainWindow):
elif name == 'properties':
self.notebook.setCurrentWidget(self.properties_tab)
elif name == 'tool':
- self.notebook.setCurrentWidget(self.tool_tab)
+ self.notebook.setCurrentWidget(self.plugin_tab)
def createPopupMenu(self):
menu = super().createPopupMenu()
diff --git a/appObjects/FlatCAMExcellon.py b/appObjects/FlatCAMExcellon.py
index 1de6108d..feadf444 100644
--- a/appObjects/FlatCAMExcellon.py
+++ b/appObjects/FlatCAMExcellon.py
@@ -956,12 +956,12 @@ class ExcellonObject(FlatCAMObj, Excellon):
# ## Add properties to the object
- # get the tool_table items in a list of row items
- tool_table_items = self.get_selected_tools_table_items()
+ # get the plugin_table items in a list of row items
+ plugin_table_items = self.get_selected_tools_table_items()
# insert an information only element in the front
- tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
+ plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
- geo_obj.options['Tools_in_use'] = tool_table_items
+ geo_obj.options['Tools_in_use'] = plugin_table_items
geo_obj.options['type'] = 'Excellon Geometry'
geo_obj.options["tools_mill_tooldia"] = str(tooldia)
geo_obj.options["multidepth"] = app_obj.defaults["geometry_multidepth"]
@@ -1056,12 +1056,12 @@ class ExcellonObject(FlatCAMObj, Excellon):
# ## Add properties to the object
- # get the tool_table items in a list of row items
- tool_table_items = self.get_selected_tools_table_items()
+ # get the plugin_table items in a list of row items
+ plugin_table_items = self.get_selected_tools_table_items()
# insert an information only element in the front
- tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
+ plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
- geo_obj.options['Tools_in_use'] = tool_table_items
+ geo_obj.options['Tools_in_use'] = plugin_table_items
geo_obj.options['type'] = 'Excellon Geometry'
geo_obj.options["tools_mill_tooldia"] = str(tooldia)
geo_obj.options["multidepth"] = app_obj.defaults["geometry_multidepth"]
@@ -1186,7 +1186,7 @@ class ExcellonObject(FlatCAMObj, Excellon):
check_row = 0
for tool_key in self.tools:
- # find the geo_tool_table row associated with the tool_key
+ # find the geo_plugin_table row associated with the tool_key
for row in range(self.ui.tools_table.rowCount()):
tool_item = int(self.ui.tools_table.item(row, 0).text())
if tool_item == int(tool_key):
diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py
index b3e68d2f..d9bf510b 100644
--- a/appObjects/FlatCAMGeometry.py
+++ b/appObjects/FlatCAMGeometry.py
@@ -1149,7 +1149,7 @@ class GeometryObject(FlatCAMObj, Geometry):
return
# #########################################################################################################
- # update the form with the V-Shape fields if V-Shape selected in the geo_tool_table
+ # update the form with the V-Shape fields if V-Shape selected in the geo_plugin_table
# also modify the Cut Z form entry to reflect the calculated Cut Z from values got from V-Shape Fields
# #########################################################################################################
try:
@@ -3386,7 +3386,7 @@ class GeometryObject(FlatCAMObj, Geometry):
for tooluid_key in self.tools:
solid_geometry = self.tools[tooluid_key]['solid_geometry']
- # find the geo_tool_table row associated with the tooluid_key
+ # find the geo_plugin_table row associated with the tooluid_key
for row in range(self.ui.geo_tools_table.rowCount()):
tooluid_item = int(self.ui.geo_tools_table.item(row, 5).text())
if tooluid_item == int(tooluid_key):
diff --git a/appTool.py b/appTool.py
index cfd4c231..cc325a7f 100644
--- a/appTool.py
+++ b/appTool.py
@@ -21,7 +21,7 @@ if '_' not in builtins.__dict__:
class AppTool(QtWidgets.QWidget):
- toolName = "FlatCAM Generic Tool"
+ pluginName = "FlatCAM Generic Tool"
def __init__(self, app, parent=None):
"""
@@ -67,9 +67,9 @@ class AppTool(QtWidgets.QWidget):
# set the text name of the Action, which will be displayed in the menu
if shortcut is None:
- self.menuAction.setText(self.toolName)
+ self.menuAction.setText(self.pluginName)
else:
- self.menuAction.setText(self.toolName + '\t%s' % shortcut)
+ self.menuAction.setText(self.pluginName + '\t%s' % shortcut)
# add a ToolTip to the new Action
# self.menuAction.setToolTip(self.toolTip) # currently not available
@@ -85,22 +85,26 @@ class AppTool(QtWidgets.QWidget):
def run(self):
- if self.app.tool_tab_locked is True:
+ if self.app.plugin_tab_locked is True:
return
# Remove anything else in the appGUI
- self.app.ui.tool_scroll_area.takeWidget()
+ self.app.ui.plugin_scroll_area.takeWidget()
# Put ourselves in the appGUI
- self.app.ui.tool_scroll_area.setWidget(self)
+ self.app.ui.plugin_scroll_area.setWidget(self)
# Switch notebook to tool page
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
# Set the tool name as the widget object name
- self.app.ui.tool_scroll_area.widget().setObjectName(self.toolName)
+ self.app.ui.plugin_scroll_area.widget().setObjectName(self.pluginName)
self.show()
+ def clear_ui(self):
+ for i in reversed(range(self.layout.count())):
+ self.layout.itemAt(i).widget().setParent(None)
+
def draw_tool_selection_shape(self, old_coords, coords, **kwargs):
"""
diff --git a/appTools/ToolAlignObjects.py b/appTools/ToolAlignObjects.py
index 81f3bb15..1c67b2f3 100644
--- a/appTools/ToolAlignObjects.py
+++ b/appTools/ToolAlignObjects.py
@@ -29,7 +29,7 @@ log = logging.getLogger('base')
class AlignObjects(AppTool):
- toolName = _("Align Objects")
+ pluginName = _("Align Objects")
def __init__(self, app):
AppTool.__init__(self, app)
@@ -43,7 +43,7 @@ class AlignObjects(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = AlignUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# Signals
self.ui.align_object_button.clicked.connect(self.on_align)
@@ -87,21 +87,21 @@ class AlignObjects(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -375,7 +375,7 @@ class AlignObjects(AppTool):
class AlignUI:
- toolName = _("Align Objects")
+ pluginName = _("Align Objects")
def __init__(self, layout, app):
self.app = app
@@ -383,7 +383,7 @@ class AlignUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolCalculators.py b/appTools/ToolCalculators.py
index fb8c9b7c..7d165fcb 100644
--- a/appTools/ToolCalculators.py
+++ b/appTools/ToolCalculators.py
@@ -31,7 +31,7 @@ class ToolCalculator(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = CalcUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.units = ''
@@ -54,21 +54,21 @@ class ToolCalculator(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -396,7 +396,7 @@ class ToolCalculator(AppTool):
class CalcUI:
- toolName = _("Calculators")
+ pluginName = _("Calculators")
v_shapeName = _("V-Shape Tool Calculator")
unitsName = _("Units Calculator")
eplateName = _("ElectroPlating Calculator")
@@ -408,7 +408,7 @@ class CalcUI:
self.units = self.app.defaults['units'].lower()
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolCalibration.py b/appTools/ToolCalibration.py
index 3caa7582..cde836d2 100644
--- a/appTools/ToolCalibration.py
+++ b/appTools/ToolCalibration.py
@@ -46,7 +46,7 @@ class ToolCalibration(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = CalibrationUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.mr = None
self.units = ''
@@ -97,21 +97,21 @@ class ToolCalibration(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -745,7 +745,7 @@ class ToolCalibration(AppTool):
class CalibrationUI:
- toolName = _("Calibration")
+ pluginName = _("Calibration")
def __init__(self, layout, app):
self.app = app
@@ -753,7 +753,7 @@ class CalibrationUI:
self.layout = layout
# ## Title
- title_label = QtWidgets.QLabel("%s" % self.toolName)
+ title_label = QtWidgets.QLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolCopperThieving.py b/appTools/ToolCopperThieving.py
index 5f503fa3..7bcb6b8c 100644
--- a/appTools/ToolCopperThieving.py
+++ b/appTools/ToolCopperThieving.py
@@ -49,7 +49,7 @@ class ToolCopperThieving(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = ThievingUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# Objects involved in Copper thieving
self.grb_object = None
@@ -108,21 +108,21 @@ class ToolCopperThieving(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1243,7 +1243,7 @@ class ToolCopperThieving(AppTool):
class ThievingUI:
- toolName = _("Copper Thieving")
+ pluginName = _("Copper Thieving")
def __init__(self, layout, app):
self.app = app
@@ -1252,7 +1252,7 @@ class ThievingUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolCorners.py b/appTools/ToolCorners.py
index fd2bf650..f296a1fc 100644
--- a/appTools/ToolCorners.py
+++ b/appTools/ToolCorners.py
@@ -45,7 +45,7 @@ class ToolCorners(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = CornersUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# Objects involved in Copper thieving
self.grb_object = None
@@ -78,21 +78,21 @@ class ToolCorners(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -635,7 +635,7 @@ class ToolCorners(AppTool):
class CornersUI:
- toolName = _("Corner Markers")
+ pluginName = _("Corner Markers")
def __init__(self, layout, app):
self.app = app
@@ -646,7 +646,7 @@ class CornersUI:
self.layout.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolCutOut.py b/appTools/ToolCutOut.py
index 876488f6..60be53a3 100644
--- a/appTools/ToolCutOut.py
+++ b/appTools/ToolCutOut.py
@@ -47,7 +47,7 @@ class CutOut(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = CutoutUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.cutting_gapsize = 0.0
self.cutting_dia = 0.0
@@ -136,21 +136,21 @@ class CutOut(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -2293,7 +2293,7 @@ class CutOut(AppTool):
class CutoutUI:
- toolName = _("Cutout")
+ pluginName = _("Cutout")
def __init__(self, layout, app):
self.app = app
@@ -2312,7 +2312,7 @@ class CutoutUI:
self.tools_box.addLayout(self.title_box)
# Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolDblSided.py b/appTools/ToolDblSided.py
index c8eb38f2..91deec8b 100644
--- a/appTools/ToolDblSided.py
+++ b/appTools/ToolDblSided.py
@@ -34,7 +34,7 @@ class DblSidedTool(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = DsidedUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.mr = None
@@ -69,21 +69,21 @@ class DblSidedTool(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -604,7 +604,7 @@ class DblSidedTool(AppTool):
class DsidedUI:
- toolName = _("2-Sided")
+ pluginName = _("2-Sided")
def __init__(self, layout, app):
self.app = app
@@ -623,7 +623,7 @@ class DsidedUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolDistance.py b/appTools/ToolDistance.py
index 6bd9374b..8fa2e044 100644
--- a/appTools/ToolDistance.py
+++ b/appTools/ToolDistance.py
@@ -45,7 +45,7 @@ class Distance(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = DistUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# store here the first click and second click of the measurement process
self.points = []
@@ -94,7 +94,7 @@ class Distance(AppTool):
self.tool_done = False
- if self.app.tool_tab_locked is True:
+ if self.app.plugin_tab_locked is True:
return
# if the splitter is hidden, display it
@@ -115,25 +115,25 @@ class Distance(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.setTabText(2, _("Distance"))
# Remove anything else in the appGUI
- self.app.ui.tool_scroll_area.takeWidget()
+ self.app.ui.plugin_scroll_area.takeWidget()
# Put ourselves in the appGUI
- self.app.ui.tool_scroll_area.setWidget(self)
+ self.app.ui.plugin_scroll_area.setWidget(self)
# Switch notebook to tool page
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.units = self.app.defaults['units'].lower()
self.app.command_active = "Distance"
@@ -554,7 +554,7 @@ class Distance(AppTool):
class DistUI:
- toolName = _("Distance")
+ pluginName = _("Distance")
def __init__(self, layout, app):
self.app = app
@@ -563,7 +563,7 @@ class DistUI:
self.units = self.app.defaults['units'].lower()
# ## Title
- title_label = FCLabel("%s
" % self.toolName)
+ title_label = FCLabel("%s
" % self.pluginName)
self.layout.addWidget(title_label)
# ## Form Layout
diff --git a/appTools/ToolDistanceMin.py b/appTools/ToolDistanceMin.py
index 27a6848b..7cf507a2 100644
--- a/appTools/ToolDistanceMin.py
+++ b/appTools/ToolDistanceMin.py
@@ -40,7 +40,7 @@ class DistanceMin(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = DistMinUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.h_point = (0, 0)
@@ -50,7 +50,7 @@ class DistanceMin(AppTool):
def run(self, toggle=False):
self.app.defaults.report_usage("ToolDistanceMin()")
- if self.app.tool_tab_locked is True:
+ if self.app.plugin_tab_locked is True:
return
# if the splitter is hidden, display it
@@ -71,25 +71,25 @@ class DistanceMin(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.app.ui.notebook.setTabText(2, _("Minimum Distance"))
# Remove anything else in the appGUI
- self.app.ui.tool_scroll_area.takeWidget()
+ self.app.ui.plugin_scroll_area.takeWidget()
# Put oneself in the appGUI
- self.app.ui.tool_scroll_area.setWidget(self)
+ self.app.ui.plugin_scroll_area.setWidget(self)
# Switch notebook to tool page
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
self.units = self.app.defaults['units'].lower()
@@ -230,7 +230,7 @@ class DistanceMin(AppTool):
class DistMinUI:
- toolName = _("Minimum Distance")
+ pluginName = _("Minimum Distance")
def __init__(self, layout, app):
self.app = app
@@ -239,7 +239,7 @@ class DistMinUI:
self.units = self.app.defaults['units'].lower()
# ## Title
- title_label = FCLabel("%s
" % self.toolName)
+ title_label = FCLabel("%s
" % self.pluginName)
self.layout.addWidget(title_label)
# ## Grid Layout
diff --git a/appTools/ToolDrilling.py b/appTools/ToolDrilling.py
index 8b072069..c840a578 100644
--- a/appTools/ToolDrilling.py
+++ b/appTools/ToolDrilling.py
@@ -51,8 +51,8 @@ class ToolDrilling(AppTool, Excellon):
# #############################################################################
# ######################### Tool GUI ##########################################
# #############################################################################
- self.ui = DrillingUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.ui = None
+ self.pluginName = _("Drilling")
# #############################################################################
# ########################## VARIABLES ########################################
@@ -124,80 +124,11 @@ class ToolDrilling(AppTool, Excellon):
# Tools Database
self.tools_db_dict = None
- self.tool_form_fields = {
- "tools_drill_cutz": self.ui.cutz_entry,
- "tools_drill_multidepth": self.ui.mpass_cb,
- "tools_drill_depthperpass": self.ui.maxdepth_entry,
- "tools_drill_travelz": self.ui.travelz_entry,
- "tools_drill_feedrate_z": self.ui.feedrate_z_entry,
- "tools_drill_feedrate_rapid": self.ui.feedrate_rapid_entry,
+ self.tool_form_fields = {}
- "tools_drill_spindlespeed": self.ui.spindlespeed_entry,
- "tools_drill_dwell": self.ui.dwell_cb,
- "tools_drill_dwelltime": self.ui.dwelltime_entry,
+ self.general_form_fields = {}
- "tools_drill_offset": self.ui.offset_entry,
-
- "tools_drill_drill_slots": self.ui.drill_slots_cb,
- "tools_drill_drill_overlap": self.ui.drill_overlap_entry,
- "tools_drill_last_drill": self.ui.last_drill_cb,
- }
-
- self.general_form_fields = {
- "tools_drill_toolchange": self.ui.toolchange_cb,
- "tools_drill_toolchangez": self.ui.toolchangez_entry,
- "tools_drill_startz": self.ui.estartz_entry,
-
- "tools_drill_endz": self.ui.endz_entry,
- "tools_drill_endxy": self.ui.endxy_entry,
-
- "tools_drill_z_pdepth": self.ui.pdepth_entry,
- "tools_drill_feedrate_probe": self.ui.feedrate_probe_entry,
-
- "tools_drill_ppname_e": self.ui.pp_excellon_name_cb,
-
- "tools_drill_area_exclusion": self.ui.exclusion_cb,
- "tools_drill_area_strategy": self.ui.strategy_radio,
- "tools_drill_area_overz": self.ui.over_z_entry,
- "tools_drill_area_shape": self.ui.area_shape_radio
- }
-
- self.name2option = {
- "e_cutz": "tools_drill_cutz",
- "e_multidepth": "tools_drill_multidepth",
- "e_depthperpass": "tools_drill_depthperpass",
- "e_travelz": "tools_drill_travelz",
- "e_feedratez": "tools_drill_feedrate_z",
- "e_fr_rapid": "tools_drill_feedrate_rapid",
-
- "e_spindlespeed": "tools_drill_spindlespeed",
- "e_dwell": "tools_drill_dwell",
- "e_dwelltime": "tools_drill_dwelltime",
-
- "e_offset": "tools_drill_offset",
-
- "e_drill_slots": "tools_drill_drill_slots",
- "e_drill_slots_overlap": "tools_drill_drill_overlap",
- "e_drill_last_drill": "tools_drill_last_drill",
-
- # General Parameters
- "e_toolchange": "tools_drill_toolchange",
- "e_toolchangez": "tools_drill_toolchangez",
- "e_startz": "tools_drill_startz",
-
- "e_endz": "tools_drill_endz",
- "e_endxy": "tools_drill_endxy",
-
- "e_depth_probe": "tools_drill_z_pdepth",
- "e_fr_probe": "tools_drill_feedrate_probe",
-
- "e_pp": "tools_drill_ppname_e",
-
- "e_area_exclusion": "tools_drill_area_exclusion",
- "e_area_strategy": "tools_drill_area_strategy",
- "e_area_overz": "tools_drill_area_overz",
- "e_area_shape": "tools_drill_area_shape",
- }
+ self.name2option = {}
self.poly_drawn = False
@@ -216,21 +147,21 @@ class ToolDrilling(AppTool, Excellon):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -371,12 +302,14 @@ class ToolDrilling(AppTool, Excellon):
def unset_context_menu(self):
self.ui.exclusion_table.removeContextMenu()
+ def init_ui(self):
+ self.ui = DrillingUI(layout=self.layout, app=self.app, name=self.pluginName)
+
def set_tool_ui(self):
self.units = self.app.defaults['units'].upper()
- if self.ui is None:
- self.ui = DrillingUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.clear_ui()
+ self.init_ui()
self.disconnect_main_signals()
self.connect_main_signals()
@@ -399,6 +332,81 @@ class ToolDrilling(AppTool, Excellon):
self.app.log.error("ToolDrilling -> Loaded Excellon object error. %s" % str(err))
return
+ self.tool_form_fields.update({
+ "tools_drill_cutz": self.ui.cutz_entry,
+ "tools_drill_multidepth": self.ui.mpass_cb,
+ "tools_drill_depthperpass": self.ui.maxdepth_entry,
+ "tools_drill_travelz": self.ui.travelz_entry,
+ "tools_drill_feedrate_z": self.ui.feedrate_z_entry,
+ "tools_drill_feedrate_rapid": self.ui.feedrate_rapid_entry,
+
+ "tools_drill_spindlespeed": self.ui.spindlespeed_entry,
+ "tools_drill_dwell": self.ui.dwell_cb,
+ "tools_drill_dwelltime": self.ui.dwelltime_entry,
+
+ "tools_drill_offset": self.ui.offset_entry,
+
+ "tools_drill_drill_slots": self.ui.drill_slots_cb,
+ "tools_drill_drill_overlap": self.ui.drill_overlap_entry,
+ "tools_drill_last_drill": self.ui.last_drill_cb,
+ })
+
+ self.general_form_fields.update({
+ "tools_drill_toolchange": self.ui.toolchange_cb,
+ "tools_drill_toolchangez": self.ui.toolchangez_entry,
+ "tools_drill_startz": self.ui.estartz_entry,
+
+ "tools_drill_endz": self.ui.endz_entry,
+ "tools_drill_endxy": self.ui.endxy_entry,
+
+ "tools_drill_z_pdepth": self.ui.pdepth_entry,
+ "tools_drill_feedrate_probe": self.ui.feedrate_probe_entry,
+
+ "tools_drill_ppname_e": self.ui.pp_excellon_name_cb,
+
+ "tools_drill_area_exclusion": self.ui.exclusion_cb,
+ "tools_drill_area_strategy": self.ui.strategy_radio,
+ "tools_drill_area_overz": self.ui.over_z_entry,
+ "tools_drill_area_shape": self.ui.area_shape_radio
+ })
+
+ self.name2option.update({
+ "e_cutz": "tools_drill_cutz",
+ "e_multidepth": "tools_drill_multidepth",
+ "e_depthperpass": "tools_drill_depthperpass",
+ "e_travelz": "tools_drill_travelz",
+ "e_feedratez": "tools_drill_feedrate_z",
+ "e_fr_rapid": "tools_drill_feedrate_rapid",
+
+ "e_spindlespeed": "tools_drill_spindlespeed",
+ "e_dwell": "tools_drill_dwell",
+ "e_dwelltime": "tools_drill_dwelltime",
+
+ "e_offset": "tools_drill_offset",
+
+ "e_drill_slots": "tools_drill_drill_slots",
+ "e_drill_slots_overlap": "tools_drill_drill_overlap",
+ "e_drill_last_drill": "tools_drill_last_drill",
+
+ # General Parameters
+ "e_toolchange": "tools_drill_toolchange",
+ "e_toolchangez": "tools_drill_toolchangez",
+ "e_startz": "tools_drill_startz",
+
+ "e_endz": "tools_drill_endz",
+ "e_endxy": "tools_drill_endxy",
+
+ "e_depth_probe": "tools_drill_z_pdepth",
+ "e_fr_probe": "tools_drill_feedrate_probe",
+
+ "e_pp": "tools_drill_ppname_e",
+
+ "e_area_exclusion": "tools_drill_area_exclusion",
+ "e_area_strategy": "tools_drill_area_strategy",
+ "e_area_overz": "tools_drill_area_overz",
+ "e_area_shape": "tools_drill_area_shape",
+ })
+
# reset the Excellon preprocessor combo
self.ui.pp_excellon_name_cb.clear()
# populate Excellon preprocessor combobox list
@@ -2037,13 +2045,13 @@ class ToolDrilling(AppTool, Excellon):
job_obj.pp_excellon_name = self.ui.pp_excellon_name_cb.get_value()
job_obj.pp_excellon = self.app.preprocessors[job_obj.pp_excellon_name]
- # get the tool_table items in a list of row items
- tool_table_items = self.get_selected_tools_table_items()
+ # get the plugin_table items in a list of row items
+ plugin_table_items = self.get_selected_tools_table_items()
# insert an information only element in the front
- tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
+ plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
# ## Add properties to the object
- job_obj.options['Tools_in_use'] = tool_table_items
+ job_obj.options['Tools_in_use'] = plugin_table_items
job_obj.options['type'] = 'Excellon'
job_obj.options['ppname_e'] = obj.pp_excellon_name
@@ -2096,7 +2104,7 @@ class ToolDrilling(AppTool, Excellon):
job_obj.tool = str(used_tool)
job_obj.postdata['toolC'] = used_tooldia
- # reconstitute the tool_table_items to hold the total number of drills and slots since we are going to
+ # reconstitute the plugin_table_items to hold the total number of drills and slots since we are going to
# process all in one go with no toolchange and with only one tool
nr_drills = 0
nr_slots = 0
@@ -2108,10 +2116,10 @@ class ToolDrilling(AppTool, Excellon):
nr_slots += int(job_obj.exc_cnc_tools[e_tool_dia]['nr_slots'])
total_solid_geo += job_obj.exc_cnc_tools[e_tool_dia]['solid_geometry']
- tool_table_items.clear()
- tool_table_items = [[str(used_tool), str(used_tooldia), str(nr_drills), str(nr_slots)]]
- tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
- job_obj.options['Tools_in_use'] = tool_table_items
+ plugin_table_items.clear()
+ plugin_table_items = [[str(used_tool), str(used_tooldia), str(nr_drills), str(nr_slots)]]
+ plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
+ job_obj.options['Tools_in_use'] = plugin_table_items
# generate GCode
tool_gcode, __, start_gcode = job_obj.excellon_tool_gcode_gen(used_tool, tool_points,
@@ -2262,9 +2270,7 @@ class ToolDrilling(AppTool, Excellon):
class DrillingUI:
- toolName = _("Drilling")
-
- def __init__(self, layout, app):
+ def __init__(self, layout, app, name):
self.app = app
self.decimals = self.app.decimals
self.layout = layout
@@ -2280,7 +2286,7 @@ class DrillingUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = QtWidgets.QLabel("%s" % self.toolName)
+ title_label = QtWidgets.QLabel("%s" % name)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolEtchCompensation.py b/appTools/ToolEtchCompensation.py
index 155ad387..ad0ec108 100644
--- a/appTools/ToolEtchCompensation.py
+++ b/appTools/ToolEtchCompensation.py
@@ -39,7 +39,7 @@ class ToolEtchCompensation(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = EtchUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.ui.compensate_btn.clicked.connect(self.on_compensate)
self.ui.reset_button.clicked.connect(self.set_tool_ui)
@@ -63,21 +63,21 @@ class ToolEtchCompensation(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -266,7 +266,7 @@ class ToolEtchCompensation(AppTool):
class EtchUI:
- toolName = _("Etch Compensation")
+ pluginName = _("Etch Compensation")
def __init__(self, layout, app):
self.app = app
@@ -281,7 +281,7 @@ class EtchUI:
self.tools_frame.setLayout(self.tools_box)
# Title
- title_label = QtWidgets.QLabel("%s" % self.toolName)
+ title_label = QtWidgets.QLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolExtract.py b/appTools/ToolExtract.py
index d598d1a7..0e21c539 100644
--- a/appTools/ToolExtract.py
+++ b/appTools/ToolExtract.py
@@ -41,7 +41,7 @@ class ToolExtract(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = ExtractUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# ## Signals
self.ui.hole_size_radio.activated_custom.connect(self.on_hole_size_toggle)
@@ -126,21 +126,21 @@ class ToolExtract(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -874,7 +874,7 @@ class ToolExtract(AppTool):
class ExtractUI:
- toolName = _("Extract")
+ pluginName = _("Extract")
def __init__(self, layout, app):
self.app = app
@@ -882,7 +882,7 @@ class ExtractUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolFiducials.py b/appTools/ToolFiducials.py
index b2dd1e1e..6429733f 100644
--- a/appTools/ToolFiducials.py
+++ b/appTools/ToolFiducials.py
@@ -44,7 +44,7 @@ class ToolFiducials(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = FidoUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# Objects involved in Copper thieving
self.grb_object = None
@@ -102,21 +102,21 @@ class ToolFiducials(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -744,7 +744,7 @@ class ToolFiducials(AppTool):
class FidoUI:
- toolName = _("Fiducials")
+ pluginName = _("Fiducials")
def __init__(self, layout, app):
self.app = app
@@ -755,7 +755,7 @@ class FidoUI:
self.layout.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolFilm.py b/appTools/ToolFilm.py
index 2336b066..2c91b201 100644
--- a/appTools/ToolFilm.py
+++ b/appTools/ToolFilm.py
@@ -52,7 +52,7 @@ class Film(AppTool):
# ######################################## Tool GUI ###########################################################
# #############################################################################################################
self.ui = FilmUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #############################################################################################################
# ##################################### Signals ########################################################
@@ -104,21 +104,21 @@ class Film(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1078,7 +1078,7 @@ class Film(AppTool):
class FilmUI:
- toolName = _("Film")
+ pluginName = _("Film")
def __init__(self, layout, app):
self.app = app
@@ -1096,7 +1096,7 @@ class FilmUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolFollow.py b/appTools/ToolFollow.py
index 7a95d530..fdd0631c 100644
--- a/appTools/ToolFollow.py
+++ b/appTools/ToolFollow.py
@@ -47,7 +47,7 @@ class ToolFollow(AppTool, Gerber):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = FollowUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# disconnect flags
self.area_sel_disconnect_flag = False
@@ -91,21 +91,21 @@ class ToolFollow(AppTool, Gerber):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -647,7 +647,7 @@ class ToolFollow(AppTool, Gerber):
class FollowUI:
- toolName = _("Follow")
+ pluginName = _("Follow")
def __init__(self, layout, app):
self.app = app
@@ -665,7 +665,7 @@ class FollowUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolImage.py b/appTools/ToolImage.py
index 59c13c25..d7ad124d 100644
--- a/appTools/ToolImage.py
+++ b/appTools/ToolImage.py
@@ -33,7 +33,7 @@ class ToolImage(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = ImageUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# ## Signals
self.ui.import_button.clicked.connect(self.on_file_importimage)
@@ -50,21 +50,21 @@ class ToolImage(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -187,7 +187,7 @@ class ToolImage(AppTool):
class ImageUI:
- toolName = _("Image Import")
+ pluginName = _("Image Import")
def __init__(self, layout, app):
self.app = app
@@ -195,7 +195,7 @@ class ImageUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolInvertGerber.py b/appTools/ToolInvertGerber.py
index 97ad54d7..d54bc9f1 100644
--- a/appTools/ToolInvertGerber.py
+++ b/appTools/ToolInvertGerber.py
@@ -38,7 +38,7 @@ class ToolInvertGerber(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = InvertUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.ui.invert_btn.clicked.connect(self.on_grb_invert)
self.ui.reset_button.clicked.connect(self.set_tool_ui)
@@ -58,21 +58,21 @@ class ToolInvertGerber(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -187,7 +187,7 @@ class ToolInvertGerber(AppTool):
class InvertUI:
- toolName = _("Invert Gerber")
+ pluginName = _("Invert Gerber")
def __init__(self, layout, app):
self.app = app
@@ -195,7 +195,7 @@ class InvertUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolIsolation.py b/appTools/ToolIsolation.py
index 7bea4a05..44696e9e 100644
--- a/appTools/ToolIsolation.py
+++ b/appTools/ToolIsolation.py
@@ -51,7 +51,7 @@ class ToolIsolation(AppTool, Gerber):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = IsoUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #############################################################################
# ###################### Setup CONTEXT MENU ###################################
@@ -164,21 +164,21 @@ class ToolIsolation(AppTool, Gerber):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -3144,7 +3144,7 @@ class ToolIsolation(AppTool, Gerber):
class IsoUI:
- toolName = _("Isolation")
+ pluginName = _("Isolation")
def __init__(self, layout, app):
self.app = app
@@ -3162,7 +3162,7 @@ class IsoUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolLevelling.py b/appTools/ToolLevelling.py
index b35ae64e..67189079 100644
--- a/appTools/ToolLevelling.py
+++ b/appTools/ToolLevelling.py
@@ -69,7 +69,7 @@ class ToolLevelling(AppTool, CNCjob):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = LevelUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# updated in the self.set_tool_ui()
self.form_fields = {}
@@ -139,21 +139,21 @@ class ToolLevelling(AppTool, CNCjob):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1637,7 +1637,7 @@ class ToolLevelling(AppTool, CNCjob):
class LevelUI:
- toolName = _("Levelling")
+ pluginName = _("Levelling")
def __init__(self, layout, app):
self.app = app
@@ -1655,7 +1655,7 @@ class LevelUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolMilling.py b/appTools/ToolMilling.py
index 5ef836d7..1cc2f4a3 100644
--- a/appTools/ToolMilling.py
+++ b/appTools/ToolMilling.py
@@ -55,8 +55,8 @@ class ToolMilling(AppTool, Excellon):
# #############################################################################
# ######################### Tool GUI ##########################################
# #############################################################################
- self.ui = MillingUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.ui = None
+ self.pluginName = _("Milling")
# #############################################################################
# ########################## VARIABLES ########################################
@@ -146,21 +146,21 @@ class ToolMilling(AppTool, Excellon):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -176,6 +176,7 @@ class ToolMilling(AppTool, Excellon):
self.app.ui.splitter.setSizes([1, 1])
AppTool.run(self)
+
self.set_tool_ui()
# reset those objects on a new run
@@ -399,13 +400,15 @@ class ToolMilling(AppTool, Excellon):
def unset_context_menu(self):
self.ui.geo_tools_table.removeContextMenu()
+ def init_ui(self):
+ self.ui = MillingUI(layout=self.layout, app=self.app, name=self.pluginName)
+
def set_tool_ui(self):
self.units = self.app.defaults['units'].upper()
self.old_tool_dia = self.app.defaults["tools_iso_newdia"]
- if self.ui is None:
- self.ui = MillingUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.clear_ui()
+ self.init_ui()
self.unset_context_menu()
self.set_context_menu()
@@ -486,10 +489,6 @@ class ToolMilling(AppTool, Excellon):
# Fill form fields
self.to_form()
- # Show/Hide Advanced Options
- app_mode = self.app.defaults["global_app_level"]
- self.change_level(app_mode)
-
# # Show/Hide Advanced Options
# if app_mode == 'b':
# self.ui.level.setText('%s' % _('Beginner'))
@@ -637,6 +636,10 @@ class ToolMilling(AppTool, Excellon):
# handle the Plot checkbox
self.plot_cb_handler()
+ # Show/Hide Advanced Options
+ app_mode = self.app.defaults["global_app_level"]
+ self.change_level(app_mode)
+
def plot_cb_handler(self):
# load the Milling object
self.obj_name = self.ui.object_combo.currentText()
@@ -658,7 +661,8 @@ class ToolMilling(AppTool, Excellon):
self.ui.plot_cb.set_value(self.target_obj.options['plot'])
def on_plot_clicked(self, state):
- self.target_obj.options['plot'] = True if state else False
+ if self.target_obj:
+ self.target_obj.options['plot'] = True if state else False
def change_level(self, level):
"""
@@ -1298,8 +1302,11 @@ class ToolMilling(AppTool, Excellon):
if self.target_obj is None:
self.ui.param_frame.setDisabled(True)
+ self.ui.plot_cb.setDisabled(True)
else:
self.ui.param_frame.setDisabled(False)
+ self.ui.plot_cb.setDisabled(False)
+
self.obj_tools = self.target_obj.tools
# set the object as active so the Properties is populated by whatever object is selected
if self.obj_name and self.obj_name != '':
@@ -1582,11 +1589,11 @@ class ToolMilling(AppTool, Excellon):
sel_rows = set()
if self.ui.target_radio.get_value() == 'exc':
- tool_table = self.ui.tools_table
+ plugin_table = self.ui.tools_table
else:
- tool_table = self.ui.geo_tools_table
+ plugin_table = self.ui.geo_tools_table
- table_items = tool_table.selectedItems()
+ table_items = plugin_table.selectedItems()
if table_items:
for it in table_items:
sel_rows.add(it.row())
@@ -1604,7 +1611,7 @@ class ToolMilling(AppTool, Excellon):
if len(sel_rows) == 1:
# update the QLabel that shows for which Tool we have the parameters in the UI form
- tooluid = int(tool_table.item(list(sel_rows)[0], 0).text())
+ tooluid = int(plugin_table.item(list(sel_rows)[0], 0).text())
self.ui.tool_data_label.setText(
"%s: %s %d" % (_('Parameters for'), _("Tool"), tooluid)
)
@@ -1628,7 +1635,7 @@ class ToolMilling(AppTool, Excellon):
current_row = sel_rows[-1]
# #########################################################################################################
- # update the form with the V-Shape fields if V-Shape selected in the geo_tool_table
+ # update the form with the V-Shape fields if V-Shape selected in the geo_plugin_table
# also modify the Cut Z form entry to reflect the calculated Cut Z from values got from V-Shape Fields
# #########################################################################################################
try:
@@ -1647,7 +1654,7 @@ class ToolMilling(AppTool, Excellon):
for c_row in sel_rows:
# populate the form with the data from the tool associated with the row parameter
try:
- item = tool_table.item(c_row, 3)
+ item = plugin_table.item(c_row, 3)
if type(item) is not None:
tooluid = item.text()
if self.ui.target_radio.get_value() == 'geo':
@@ -2502,12 +2509,12 @@ class ToolMilling(AppTool, Excellon):
# ## Add properties to the object
- # get the tool_table items in a list of row items
- tool_table_items = self.get_selected_tools_table_items()
+ # get the plugin_table items in a list of row items
+ plugin_table_items = self.get_selected_tools_table_items()
# insert an information only element in the front
- tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
+ plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
- geo_obj.options['Tools_in_use'] = tool_table_items
+ geo_obj.options['Tools_in_use'] = plugin_table_items
geo_obj.options['type'] = 'Excellon Geometry'
geo_obj.options["tools_mill_tooldia"] = str(tooldia)
geo_obj.options["tools_mill_multidepth"] = self.target_obj.options["tools_mill_multidepth"]
@@ -2606,12 +2613,12 @@ class ToolMilling(AppTool, Excellon):
app_obj.inform.emit(_("Generating slot milling geometry..."))
# ## Add properties to the object
- # get the tool_table items in a list of row items
- tool_table_items = self.get_selected_tools_table_items()
+ # get the plugin_table items in a list of row items
+ plugin_table_items = self.get_selected_tools_table_items()
# insert an information only element in the front
- tool_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
+ plugin_table_items.insert(0, [_("Tool_nr"), _("Diameter"), _("Drills_Nr"), _("Slots_Nr")])
- geo_obj.options['Tools_in_use'] = tool_table_items
+ geo_obj.options['Tools_in_use'] = plugin_table_items
geo_obj.options['type'] = 'Excellon Geometry'
geo_obj.options["tools_mill_tooldia"] = str(tooldia)
geo_obj.options["tools_mill_multidepth"] = self.target_obj.options["tools_mill_multidepth"]
@@ -3339,7 +3346,7 @@ class ToolMilling(AppTool, Excellon):
for tooluid_key in self.target_obj.tools:
solid_geometry = self.target_obj.tools[tooluid_key]['solid_geometry']
- # find the geo_tool_table row associated with the tooluid_key
+ # find the geo_plugin_table row associated with the tooluid_key
for row in range(self.ui.geo_tools_table.rowCount()):
tooluid_item = int(self.ui.geo_tools_table.item(row, 3).text())
if tooluid_item == int(tooluid_key):
@@ -3566,9 +3573,7 @@ class ToolMilling(AppTool, Excellon):
class MillingUI:
- toolName = _("Milling")
-
- def __init__(self, layout, app):
+ def __init__(self, layout, app, name):
self.app = app
self.decimals = self.app.decimals
self.layout = layout
@@ -3584,7 +3589,7 @@ class MillingUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % name)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolMove.py b/appTools/ToolMove.py
index 54e8cfef..d3c87eab 100644
--- a/appTools/ToolMove.py
+++ b/appTools/ToolMove.py
@@ -24,7 +24,7 @@ log = logging.getLogger('base')
class ToolMove(AppTool):
- toolName = _("Move")
+ pluginName = _("Move")
replot_signal = QtCore.pyqtSignal(list)
def __init__(self, app):
@@ -65,7 +65,7 @@ class ToolMove(AppTool):
def run(self, toggle):
self.app.defaults.report_usage("ToolMove()")
- if self.app.tool_tab_locked is True:
+ if self.app.plugin_tab_locked is True:
return
self.toggle()
diff --git a/appTools/ToolNCC.py b/appTools/ToolNCC.py
index ab9371d8..de44420f 100644
--- a/appTools/ToolNCC.py
+++ b/appTools/ToolNCC.py
@@ -53,7 +53,7 @@ class NonCopperClear(AppTool, Gerber):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = NccUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #############################################################################
# ###################### Setup CONTEXT MENU ###################################
@@ -173,21 +173,21 @@ class NonCopperClear(AppTool, Gerber):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -4077,7 +4077,7 @@ class NonCopperClear(AppTool, Gerber):
class NccUI:
- toolName = _("NCC")
+ pluginName = _("NCC")
def __init__(self, layout, app):
self.app = app
@@ -4095,7 +4095,7 @@ class NccUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolOptimal.py b/appTools/ToolOptimal.py
index d8f1bd37..7ed7a511 100644
--- a/appTools/ToolOptimal.py
+++ b/appTools/ToolOptimal.py
@@ -44,7 +44,7 @@ class ToolOptimal(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = OptimalUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# this is the line selected in the textbox with the locations of the minimum
self.selected_text = ''
@@ -86,21 +86,21 @@ class ToolOptimal(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -405,7 +405,7 @@ class ToolOptimal(AppTool):
class OptimalUI:
- toolName = _("Find Optimal")
+ pluginName = _("Find Optimal")
def __init__(self, layout, app):
self.app = app
@@ -414,7 +414,7 @@ class OptimalUI:
self.units = self.app.defaults['units'].upper()
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolPDF.py b/appTools/ToolPDF.py
index 4ca6681a..8634b2f8 100644
--- a/appTools/ToolPDF.py
+++ b/appTools/ToolPDF.py
@@ -41,7 +41,7 @@ class ToolPDF(AppTool):
Reference here: https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference.pdf
Return a list of geometries
"""
- toolName = _("PDF Import Tool")
+ pluginName = _("PDF Import Tool")
def __init__(self, app):
AppTool.__init__(self, app)
diff --git a/appTools/ToolPaint.py b/appTools/ToolPaint.py
index 61be83b6..1eba9f9e 100644
--- a/appTools/ToolPaint.py
+++ b/appTools/ToolPaint.py
@@ -52,7 +52,7 @@ class ToolPaint(AppTool, Gerber):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = PaintUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #############################################################################
# ########################## VARIABLES ########################################
@@ -207,21 +207,21 @@ class ToolPaint(AppTool, Gerber):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -2879,7 +2879,7 @@ class ToolPaint(AppTool, Gerber):
class PaintUI:
- toolName = _("Paint")
+ pluginName = _("Paint")
def __init__(self, layout, app):
self.app = app
@@ -2898,7 +2898,7 @@ class PaintUI:
self.tools_box.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolPanelize.py b/appTools/ToolPanelize.py
index 8ad6f591..0b05a81b 100644
--- a/appTools/ToolPanelize.py
+++ b/appTools/ToolPanelize.py
@@ -33,7 +33,7 @@ log = logging.getLogger('base')
class Panelize(AppTool):
- toolName = _("Panelize PCB")
+ pluginName = _("Panelize PCB")
def __init__(self, app):
AppTool.__init__(self, app)
@@ -44,7 +44,7 @@ class Panelize(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = PanelizeUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #############################################################################
# ############################ SIGNALS ########################################
@@ -79,21 +79,21 @@ class Panelize(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1058,7 +1058,7 @@ class Panelize(AppTool):
class PanelizeUI:
- toolName = _("Panelization")
+ pluginName = _("Panelization")
def __init__(self, layout, app):
self.app = app
@@ -1069,7 +1069,7 @@ class PanelizeUI:
self.layout.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolPcbWizard.py b/appTools/ToolPcbWizard.py
index e5d63aa4..a9a4a53a 100644
--- a/appTools/ToolPcbWizard.py
+++ b/appTools/ToolPcbWizard.py
@@ -38,7 +38,7 @@ class PcbWizard(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = WizardUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.excellon_loaded = False
self.inf_loaded = False
@@ -76,21 +76,21 @@ class PcbWizard(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -377,7 +377,7 @@ class PcbWizard(AppTool):
class WizardUI:
- toolName = _("PcbWizard Import")
+ pluginName = _("PcbWizard Import")
def __init__(self, layout, app):
self.app = app
@@ -385,7 +385,7 @@ class WizardUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolProperties.py b/appTools/ToolProperties.py
index e016f067..792420a9 100644
--- a/appTools/ToolProperties.py
+++ b/appTools/ToolProperties.py
@@ -28,7 +28,7 @@ log = logging.getLogger('base')
class Properties(AppTool):
- toolName = _("Properties")
+ pluginName = _("Properties")
calculations_finished = QtCore.pyqtSignal(float, float, float, float, float, object)
@@ -49,7 +49,7 @@ class Properties(AppTool):
self.properties_frame.setLayout(self.properties_box)
# ## Title
- # title_label = QtWidgets.QLabel("%s" % self.toolName)
+ # title_label = QtWidgets.QLabel("%s" % self.pluginName)
# title_label.setStyleSheet("""
# QLabel
# {
@@ -71,7 +71,7 @@ class Properties(AppTool):
def run(self, toggle=True):
self.app.defaults.report_usage("ToolProperties()")
- if self.app.tool_tab_locked is True:
+ if self.app.plugin_tab_locked is True:
return
if toggle:
@@ -82,21 +82,21 @@ class Properties(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
diff --git a/appTools/ToolPunchGerber.py b/appTools/ToolPunchGerber.py
index a2609ff6..a329e29a 100644
--- a/appTools/ToolPunchGerber.py
+++ b/appTools/ToolPunchGerber.py
@@ -70,7 +70,7 @@ class ToolPunchGerber(AppTool, Gerber):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = PunchUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #############################################################################
# ############################ SIGNALS ########################################
@@ -157,21 +157,21 @@ class ToolPunchGerber(AppTool, Gerber):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1936,7 +1936,7 @@ class ToolPunchGerber(AppTool, Gerber):
class PunchUI:
- toolName = _("Punch Gerber")
+ pluginName = _("Punch Gerber")
def __init__(self, layout, app):
self.app = app
@@ -1947,7 +1947,7 @@ class PunchUI:
self.layout.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolQRCode.py b/appTools/ToolQRCode.py
index 5271a061..ce9f732f 100644
--- a/appTools/ToolQRCode.py
+++ b/appTools/ToolQRCode.py
@@ -53,7 +53,7 @@ class QRCode(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = QRcodeUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.grb_object = None
self.box_poly = None
@@ -99,21 +99,21 @@ class QRCode(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -703,7 +703,7 @@ class QRCode(AppTool):
class QRcodeUI:
- toolName = _("QRCode")
+ pluginName = _("QRCode")
def __init__(self, layout, app):
self.app = app
@@ -714,7 +714,7 @@ class QRcodeUI:
self.layout.addLayout(self.title_box)
# ## Title
- title_label = QtWidgets.QLabel("%s" % self.toolName)
+ title_label = QtWidgets.QLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolRulesCheck.py b/appTools/ToolRulesCheck.py
index b22ca19d..32409639 100644
--- a/appTools/ToolRulesCheck.py
+++ b/appTools/ToolRulesCheck.py
@@ -41,7 +41,7 @@ class RulesCheck(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = RulesUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# #######################################################
# ################ SIGNALS ##############################
@@ -98,21 +98,21 @@ class RulesCheck(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1160,7 +1160,7 @@ class RulesCheck(AppTool):
class RulesUI:
- toolName = _("Check Rules")
+ pluginName = _("Check Rules")
def __init__(self, layout, app):
self.app = app
@@ -1168,7 +1168,7 @@ class RulesUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolSolderPaste.py b/appTools/ToolSolderPaste.py
index 3bb293a6..7c9c9b49 100644
--- a/appTools/ToolSolderPaste.py
+++ b/appTools/ToolSolderPaste.py
@@ -47,7 +47,7 @@ class SolderPaste(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = SolderUI(layout=self.layout, app=self.app, solder_class=self)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
self.tooltable_tools = {}
self.tooluid = 0
@@ -99,21 +99,21 @@ class SolderPaste(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -1140,7 +1140,7 @@ class SolderPaste(AppTool):
class SolderUI:
- toolName = _("SP Dispenser")
+ pluginName = _("SP Dispenser")
def __init__(self, layout, app, solder_class):
self.app = app
@@ -1148,7 +1148,7 @@ class SolderUI:
self.layout = layout
# ## Title
- title_label = QtWidgets.QLabel("%s" % self.toolName)
+ title_label = QtWidgets.QLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolSub.py b/appTools/ToolSub.py
index d7a62d69..4841c307 100644
--- a/appTools/ToolSub.py
+++ b/appTools/ToolSub.py
@@ -47,7 +47,7 @@ class ToolSub(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = SubUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# QTimer for periodic check
self.check_thread = QtCore.QTimer()
@@ -112,11 +112,11 @@ class ToolSub(AppTool):
# self.app.ui.splitter.setSizes([1, 1])
# else:
# try:
- # if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
+ # if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName:
# # if tab is populated with the tool but it does not have the focus, focus on it
- # if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ # if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# # focus on Tool Tab
- # self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ # self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
# else:
# self.app.ui.splitter.setSizes([0, 1])
# except AttributeError:
@@ -133,21 +133,21 @@ class ToolSub(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -743,7 +743,7 @@ class ToolSub(AppTool):
class SubUI:
- toolName = _("Subtract")
+ pluginName = _("Subtract")
def __init__(self, layout, app):
self.app = app
@@ -754,7 +754,7 @@ class SubUI:
self.layout.addLayout(self.title_box)
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/appTools/ToolTransform.py b/appTools/ToolTransform.py
index 91bc1802..d432e186 100644
--- a/appTools/ToolTransform.py
+++ b/appTools/ToolTransform.py
@@ -31,7 +31,7 @@ class ToolTransform(AppTool):
# ######################### Tool GUI ##########################################
# #############################################################################
self.ui = TransformUI(layout=self.layout, app=self.app)
- self.toolName = self.ui.toolName
+ self.pluginName = self.ui.pluginName
# ## Signals
self.ui.ref_combo.currentIndexChanged.connect(self.ui.on_reference_changed)
@@ -68,21 +68,21 @@ class ToolTransform(AppTool):
# if the Tool Tab is hidden display it, else hide it but only if the objectName is the same
found_idx = None
for idx in range(self.app.ui.notebook.count()):
- if self.app.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.app.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
# show the Tab
if not found_idx:
- self.app.ui.notebook.addTab(self.app.ui.tool_tab, _("Plugin"))
+ self.app.ui.notebook.addTab(self.app.ui.plugin_tab, _("Plugin"))
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
try:
- if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName and found_idx:
+ if self.app.ui.plugin_scroll_area.widget().objectName() == self.pluginName and found_idx:
# if the Tool Tab is not focused, focus on it
- if not self.app.ui.notebook.currentWidget() is self.app.ui.tool_tab:
+ if not self.app.ui.notebook.currentWidget() is self.app.ui.plugin_tab:
# focus on Tool Tab
- self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
+ self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
else:
# else remove the Tool Tab
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
@@ -553,7 +553,7 @@ class ToolTransform(AppTool):
class TransformUI:
- toolName = _("Object Transform")
+ pluginName = _("Object Transform")
rotateName = _("Rotate")
skewName = _("Skew/Shear")
scaleName = _("Scale")
@@ -567,7 +567,7 @@ class TransformUI:
self.layout = layout
# ## Title
- title_label = FCLabel("%s" % self.toolName)
+ title_label = FCLabel("%s" % self.pluginName)
title_label.setStyleSheet("""
QLabel
{
diff --git a/app_Main.py b/app_Main.py
index 460cdcb5..67e07322 100644
--- a/app_Main.py
+++ b/app_Main.py
@@ -440,7 +440,7 @@ class App(QtCore.QObject):
self.call_source = 'app'
# this is a flag to signal to other tools that the ui tooltab is locked and not accessible
- self.tool_tab_locked = False
+ self.plugin_tab_locked = False
# ############################################################################################################
# ################# Setup the listening thread for another instance launching with args ######################
@@ -2008,12 +2008,12 @@ class App(QtCore.QObject):
self.ui.notebook.removeTab(2)
# rebuild the Tools Tab
- # self.ui.tool_tab = QtWidgets.QWidget()
- # self.ui.tool_tab_layout = QtWidgets.QVBoxLayout(self.ui.tool_tab)
- # self.ui.tool_tab_layout.setContentsMargins(2, 2, 2, 2)
- # self.ui.notebook.addTab(self.ui.tool_tab, _("Tool"))
- # self.ui.tool_scroll_area = VerticalScrollArea()
- # self.ui.tool_tab_layout.addWidget(self.ui.tool_scroll_area)
+ # self.ui.plugin_tab = QtWidgets.QWidget()
+ # self.ui.plugin_tab_layout = QtWidgets.QVBoxLayout(self.ui.plugin_tab)
+ # self.ui.plugin_tab_layout.setContentsMargins(2, 2, 2, 2)
+ # self.ui.notebook.addTab(self.ui.plugin_tab, _("Tool"))
+ # self.ui.plugin_scroll_area = VerticalScrollArea()
+ # self.ui.plugin_tab_layout.addWidget(self.ui.plugin_scroll_area)
# reinstall all the Tools as some may have been removed when the data was removed from the Tools Tab
# first remove all of them
@@ -2644,7 +2644,7 @@ class App(QtCore.QObject):
# clean the Tools Tab
found_idx = None
for idx in range(self.ui.notebook.count()):
- if self.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
if found_idx:
@@ -2658,7 +2658,7 @@ class App(QtCore.QObject):
# restore GUI to the Selected TAB
# Remove anything else in the appGUI
- self.ui.tool_scroll_area.takeWidget()
+ self.ui.plugin_scroll_area.takeWidget()
# update the geo object options so it is including the bounding box values
try:
@@ -2704,7 +2704,7 @@ class App(QtCore.QObject):
# restore GUI to the Selected TAB
# Remove anything else in the GUI
- self.ui.tool_scroll_area.takeWidget()
+ self.ui.plugin_scroll_area.takeWidget()
# delete the old object (the source object) if it was an empty one
# find if we have drills:
@@ -2731,7 +2731,7 @@ class App(QtCore.QObject):
# restore GUI to the Selected TAB
# Remove anything else in the GUI
- self.ui.tool_scroll_area.takeWidget()
+ self.ui.plugin_scroll_area.takeWidget()
edited_obj.build_ui()
# close the open tab
@@ -2762,7 +2762,7 @@ class App(QtCore.QObject):
# clean the Tools Tab
found_idx = None
for idx in range(self.ui.notebook.count()):
- if self.ui.notebook.widget(idx).objectName() == "tool_tab":
+ if self.ui.notebook.widget(idx).objectName() == "plugin_tab":
found_idx = idx
break
if found_idx:
@@ -4804,26 +4804,26 @@ class App(QtCore.QObject):
msgbox.exec()
# work only if the notebook tab on focus is the Tools_Tab
- if notebook_widget_name == 'tool_tab':
+ if notebook_widget_name == 'plugin_tab':
try:
- tool_widget = self.ui.tool_scroll_area.widget().objectName()
+ tool_widget = self.ui.plugin_scroll_area.widget().objectName()
except AttributeError:
return
# and only if the tool is NCC Tool
- if tool_widget == self.ncclear_tool.toolName:
+ if tool_widget == self.ncclear_tool.pluginName:
self.ncclear_tool.on_add_tool_by_key()
# and only if the tool is Paint Area Tool
- elif tool_widget == self.paint_tool.toolName:
+ elif tool_widget == self.paint_tool.pluginName:
self.paint_tool.on_add_tool_by_key()
# and only if the tool is Solder Paste Dispensing Tool
- elif tool_widget == self.paste_tool.toolName:
+ elif tool_widget == self.paste_tool.pluginName:
self.paste_tool.on_add_tool_by_key()
# and only if the tool is Isolation Tool
- elif tool_widget == self.isolation_tool.toolName:
+ elif tool_widget == self.isolation_tool.pluginName:
self.isolation_tool.on_add_tool_by_key()
# It's meant to delete tools in tool tables via a 'Delete' shortcut key but only if certain conditions are met
@@ -4837,23 +4837,23 @@ class App(QtCore.QObject):
self.collection.get_active().on_tool_delete()
# work only if the notebook tab on focus is the Tools_Tab
- elif notebook_widget_name == 'tool_tab':
- tool_widget = self.ui.tool_scroll_area.widget().objectName()
+ elif notebook_widget_name == 'plugin_tab':
+ tool_widget = self.ui.plugin_scroll_area.widget().objectName()
# and only if the tool is NCC Tool
- if tool_widget == self.ncclear_tool.toolName:
+ if tool_widget == self.ncclear_tool.pluginName:
self.ncclear_tool.on_tool_delete()
# and only if the tool is Paint Tool
- elif tool_widget == self.paint_tool.toolName:
+ elif tool_widget == self.paint_tool.pluginName:
self.paint_tool.on_tool_delete()
# and only if the tool is Solder Paste Dispensing Tool
- elif tool_widget == self.paste_tool.toolName:
+ elif tool_widget == self.paste_tool.pluginName:
self.paste_tool.on_tool_delete()
# and only if the tool is Isolation Tool
- elif tool_widget == self.isolation_tool.toolName:
+ elif tool_widget == self.isolation_tool.pluginName:
self.isolation_tool.on_tool_delete()
else:
self.on_delete()
@@ -7316,7 +7316,7 @@ class App(QtCore.QObject):
if self.call_source == 'app':
if self.click_noproject is False:
# if the Tool Tab is in focus don't change focus to Project Tab
- if not self.ui.notebook.currentWidget() is self.ui.tool_tab:
+ if not self.ui.notebook.currentWidget() is self.ui.plugin_tab:
self.ui.notebook.setCurrentWidget(self.ui.project_tab)
else:
# restore auto open the Project Tab
diff --git a/locale/de/LC_MESSAGES/strings.po b/locale/de/LC_MESSAGES/strings.po
index 09d736e8..5bb01905 100644
--- a/locale/de/LC_MESSAGES/strings.po
+++ b/locale/de/LC_MESSAGES/strings.po
@@ -26146,5 +26146,5 @@ msgstr ""
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/en/LC_MESSAGES/strings.po b/locale/en/LC_MESSAGES/strings.po
index c7395499..e0e6005c 100644
--- a/locale/en/LC_MESSAGES/strings.po
+++ b/locale/en/LC_MESSAGES/strings.po
@@ -25733,5 +25733,5 @@ msgstr "No Geometry name in args. Provide a name and try again."
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/es/LC_MESSAGES/strings.po b/locale/es/LC_MESSAGES/strings.po
index c3b76cbe..99393261 100644
--- a/locale/es/LC_MESSAGES/strings.po
+++ b/locale/es/LC_MESSAGES/strings.po
@@ -24221,5 +24221,5 @@ msgstr ""
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/fr/LC_MESSAGES/strings.po b/locale/fr/LC_MESSAGES/strings.po
index 9985a4d3..2f8e8cca 100644
--- a/locale/fr/LC_MESSAGES/strings.po
+++ b/locale/fr/LC_MESSAGES/strings.po
@@ -23072,5 +23072,5 @@ msgstr ""
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/it/LC_MESSAGES/strings.po b/locale/it/LC_MESSAGES/strings.po
index 34c794f7..cce38c77 100644
--- a/locale/it/LC_MESSAGES/strings.po
+++ b/locale/it/LC_MESSAGES/strings.po
@@ -22243,5 +22243,5 @@ msgstr "Nessun nome di geometria negli argomenti. Fornisci un nome e riprova."
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/pt_BR/LC_MESSAGES/strings.po b/locale/pt_BR/LC_MESSAGES/strings.po
index 09545ff5..18442265 100644
--- a/locale/pt_BR/LC_MESSAGES/strings.po
+++ b/locale/pt_BR/LC_MESSAGES/strings.po
@@ -24522,5 +24522,5 @@ msgstr "Nenhum nome de geometria nos argumentos. Altere e tente novamente."
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Projeto_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/ro/LC_MESSAGES/strings.po b/locale/ro/LC_MESSAGES/strings.po
index 461ab740..bf0f1cec 100644
--- a/locale/ro/LC_MESSAGES/strings.po
+++ b/locale/ro/LC_MESSAGES/strings.po
@@ -25895,5 +25895,5 @@ msgstr ""
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Proiect_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale/ru/LC_MESSAGES/strings.po b/locale/ru/LC_MESSAGES/strings.po
index 52022599..28eafdb6 100644
--- a/locale/ru/LC_MESSAGES/strings.po
+++ b/locale/ru/LC_MESSAGES/strings.po
@@ -21758,8 +21758,8 @@ msgstr "Нет имени геометрии в аргументах. Укажи
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
#~ msgid "Angle:"
#~ msgstr "Угол:"
diff --git a/locale/tr/LC_MESSAGES/strings.po b/locale/tr/LC_MESSAGES/strings.po
index e34bb3d2..f0351457 100644
--- a/locale/tr/LC_MESSAGES/strings.po
+++ b/locale/tr/LC_MESSAGES/strings.po
@@ -25751,5 +25751,5 @@ msgstr "Değişkenlerde Şekil ismi yok. Lütfen bir isim girin ve tekrar deneyi
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"
diff --git a/locale_template/strings.pot b/locale_template/strings.pot
index 205ad5b6..9986dd14 100644
--- a/locale_template/strings.pot
+++ b/locale_template/strings.pot
@@ -16836,5 +16836,5 @@ msgstr ""
#~ msgid "%s/Project_%s"
#~ msgstr "%s/Project_%s"
-#~ msgid "tool_tab"
-#~ msgstr "tool_tab"
+#~ msgid "plugin_tab"
+#~ msgstr "plugin_tab"