- fixed a small issue (messages) in Corner Markers Tool

- in Corners Markers Tool added a new feature: possibility to use cross shape markers
This commit is contained in:
Marius Stanciu
2020-11-01 18:41:01 +02:00
committed by Marius Stanciu
parent 1866ffc327
commit 55d5dece2c
12 changed files with 353 additions and 222 deletions

View File

@@ -546,7 +546,7 @@ class PreferencesUIManager:
"tools_sub_delete_sources": self.ui.tools_defaults_form.tools_sub_group.delete_sources_cb,
# Corner Markers Tool
"tools_corners_type": self.ui.tools_defaults_form.tools_corners_group.type_radio,
"tools_corners_thickness": self.ui.tools_defaults_form.tools_corners_group.thick_entry,
"tools_corners_length": self.ui.tools_defaults_form.tools_corners_group.l_entry,
"tools_corners_margin": self.ui.tools_defaults_form.tools_corners_group.margin_entry,

View File

@@ -1,7 +1,7 @@
from PyQt5 import QtWidgets
from PyQt5.QtCore import QSettings
from appGUI.GUIElements import FCDoubleSpinner
from appGUI.GUIElements import FCDoubleSpinner, FCLabel, RadioSet
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -32,14 +32,28 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)
self.param_label = QtWidgets.QLabel('<b>%s:</b>' % _('Parameters'))
self.param_label = FCLabel('<b>%s:</b>' % _('Parameters'))
self.param_label.setToolTip(
_("Parameters used for this tool.")
)
grid0.addWidget(self.param_label, 0, 0, 1, 2)
# Type of Marker
self.type_label = FCLabel('%s:' % _("Type"))
self.type_label.setToolTip(
_("Shape of the marker.")
)
self.type_radio = RadioSet([
{"label": _("Semi-Cross"), "value": "s"},
{"label": _("Cross"), "value": "c"},
])
grid0.addWidget(self.type_label, 2, 0)
grid0.addWidget(self.type_radio, 2, 1)
# Thickness #
self.thick_label = QtWidgets.QLabel('%s:' % _("Thickness"))
self.thick_label = FCLabel('%s:' % _("Thickness"))
self.thick_label.setToolTip(
_("The thickness of the line that makes the corner marker.")
)
@@ -49,21 +63,11 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
self.thick_entry.setWrapping(True)
self.thick_entry.setSingleStep(10 ** -self.decimals)
grid0.addWidget(self.thick_label, 1, 0)
grid0.addWidget(self.thick_entry, 1, 1)
# Length #
self.l_label = QtWidgets.QLabel('%s:' % _("Length"))
self.l_label.setToolTip(
_("The length of the line that makes the corner marker.")
)
self.l_entry = FCDoubleSpinner()
self.l_entry.set_range(-9999.9999, 9999.9999)
self.l_entry.set_precision(self.decimals)
self.l_entry.setSingleStep(10 ** -self.decimals)
grid0.addWidget(self.thick_label, 4, 0)
grid0.addWidget(self.thick_entry, 4, 1)
# Margin #
self.margin_label = QtWidgets.QLabel('%s:' % _("Margin"))
self.margin_label = FCLabel('%s:' % _("Margin"))
self.margin_label.setToolTip(
_("Bounding box margin.")
)
@@ -72,10 +76,20 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
self.margin_entry.set_precision(self.decimals)
self.margin_entry.setSingleStep(0.1)
grid0.addWidget(self.margin_label, 2, 0)
grid0.addWidget(self.margin_entry, 2, 1)
grid0.addWidget(self.margin_label, 6, 0)
grid0.addWidget(self.margin_entry, 6, 1)
grid0.addWidget(self.l_label, 4, 0)
grid0.addWidget(self.l_entry, 4, 1)
# Length #
self.l_label = FCLabel('%s:' % _("Length"))
self.l_label.setToolTip(
_("The length of the line that makes the corner marker.")
)
self.l_entry = FCDoubleSpinner()
self.l_entry.set_range(-9999.9999, 9999.9999)
self.l_entry.set_precision(self.decimals)
self.l_entry.setSingleStep(10 ** -self.decimals)
grid0.addWidget(self.l_label, 8, 0)
grid0.addWidget(self.l_entry, 8, 1)
self.layout.addStretch()