- fixed the annotation plotting in the CNCJob object

- created a new InputDialog widget that has the buttons and the context menu translated and replaced the old widget throughout the app
- updated the translation strings
This commit is contained in:
Marius Stanciu
2020-11-05 16:36:41 +02:00
committed by Marius
parent a4c8737ab7
commit d4fec5ae60
27 changed files with 5318 additions and 5164 deletions

View File

@@ -6115,10 +6115,12 @@ class App(QtCore.QObject):
self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
else:
if silent is False:
rotatebox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
min=-360, max=360, decimals=4,
init_val=float(self.defaults['tools_transform_rotate']),
parent=self.ui)
rotatebox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
min=-360, max=360, decimals=4,
init_val=float(self.defaults['tools_transform_rotate']),
parent=self.ui)
rotatebox.setWindowIcon(QtGui.QIcon(self.resource_location + '/rotate.png'))
num, ok = rotatebox.get_value()
else:
num = preset
@@ -6167,10 +6169,12 @@ class App(QtCore.QObject):
if not obj_list:
self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
else:
skewxbox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
min=-360, max=360, decimals=4,
init_val=float(self.defaults['tools_transform_skew_x']),
parent=self.ui)
skewxbox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
min=-360, max=360, decimals=4,
init_val=float(self.defaults['tools_transform_skew_x']),
parent=self.ui)
skewxbox.setWindowIcon(QtGui.QIcon(self.resource_location + '/skewX.png'))
num, ok = skewxbox.get_value()
if ok:
# first get a bounding box to fit all
@@ -6205,10 +6209,12 @@ class App(QtCore.QObject):
if not obj_list:
self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
else:
skewybox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
min=-360, max=360, decimals=4,
init_val=float(self.defaults['tools_transform_skew_y']),
parent=self.ui)
skewybox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
min=-360, max=360, decimals=4,
init_val=float(self.defaults['tools_transform_skew_y']),
parent=self.ui)
skewybox.setWindowIcon(QtGui.QIcon(self.resource_location + '/skewY.png'))
num, ok = skewybox.get_value()
if ok:
# first get a bounding box to fit all
@@ -6307,10 +6313,10 @@ class App(QtCore.QObject):
# ## Current application units in lower Case
units = self.defaults['units'].lower()
grid_add_popup = FCInputDialog(title=_("New Grid ..."),
text=_('Enter a Grid Value:'),
min=0.0000, max=99.9999, decimals=4,
parent=self.ui)
grid_add_popup = FCInputDoubleSpinner(title=_("New Grid ..."),
text=_('Enter a Grid Value:'),
min=0.0000, max=99.9999, decimals=self.decimals,
parent=self.ui)
grid_add_popup.setWindowIcon(QtGui.QIcon(self.resource_location + '/plus32.png'))
val, ok = grid_add_popup.get_value()
@@ -6332,10 +6338,10 @@ class App(QtCore.QObject):
# ## Current application units in lower Case
units = self.defaults['units'].lower()
grid_del_popup = FCInputDialog(title="Delete Grid ...",
text='Enter a Grid Value:',
min=0.0000, max=99.9999, decimals=4,
parent=self.ui)
grid_del_popup = FCInputDoubleSpinner(title="Delete Grid ...",
text='Enter a Grid Value:',
min=0.0000, max=99.9999, decimals=self.decimals,
parent=self.ui)
grid_del_popup.setWindowIcon(QtGui.QIcon(self.resource_location + '/delete32.png'))
val, ok = grid_del_popup.get_value()