- made the Distance Tool display the angle in values between 0 and 359.9999 degrees
- changed some strings
This commit is contained in:
parent
8eee9a9dcf
commit
440d0dde02
|
@ -315,7 +315,7 @@ class ToolsDB(QtWidgets.QWidget):
|
|||
self.app.inform.emit('[ERROR] %s' % _("Failed to parse Tools DB file."))
|
||||
return
|
||||
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded FlatCAM Tools DB from"), filename))
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded Tools DB from"), filename))
|
||||
|
||||
self.build_db_ui()
|
||||
|
||||
|
@ -726,7 +726,7 @@ class ToolsDB(QtWidgets.QWidget):
|
|||
self.app.inform.emit('[ERROR] %s' % _("Failed to parse Tools DB file."))
|
||||
return
|
||||
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded FlatCAM Tools DB from"), filename))
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded Tools DB from"), filename))
|
||||
self.build_db_ui()
|
||||
self.callback_on_edited()
|
||||
|
||||
|
@ -2034,7 +2034,7 @@ class ToolsDB2(QtWidgets.QWidget):
|
|||
self.app.inform.emit('[ERROR] %s' % _("Failed to parse Tools DB file."))
|
||||
return
|
||||
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded FlatCAM Tools DB from"), filename))
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded Tools DB from"), filename))
|
||||
|
||||
self.build_db_ui()
|
||||
|
||||
|
@ -2323,7 +2323,7 @@ class ToolsDB2(QtWidgets.QWidget):
|
|||
self.app.inform.emit('[ERROR] %s' % _("Failed to parse Tools DB file."))
|
||||
return
|
||||
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded FlatCAM Tools DB from"), filename))
|
||||
self.app.inform.emit('[success] %s: %s' % (_("Loaded Tools DB from"), filename))
|
||||
self.build_db_ui()
|
||||
self.update_storage()
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class ObjectUI(QtWidgets.QWidget):
|
|||
put UI elements in ObjectUI.custom_box (QtWidgets.QLayout).
|
||||
"""
|
||||
|
||||
def __init__(self, app, icon_file='assets/resources/flatcam_icon32.png', title=_('FlatCAM Object'),
|
||||
def __init__(self, app, icon_file='assets/resources/flatcam_icon32.png', title=_('App Object'),
|
||||
parent=None, common=True):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
|||
# Theme selection
|
||||
self.theme_label = QtWidgets.QLabel('%s:' % _('Theme'))
|
||||
self.theme_label.setToolTip(
|
||||
_("Select a theme for FlatCAM.\n"
|
||||
_("Select a theme for the application.\n"
|
||||
"It will theme the plot area.")
|
||||
)
|
||||
|
||||
|
@ -72,7 +72,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
|||
# Layout selection
|
||||
self.layout_label = QtWidgets.QLabel('%s:' % _('Layout'))
|
||||
self.layout_label.setToolTip(
|
||||
_("Select an layout for FlatCAM.\n"
|
||||
_("Select an layout for the application.\n"
|
||||
"It is applied immediately.")
|
||||
)
|
||||
self.layout_combo = FCComboBox()
|
||||
|
@ -94,7 +94,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
|||
# Style selection
|
||||
self.style_label = QtWidgets.QLabel('%s:' % _('Style'))
|
||||
self.style_label.setToolTip(
|
||||
_("Select an style for FlatCAM.\n"
|
||||
_("Select an style for the application.\n"
|
||||
"It will be applied at the next app start.")
|
||||
)
|
||||
self.style_combo = FCComboBox()
|
||||
|
@ -110,7 +110,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
|||
# Enable High DPI Support
|
||||
self.hdpi_cb = FCCheckBox('%s' % _('Activate HDPI Support'))
|
||||
self.hdpi_cb.setToolTip(
|
||||
_("Enable High DPI support for FlatCAM.\n"
|
||||
_("Enable High DPI support for the application.\n"
|
||||
"It will be applied at the next app start.")
|
||||
)
|
||||
|
||||
|
@ -126,7 +126,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
|||
# Enable Hover box
|
||||
self.hover_cb = FCCheckBox('%s' % _('Display Hover Shape'))
|
||||
self.hover_cb.setToolTip(
|
||||
_("Enable display of a hover shape for FlatCAM objects.\n"
|
||||
_("Enable display of a hover shape for the application objects.\n"
|
||||
"It is displayed whenever the mouse cursor is hovering\n"
|
||||
"over any kind of not-selected object.")
|
||||
)
|
||||
|
@ -135,7 +135,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
|||
# Enable Selection box
|
||||
self.selection_cb = FCCheckBox('%s' % _('Display Selection Shape'))
|
||||
self.selection_cb.setToolTip(
|
||||
_("Enable the display of a selection shape for FlatCAM objects.\n"
|
||||
_("Enable the display of a selection shape for the application objects.\n"
|
||||
"It is displayed whenever the mouse selects an object\n"
|
||||
"either by clicking or dragging mouse from left to right or\n"
|
||||
"right to left.")
|
||||
|
|
|
@ -30,8 +30,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
|
|||
# ## Parameters
|
||||
self.film_label = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
|
||||
self.film_label.setToolTip(
|
||||
_("Create a PCB film from a Gerber or Geometry\n"
|
||||
"FlatCAM object.\n"
|
||||
_("Create a PCB film from a Gerber or Geometry object.\n"
|
||||
"The file is saved in SVG format.")
|
||||
)
|
||||
self.layout.addWidget(self.film_label)
|
||||
|
|
|
@ -105,7 +105,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
|
|||
cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
|
||||
cutzlabel.setToolTip(
|
||||
_("Depth of cut into material. Negative value.\n"
|
||||
"In FlatCAM units.")
|
||||
"In application units.")
|
||||
)
|
||||
self.cutz_entry = FCDoubleSpinner()
|
||||
self.cutz_entry.set_precision(self.decimals)
|
||||
|
@ -114,7 +114,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
|
|||
|
||||
self.cutz_entry.setToolTip(
|
||||
_("Depth of cut into material. Negative value.\n"
|
||||
"In FlatCAM units.")
|
||||
"In application units.")
|
||||
)
|
||||
grid0.addWidget(cutzlabel, 4, 0)
|
||||
grid0.addWidget(self.cutz_entry, 4, 1)
|
||||
|
|
|
@ -31,7 +31,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
|
|||
self.transform_label = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
|
||||
self.transform_label.setToolTip(
|
||||
_("Various transformations that can be applied\n"
|
||||
"on a FlatCAM object.")
|
||||
"on a application object.")
|
||||
)
|
||||
self.layout.addWidget(self.transform_label)
|
||||
|
||||
|
|
|
@ -504,17 +504,17 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|||
try:
|
||||
dir_file_to_save = self.app.get_last_save_folder() + '/' + str(name)
|
||||
filename, _f = FCFileSaveDialog.get_saved_filename(
|
||||
caption=_("Export Machine Code ..."),
|
||||
caption=_("Export Code ..."),
|
||||
directory=dir_file_to_save,
|
||||
ext_filter=_filter_
|
||||
)
|
||||
except TypeError:
|
||||
filename, _f = FCFileSaveDialog.get_saved_filename(caption=_("Export Machine Code ..."), ext_filter=_filter_)
|
||||
filename, _f = FCFileSaveDialog.get_saved_filename(caption=_("Export Code ..."), ext_filter=_filter_)
|
||||
|
||||
filename = str(filename)
|
||||
|
||||
if filename == '':
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Export Machine Code cancelled ..."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Export cancelled ..."))
|
||||
return
|
||||
else:
|
||||
if save_gcode is True:
|
||||
|
|
|
@ -139,7 +139,7 @@ class FlatCAMObj(QtCore.QObject):
|
|||
except KeyError:
|
||||
log.debug("FlatCAMObj.from_dict() --> KeyError: %s. "
|
||||
"Means that we are loading an old project that don't"
|
||||
"have all attributes in the latest FlatCAM." % str(attr))
|
||||
"have all attributes in the latest application version." % str(attr))
|
||||
pass
|
||||
|
||||
def on_options_change(self, key):
|
||||
|
|
|
@ -511,12 +511,13 @@ class Distance(AppTool):
|
|||
self.distance_x_entry.set_value('%.*f' % (self.decimals, abs(dx)))
|
||||
self.distance_y_entry.set_value('%.*f' % (self.decimals, abs(dy)))
|
||||
|
||||
if dx != 0.0:
|
||||
try:
|
||||
angle = math.degrees(math.atan(dy / dx))
|
||||
self.angle_entry.set_value('%.*f' % (self.decimals, angle))
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
angle = math.degrees(math.atan2(dy, dx))
|
||||
if angle < 0:
|
||||
angle += 360
|
||||
self.angle_entry.set_value('%.*f' % (self.decimals, angle))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
self.total_distance_entry.set_value('%.*f' % (self.decimals, abs(d)))
|
||||
# self.app.ui.rel_position_label.setText(
|
||||
|
@ -582,13 +583,14 @@ class Distance(AppTool):
|
|||
if len(self.points) == 1:
|
||||
self.utility_geometry(pos=pos)
|
||||
# and display the temporary angle
|
||||
if dx != 0.0:
|
||||
try:
|
||||
angle = math.degrees(math.atan(dy / dx))
|
||||
self.angle_entry.set_value('%.*f' % (self.decimals, angle))
|
||||
except Exception as e:
|
||||
log.debug("Distance.on_mouse_move_meas() -> update utility geometry -> %s" % str(e))
|
||||
pass
|
||||
try:
|
||||
angle = math.degrees(math.atan2(dy, dx))
|
||||
if angle < 0:
|
||||
angle += 360
|
||||
self.angle_entry.set_value('%.*f' % (self.decimals, angle))
|
||||
except Exception as e:
|
||||
log.debug("Distance.on_mouse_move_meas() -> update utility geometry -> %s" % str(e))
|
||||
pass
|
||||
|
||||
except Exception as e:
|
||||
log.debug("Distance.on_mouse_move_meas() --> %s" % str(e))
|
||||
|
|
|
@ -1497,11 +1497,10 @@ class SolderPaste(AppTool):
|
|||
)
|
||||
except TypeError:
|
||||
filename, _f = FCFileSaveDialog.get_saved_filename(
|
||||
caption=_("Export Machine Code ..."), ext_filter=_filter_)
|
||||
caption=_("Export Code ..."), ext_filter=_filter_)
|
||||
|
||||
if filename == '':
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Export Machine Code cancelled ..."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Export cancelled ..."))
|
||||
return
|
||||
|
||||
gcode = '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \
|
||||
|
|
|
@ -287,8 +287,8 @@ class BookmarkManager(QtWidgets.QWidget):
|
|||
date = date.replace(' ', '_')
|
||||
|
||||
filter__ = "Text File (*.TXT);;All Files (*.*)"
|
||||
filename, _f = FCFileSaveDialog.get_saved_filename(caption=_("Export FlatCAM Bookmarks"),
|
||||
directory='{l_save}/FlatCAM_{n}_{date}'.format(
|
||||
filename, _f = FCFileSaveDialog.get_saved_filename(caption=_("Export Bookmarks"),
|
||||
directory='{l_save}/{n}_{date}'.format(
|
||||
l_save=str(self.app.get_last_save_folder()),
|
||||
n=_("Bookmarks"),
|
||||
date=date),
|
||||
|
@ -334,7 +334,7 @@ class BookmarkManager(QtWidgets.QWidget):
|
|||
self.app.log.debug("on_import_bookmarks()")
|
||||
|
||||
filter_ = "Text File (*.txt);;All Files (*.*)"
|
||||
filename, _f = QtWidgets.QFileDialog.getOpenFileName(caption=_("Import FlatCAM Bookmarks"), filter=filter_)
|
||||
filename, _f = QtWidgets.QFileDialog.getOpenFileName(caption=_("Import Bookmarks"), filter=filter_)
|
||||
|
||||
filename = str(filename)
|
||||
|
||||
|
|
|
@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta
|
|||
|
||||
=================================================
|
||||
|
||||
1.06.2020
|
||||
|
||||
- made the Distance Tool display the angle in values between 0 and 359.9999 degrees
|
||||
- changed some strings
|
||||
|
||||
31.05.2020
|
||||
|
||||
- structural changes in Preferences from David Robertson
|
||||
|
|
Loading…
Reference in New Issue