2020-04-29 21:53:16 +00:00
|
|
|
from PyQt5 import QtWidgets
|
2020-04-30 09:47:07 +00:00
|
|
|
from PyQt5.QtCore import QSettings
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-06-03 17:35:59 +00:00
|
|
|
from appGUI.preferences.tools.ToolsSubPrefGroupUI import ToolsSubPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsSolderpastePrefGroupUI import ToolsSolderpastePrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsCornersPrefGroupUI import ToolsCornersPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsTransformPrefGroupUI import ToolsTransformPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsCalculatorsPrefGroupUI import ToolsCalculatorsPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsPanelizePrefGroupUI import ToolsPanelizePrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsFilmPrefGroupUI import ToolsFilmPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.Tools2sidedPrefGroupUI import Tools2sidedPrefGroupUI
|
2020-06-02 15:29:45 +00:00
|
|
|
|
2020-06-03 17:35:59 +00:00
|
|
|
from appGUI.preferences.tools.ToolsCutoutPrefGroupUI import ToolsCutoutPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsNCCPrefGroupUI import ToolsNCCPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsPaintPrefGroupUI import ToolsPaintPrefGroupUI
|
|
|
|
from appGUI.preferences.tools.ToolsISOPrefGroupUI import ToolsISOPrefGroupUI
|
2020-07-10 01:39:25 +00:00
|
|
|
from appGUI.preferences.tools.ToolsDrillPrefGroupUI import ToolsDrillPrefGroupUI
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-04-30 09:47:07 +00:00
|
|
|
import gettext
|
2020-06-03 17:35:59 +00:00
|
|
|
import appTranslation as fcTranslate
|
2020-04-30 09:47:07 +00:00
|
|
|
import builtins
|
|
|
|
|
|
|
|
fcTranslate.apply_language('strings')
|
|
|
|
if '_' not in builtins.__dict__:
|
|
|
|
_ = gettext.gettext
|
|
|
|
|
|
|
|
settings = QSettings("Open Source", "FlatCAM")
|
|
|
|
if settings.contains("machinist"):
|
|
|
|
machinist_setting = settings.value('machinist', type=int)
|
|
|
|
else:
|
|
|
|
machinist_setting = 0
|
|
|
|
|
2020-04-29 21:53:16 +00:00
|
|
|
|
|
|
|
class ToolsPreferencesUI(QtWidgets.QWidget):
|
|
|
|
|
|
|
|
def __init__(self, decimals, parent=None):
|
|
|
|
QtWidgets.QWidget.__init__(self, parent=parent)
|
|
|
|
self.layout = QtWidgets.QHBoxLayout()
|
|
|
|
self.setLayout(self.layout)
|
|
|
|
self.decimals = decimals
|
|
|
|
|
2020-06-02 15:29:45 +00:00
|
|
|
self.tools_iso_group = ToolsISOPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_iso_group.setMinimumWidth(220)
|
|
|
|
|
2020-07-10 01:39:25 +00:00
|
|
|
self.tools_drill_group = ToolsDrillPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_drill_group.setMinimumWidth(220)
|
|
|
|
|
2020-04-29 21:53:16 +00:00
|
|
|
self.tools_ncc_group = ToolsNCCPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_ncc_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_paint_group = ToolsPaintPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_paint_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_cutout_group = ToolsCutoutPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_cutout_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_2sided_group = Tools2sidedPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_2sided_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_film_group = ToolsFilmPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_film_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_panelize_group = ToolsPanelizePrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_panelize_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_calculators_group = ToolsCalculatorsPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_calculators_group.setMinimumWidth(220)
|
|
|
|
|
|
|
|
self.tools_transform_group = ToolsTransformPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_transform_group.setMinimumWidth(200)
|
|
|
|
|
|
|
|
self.tools_solderpaste_group = ToolsSolderpastePrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_solderpaste_group.setMinimumWidth(200)
|
|
|
|
|
2020-06-02 15:29:45 +00:00
|
|
|
self.tools_corners_group = ToolsCornersPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_corners_group.setMinimumWidth(200)
|
|
|
|
|
2020-04-29 21:53:16 +00:00
|
|
|
self.tools_sub_group = ToolsSubPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.tools_sub_group.setMinimumWidth(200)
|
|
|
|
|
|
|
|
self.vlay = QtWidgets.QVBoxLayout()
|
2020-07-10 01:39:25 +00:00
|
|
|
|
|
|
|
self.vlay.addWidget(self.tools_iso_group)
|
2020-10-27 08:51:00 +00:00
|
|
|
self.vlay.addWidget(self.tools_2sided_group)
|
|
|
|
self.vlay.addWidget(self.tools_cutout_group)
|
2020-04-29 21:53:16 +00:00
|
|
|
|
|
|
|
self.vlay1 = QtWidgets.QVBoxLayout()
|
2020-10-27 08:51:00 +00:00
|
|
|
self.vlay1.addWidget(self.tools_drill_group)
|
|
|
|
self.vlay1.addWidget(self.tools_panelize_group)
|
2020-04-29 21:53:16 +00:00
|
|
|
|
|
|
|
self.vlay2 = QtWidgets.QVBoxLayout()
|
2020-10-27 08:51:00 +00:00
|
|
|
self.vlay2.addWidget(self.tools_ncc_group)
|
2020-07-10 01:39:25 +00:00
|
|
|
self.vlay2.addWidget(self.tools_paint_group)
|
2020-04-29 21:53:16 +00:00
|
|
|
|
|
|
|
self.vlay3 = QtWidgets.QVBoxLayout()
|
|
|
|
self.vlay3.addWidget(self.tools_film_group)
|
2020-10-27 08:51:00 +00:00
|
|
|
self.vlay3.addWidget(self.tools_transform_group)
|
2020-04-29 21:53:16 +00:00
|
|
|
|
|
|
|
self.vlay4 = QtWidgets.QVBoxLayout()
|
|
|
|
self.vlay4.addWidget(self.tools_solderpaste_group)
|
2020-06-02 15:29:45 +00:00
|
|
|
self.vlay4.addWidget(self.tools_corners_group)
|
2020-10-27 08:51:00 +00:00
|
|
|
self.vlay4.addWidget(self.tools_calculators_group)
|
|
|
|
self.vlay4.addWidget(self.tools_sub_group)
|
2020-04-29 21:53:16 +00:00
|
|
|
|
|
|
|
self.layout.addLayout(self.vlay)
|
|
|
|
self.layout.addLayout(self.vlay1)
|
|
|
|
self.layout.addLayout(self.vlay2)
|
|
|
|
self.layout.addLayout(self.vlay3)
|
|
|
|
self.layout.addLayout(self.vlay4)
|
|
|
|
|
2020-04-30 09:47:07 +00:00
|
|
|
self.layout.addStretch()
|