- finished upgrading the UI in Geometry Editor sub-tools
This commit is contained in:
@@ -353,24 +353,34 @@ class BufferEditorUI:
|
||||
title_label = FCLabel("%s" % ('Editor ' + self.pluginName), size=16, bold=True)
|
||||
self.layout.addWidget(title_label)
|
||||
|
||||
self.param_label = FCLabel('%s' % _("Parameters"), color='blue', bold=True)
|
||||
self.layout.addWidget(self.param_label)
|
||||
|
||||
# this way I can hide/show the frame
|
||||
self.buffer_tool_frame = QtWidgets.QFrame()
|
||||
self.buffer_tool_frame.setContentsMargins(0, 0, 0, 0)
|
||||
self.layout.addWidget(self.buffer_tool_frame)
|
||||
|
||||
self.buffer_tools_box = QtWidgets.QVBoxLayout()
|
||||
self.buffer_tools_box.setContentsMargins(0, 0, 0, 0)
|
||||
self.buffer_tool_frame.setLayout(self.buffer_tools_box)
|
||||
|
||||
# #############################################################################################################
|
||||
# Tool Params Frame
|
||||
# #############################################################################################################
|
||||
tool_par_frame = FCFrame()
|
||||
self.buffer_tools_box.addWidget(tool_par_frame)
|
||||
|
||||
# Grid Layout
|
||||
grid_buffer = GLay(v_spacing=5, h_spacing=3)
|
||||
self.buffer_tools_box.addLayout(grid_buffer)
|
||||
param_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
tool_par_frame.setLayout(param_grid)
|
||||
|
||||
# Buffer distance
|
||||
self.buffer_distance_entry = FCDoubleSpinner()
|
||||
self.buffer_distance_entry.set_precision(self.decimals)
|
||||
self.buffer_distance_entry.set_range(0.0000, 10000.0000)
|
||||
grid_buffer.addWidget(FCLabel('%s:' % _("Buffer distance")), 0, 0)
|
||||
grid_buffer.addWidget(self.buffer_distance_entry, 0, 1)
|
||||
param_grid.addWidget(FCLabel('%s:' % _("Buffer distance")), 0, 0)
|
||||
param_grid.addWidget(self.buffer_distance_entry, 0, 1)
|
||||
|
||||
self.buffer_corner_lbl = FCLabel('%s:' % _("Buffer corner"))
|
||||
self.buffer_corner_lbl.setToolTip(
|
||||
@@ -383,12 +393,12 @@ class BufferEditorUI:
|
||||
self.buffer_corner_cb.addItem(_("Round"))
|
||||
self.buffer_corner_cb.addItem(_("Square"))
|
||||
self.buffer_corner_cb.addItem(_("Beveled"))
|
||||
grid_buffer.addWidget(self.buffer_corner_lbl, 2, 0)
|
||||
grid_buffer.addWidget(self.buffer_corner_cb, 2, 1)
|
||||
param_grid.addWidget(self.buffer_corner_lbl, 2, 0)
|
||||
param_grid.addWidget(self.buffer_corner_cb, 2, 1)
|
||||
|
||||
# Buttons
|
||||
hlay = QtWidgets.QHBoxLayout()
|
||||
grid_buffer.addLayout(hlay, 4, 0, 1, 2)
|
||||
self.buffer_tools_box.addLayout(hlay)
|
||||
|
||||
self.buffer_int_button = FCButton(_("Buffer Interior"))
|
||||
hlay.addWidget(self.buffer_int_button)
|
||||
@@ -396,7 +406,7 @@ class BufferEditorUI:
|
||||
hlay.addWidget(self.buffer_ext_button)
|
||||
|
||||
hlay1 = QtWidgets.QHBoxLayout()
|
||||
grid_buffer.addLayout(hlay1, 6, 0, 1, 2)
|
||||
self.buffer_tools_box.addLayout(hlay1)
|
||||
|
||||
self.buffer_button = FCButton(_("Full Buffer"))
|
||||
hlay1.addWidget(self.buffer_button)
|
||||
|
||||
@@ -228,20 +228,30 @@ class PaintEditorUI:
|
||||
title_label = FCLabel("%s" % self.pluginName, size=16, bold=True)
|
||||
self.layout.addWidget(title_label)
|
||||
|
||||
grid = GLay(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid)
|
||||
self.param_label = FCLabel('%s' % _("Parameters"), color='blue', bold=True)
|
||||
self.layout.addWidget(self.param_label)
|
||||
|
||||
# #############################################################################################################
|
||||
# Tool Params Frame
|
||||
# #############################################################################################################
|
||||
tool_par_frame = FCFrame()
|
||||
self.layout.addWidget(tool_par_frame)
|
||||
|
||||
# Grid Layout
|
||||
param_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
tool_par_frame.setLayout(param_grid)
|
||||
|
||||
# Tool dia
|
||||
ptdlabel = FCLabel('%s:' % _('Tool Dia'))
|
||||
ptdlabel.setToolTip(
|
||||
_("Diameter of the tool to be used in the operation.")
|
||||
)
|
||||
grid.addWidget(ptdlabel, 0, 0)
|
||||
param_grid.addWidget(ptdlabel, 0, 0)
|
||||
|
||||
self.painttooldia_entry = FCDoubleSpinner()
|
||||
self.painttooldia_entry.set_range(-10000.0000, 10000.0000)
|
||||
self.painttooldia_entry.set_precision(self.decimals)
|
||||
grid.addWidget(self.painttooldia_entry, 0, 1)
|
||||
param_grid.addWidget(self.painttooldia_entry, 0, 1)
|
||||
|
||||
# Overlap
|
||||
ovlabel = FCLabel('%s:' % _('Overlap'))
|
||||
@@ -260,8 +270,8 @@ class PaintEditorUI:
|
||||
self.paintoverlap_entry.setWrapping(True)
|
||||
self.paintoverlap_entry.setSingleStep(1)
|
||||
|
||||
grid.addWidget(ovlabel, 1, 0)
|
||||
grid.addWidget(self.paintoverlap_entry, 1, 1)
|
||||
param_grid.addWidget(ovlabel, 1, 0)
|
||||
param_grid.addWidget(self.paintoverlap_entry, 1, 1)
|
||||
|
||||
# Margin
|
||||
marginlabel = FCLabel('%s:' % _('Margin'))
|
||||
@@ -274,8 +284,8 @@ class PaintEditorUI:
|
||||
self.paintmargin_entry.set_range(-10000.0000, 10000.0000)
|
||||
self.paintmargin_entry.set_precision(self.decimals)
|
||||
|
||||
grid.addWidget(marginlabel, 2, 0)
|
||||
grid.addWidget(self.paintmargin_entry, 2, 1)
|
||||
param_grid.addWidget(marginlabel, 2, 0)
|
||||
param_grid.addWidget(self.paintmargin_entry, 2, 1)
|
||||
|
||||
# Method
|
||||
methodlabel = FCLabel('%s:' % _('Method'))
|
||||
@@ -295,8 +305,8 @@ class PaintEditorUI:
|
||||
[_("Standard"), _("Seed"), _("Lines")]
|
||||
)
|
||||
|
||||
grid.addWidget(methodlabel, 3, 0)
|
||||
grid.addWidget(self.paintmethod_combo, 3, 1)
|
||||
param_grid.addWidget(methodlabel, 3, 0)
|
||||
param_grid.addWidget(self.paintmethod_combo, 3, 1)
|
||||
|
||||
# Connect lines
|
||||
pathconnectlabel = FCLabel('%s:' % _("Connect"))
|
||||
@@ -306,8 +316,8 @@ class PaintEditorUI:
|
||||
)
|
||||
self.pathconnect_cb = FCCheckBox()
|
||||
|
||||
grid.addWidget(pathconnectlabel, 4, 0)
|
||||
grid.addWidget(self.pathconnect_cb, 4, 1)
|
||||
param_grid.addWidget(pathconnectlabel, 4, 0)
|
||||
param_grid.addWidget(self.pathconnect_cb, 4, 1)
|
||||
|
||||
contourlabel = FCLabel('%s:' % _("Contour"))
|
||||
contourlabel.setToolTip(
|
||||
@@ -316,8 +326,8 @@ class PaintEditorUI:
|
||||
)
|
||||
self.paintcontour_cb = FCCheckBox()
|
||||
|
||||
grid.addWidget(contourlabel, 5, 0)
|
||||
grid.addWidget(self.paintcontour_cb, 5, 1)
|
||||
param_grid.addWidget(contourlabel, 5, 0)
|
||||
param_grid.addWidget(self.paintcontour_cb, 5, 1)
|
||||
|
||||
# Buttons
|
||||
hlay = QtWidgets.QHBoxLayout()
|
||||
|
||||
@@ -204,6 +204,7 @@ class TextEditorUI:
|
||||
self.text_tool_frame = QtWidgets.QFrame()
|
||||
self.text_tool_frame.setContentsMargins(0, 0, 0, 0)
|
||||
self.layout.addWidget(self.text_tool_frame)
|
||||
|
||||
self.text_tools_box = QtWidgets.QVBoxLayout()
|
||||
self.text_tools_box.setContentsMargins(0, 0, 0, 0)
|
||||
self.text_tool_frame.setLayout(self.text_tools_box)
|
||||
@@ -212,13 +213,22 @@ class TextEditorUI:
|
||||
title_label = FCLabel("%s" % self.pluginName, size=16, bold=True)
|
||||
self.text_tools_box.addWidget(title_label)
|
||||
|
||||
self.param_label = FCLabel('%s' % _("Parameters"), color='blue', bold=True)
|
||||
self.text_tools_box.addWidget(self.param_label)
|
||||
|
||||
# #############################################################################################################
|
||||
# Tool Params Frame
|
||||
# #############################################################################################################
|
||||
tool_par_frame = FCFrame()
|
||||
self.text_tools_box.addWidget(tool_par_frame)
|
||||
|
||||
# Grid Layout
|
||||
self.grid_text = GLay(v_spacing=5, h_spacing=3)
|
||||
self.text_tools_box.addLayout(self.grid_text)
|
||||
param_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
tool_par_frame.setLayout(param_grid)
|
||||
|
||||
self.font_type_cb = QtWidgets.QFontComboBox()
|
||||
self.grid_text.addWidget(FCLabel('%s:' % _("Font")), 0, 0)
|
||||
self.grid_text.addWidget(self.font_type_cb, 0, 1)
|
||||
param_grid.addWidget(FCLabel('%s:' % _("Font")), 0, 0)
|
||||
param_grid.addWidget(self.font_type_cb, 0, 1)
|
||||
|
||||
# Font size
|
||||
hlay = QtWidgets.QHBoxLayout()
|
||||
@@ -249,21 +259,30 @@ class TextEditorUI:
|
||||
self.font_italic_tb.setIcon(QtGui.QIcon(self.app.resource_location + '/italic32.png'))
|
||||
hlay.addWidget(self.font_italic_tb)
|
||||
|
||||
self.grid_text.addWidget(FCLabel('%s:' % _("Size")), 2, 0)
|
||||
self.grid_text.addLayout(hlay, 2, 1)
|
||||
param_grid.addWidget(FCLabel('%s:' % _("Size")), 2, 0)
|
||||
param_grid.addLayout(hlay, 2, 1)
|
||||
|
||||
# Text input
|
||||
self.grid_text.addWidget(FCLabel('%s:' % _("Text")), 4, 0, 1, 2)
|
||||
self.text_tools_box.addWidget(FCLabel('%s:' % _("Text"), bold=True, color='green'))
|
||||
# #############################################################################################################
|
||||
# Text Frame
|
||||
# #############################################################################################################
|
||||
text_frame = FCFrame()
|
||||
self.text_tools_box.addWidget(text_frame)
|
||||
|
||||
# Grid Layout
|
||||
text_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
text_frame.setLayout(text_grid)
|
||||
|
||||
self.text_input_entry = FCTextAreaRich()
|
||||
self.text_input_entry.setTabStopDistance(12)
|
||||
self.text_input_entry.setMinimumHeight(200)
|
||||
# self.text_input_entry.setMaximumHeight(150)
|
||||
|
||||
self.grid_text.addWidget(self.text_input_entry, 6, 0, 1, 2)
|
||||
text_grid.addWidget(self.text_input_entry, 0, 0, 1, 2)
|
||||
|
||||
# Buttons
|
||||
self.apply_button = FCButton(_("Apply"))
|
||||
self.grid_text.addWidget(self.apply_button, 8, 0, 1, 2)
|
||||
self.text_tools_box.addWidget(self.apply_button)
|
||||
|
||||
# self.layout.addStretch()
|
||||
|
||||
@@ -611,13 +611,21 @@ class TransformationEditorUI:
|
||||
# ## Title
|
||||
title_label = FCLabel("%s" % self.pluginName, size=16, bold=True)
|
||||
self.layout.addWidget(title_label)
|
||||
self.layout.addWidget(FCLabel(''))
|
||||
|
||||
# ## Layout
|
||||
grid0 = GLay(v_spacing=5, h_spacing=3, c_stretch=[0, 1, 0])
|
||||
self.layout.addLayout(grid0)
|
||||
# #############################################################################################################
|
||||
# PARAMETERS
|
||||
# #############################################################################################################
|
||||
self.transform_label = FCLabel('%s' % _("Parameters"), color='blue', bold=True)
|
||||
self.layout.addWidget(self.transform_label)
|
||||
|
||||
grid0.addWidget(FCLabel(''))
|
||||
# #############################################################################################################
|
||||
# Reference Frame
|
||||
# #############################################################################################################
|
||||
ref_frame = FCFrame()
|
||||
self.layout.addWidget(ref_frame)
|
||||
|
||||
ref_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
ref_frame.setLayout(ref_grid)
|
||||
|
||||
# Reference
|
||||
ref_label = FCLabel('%s:' % _("Reference"))
|
||||
@@ -633,8 +641,8 @@ class TransformationEditorUI:
|
||||
self.ref_items = [_("Origin"), _("Selection"), _("Point"), _("Minimum")]
|
||||
self.ref_combo.addItems(self.ref_items)
|
||||
|
||||
grid0.addWidget(ref_label, 0, 0)
|
||||
grid0.addWidget(self.ref_combo, 0, 1, 1, 2)
|
||||
ref_grid.addWidget(ref_label, 0, 0)
|
||||
ref_grid.addWidget(self.ref_combo, 0, 1, 1, 2)
|
||||
|
||||
self.point_label = FCLabel('%s:' % _("Value"))
|
||||
self.point_label.setToolTip(
|
||||
@@ -642,23 +650,35 @@ class TransformationEditorUI:
|
||||
)
|
||||
self.point_entry = NumericalEvalTupleEntry()
|
||||
|
||||
grid0.addWidget(self.point_label, 1, 0)
|
||||
grid0.addWidget(self.point_entry, 1, 1, 1, 2)
|
||||
ref_grid.addWidget(self.point_label, 2, 0)
|
||||
ref_grid.addWidget(self.point_entry, 2, 1, 1, 2)
|
||||
|
||||
self.point_button = FCButton(_("Add"))
|
||||
self.point_button.setToolTip(
|
||||
_("Add point coordinates from clipboard.")
|
||||
)
|
||||
grid0.addWidget(self.point_button, 2, 0, 1, 3)
|
||||
ref_grid.addWidget(self.point_button, 4, 0, 1, 3)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid0.addWidget(separator_line, 5, 0, 1, 3)
|
||||
# separator_line = QtWidgets.QFrame()
|
||||
# separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
# separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
# grid0.addWidget(separator_line, 5, 0, 1, 3)
|
||||
|
||||
# #############################################################################################################
|
||||
# Rotate Frame
|
||||
# #############################################################################################################
|
||||
rotate_title_lbl = FCLabel('%s' % self.rotateName, color='tomato', bold=True)
|
||||
self.layout.addWidget(rotate_title_lbl)
|
||||
|
||||
rot_frame = FCFrame()
|
||||
self.layout.addWidget(rot_frame)
|
||||
|
||||
rot_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
rot_frame.setLayout(rot_grid)
|
||||
|
||||
# ## Rotate Title
|
||||
rotate_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.rotateName)
|
||||
grid0.addWidget(rotate_title_label, 6, 0, 1, 3)
|
||||
rot_grid.addWidget(rotate_title_label, 0, 0, 1, 3)
|
||||
|
||||
self.rotate_label = FCLabel('%s:' % _("Angle"))
|
||||
self.rotate_label.setToolTip(
|
||||
@@ -684,26 +704,35 @@ class TransformationEditorUI:
|
||||
)
|
||||
self.rotate_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.rotate_label, 7, 0)
|
||||
grid0.addWidget(self.rotate_entry, 7, 1)
|
||||
grid0.addWidget(self.rotate_button, 7, 2)
|
||||
rot_grid.addWidget(self.rotate_label, 2, 0)
|
||||
rot_grid.addWidget(self.rotate_entry, 2, 1)
|
||||
rot_grid.addWidget(self.rotate_button, 2, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid0.addWidget(separator_line, 8, 0, 1, 3)
|
||||
# #############################################################################################################
|
||||
# Skew Frame
|
||||
# #############################################################################################################
|
||||
s_t_lay = QtWidgets.QHBoxLayout()
|
||||
self.layout.addLayout(s_t_lay)
|
||||
|
||||
# ## Skew Title
|
||||
skew_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.skewName)
|
||||
grid0.addWidget(skew_title_label, 9, 0, 1, 2)
|
||||
skew_title_lbl = FCLabel('%s' % self.skewName, color='teal', bold=True)
|
||||
s_t_lay.addWidget(skew_title_lbl)
|
||||
|
||||
s_t_lay.addStretch()
|
||||
|
||||
# ## Link Skew factors
|
||||
self.skew_link_cb = FCCheckBox()
|
||||
self.skew_link_cb.setText(_("Link"))
|
||||
self.skew_link_cb.setToolTip(
|
||||
_("Link the Y entry to X entry and copy its content.")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.skew_link_cb, 9, 2)
|
||||
s_t_lay.addWidget(self.skew_link_cb)
|
||||
|
||||
skew_frame = FCFrame()
|
||||
self.layout.addWidget(skew_frame)
|
||||
|
||||
skew_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
skew_frame.setLayout(skew_grid)
|
||||
|
||||
self.skewx_label = FCLabel('%s:' % _("X angle"))
|
||||
self.skewx_label.setToolTip(
|
||||
@@ -722,9 +751,9 @@ class TransformationEditorUI:
|
||||
"the bounding box for all selected objects."))
|
||||
self.skewx_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.skewx_label, 10, 0)
|
||||
grid0.addWidget(self.skewx_entry, 10, 1)
|
||||
grid0.addWidget(self.skewx_button, 10, 2)
|
||||
skew_grid.addWidget(self.skewx_label, 0, 0)
|
||||
skew_grid.addWidget(self.skewx_entry, 0, 1)
|
||||
skew_grid.addWidget(self.skewx_button, 0, 2)
|
||||
|
||||
self.skewy_label = FCLabel('%s:' % _("Y angle"))
|
||||
self.skewy_label.setToolTip(
|
||||
@@ -743,29 +772,36 @@ class TransformationEditorUI:
|
||||
"the bounding box for all selected objects."))
|
||||
self.skewy_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.skewy_label, 12, 0)
|
||||
grid0.addWidget(self.skewy_entry, 12, 1)
|
||||
grid0.addWidget(self.skewy_button, 12, 2)
|
||||
skew_grid.addWidget(self.skewy_label, 2, 0)
|
||||
skew_grid.addWidget(self.skewy_entry, 2, 1)
|
||||
skew_grid.addWidget(self.skewy_button, 2, 2)
|
||||
|
||||
self.ois_sk = OptionalInputSection(self.skew_link_cb, [self.skewy_label, self.skewy_entry, self.skewy_button],
|
||||
logic=False)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid0.addWidget(separator_line, 14, 0, 1, 3)
|
||||
# #############################################################################################################
|
||||
# Scale Frame
|
||||
# #############################################################################################################
|
||||
sc_t_lay = QtWidgets.QHBoxLayout()
|
||||
self.layout.addLayout(sc_t_lay)
|
||||
|
||||
# ## Scale Title
|
||||
scale_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.scaleName)
|
||||
grid0.addWidget(scale_title_label, 15, 0, 1, 2)
|
||||
scale_title_lbl = FCLabel('%s' % self.scaleName, color='magenta', bold=True)
|
||||
sc_t_lay.addWidget(scale_title_lbl)
|
||||
|
||||
self.scale_link_cb = FCCheckBox()
|
||||
self.scale_link_cb.setText(_("Link"))
|
||||
sc_t_lay.addStretch()
|
||||
|
||||
# ## Link Scale factors
|
||||
self.scale_link_cb = FCCheckBox(_("Link"))
|
||||
self.scale_link_cb.setToolTip(
|
||||
_("Link the Y entry to X entry and copy its content.")
|
||||
)
|
||||
sc_t_lay.addWidget(self.scale_link_cb)
|
||||
|
||||
grid0.addWidget(self.scale_link_cb, 15, 2)
|
||||
scale_frame = FCFrame()
|
||||
self.layout.addWidget(scale_frame)
|
||||
|
||||
scale_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
scale_frame.setLayout(scale_grid)
|
||||
|
||||
self.scalex_label = FCLabel('%s:' % _("X factor"))
|
||||
self.scalex_label.setToolTip(
|
||||
@@ -783,9 +819,9 @@ class TransformationEditorUI:
|
||||
"the Scale reference checkbox state."))
|
||||
self.scalex_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.scalex_label, 17, 0)
|
||||
grid0.addWidget(self.scalex_entry, 17, 1)
|
||||
grid0.addWidget(self.scalex_button, 17, 2)
|
||||
scale_grid.addWidget(self.scalex_label, 0, 0)
|
||||
scale_grid.addWidget(self.scalex_entry, 0, 1)
|
||||
scale_grid.addWidget(self.scalex_button, 0, 2)
|
||||
|
||||
self.scaley_label = FCLabel('%s:' % _("Y factor"))
|
||||
self.scaley_label.setToolTip(
|
||||
@@ -803,9 +839,9 @@ class TransformationEditorUI:
|
||||
"the Scale reference checkbox state."))
|
||||
self.scaley_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.scaley_label, 19, 0)
|
||||
grid0.addWidget(self.scaley_entry, 19, 1)
|
||||
grid0.addWidget(self.scaley_button, 19, 2)
|
||||
scale_grid.addWidget(self.scaley_label, 2, 0)
|
||||
scale_grid.addWidget(self.scaley_entry, 2, 1)
|
||||
scale_grid.addWidget(self.scaley_button, 2, 2)
|
||||
|
||||
self.ois_s = OptionalInputSection(self.scale_link_cb,
|
||||
[
|
||||
@@ -814,14 +850,17 @@ class TransformationEditorUI:
|
||||
self.scaley_button
|
||||
], logic=False)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid0.addWidget(separator_line, 21, 0, 1, 3)
|
||||
# #############################################################################################################
|
||||
# Mirror Frame
|
||||
# #############################################################################################################
|
||||
flip_title_label = FCLabel('%s' % self.flipName, color='brown', bold=True)
|
||||
self.layout.addWidget(flip_title_label)
|
||||
|
||||
# ## Flip Title
|
||||
flip_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.flipName)
|
||||
grid0.addWidget(flip_title_label, 23, 0, 1, 3)
|
||||
mirror_frame = FCFrame()
|
||||
self.layout.addWidget(mirror_frame)
|
||||
|
||||
mirror_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
mirror_frame.setLayout(mirror_grid)
|
||||
|
||||
self.flipx_button = FCButton(_("Flip on X"))
|
||||
self.flipx_button.setToolTip(
|
||||
@@ -834,19 +873,22 @@ class TransformationEditorUI:
|
||||
)
|
||||
|
||||
hlay0 = QtWidgets.QHBoxLayout()
|
||||
grid0.addLayout(hlay0, 25, 0, 1, 3)
|
||||
mirror_grid.addLayout(hlay0, 0, 0, 1, 3)
|
||||
|
||||
hlay0.addWidget(self.flipx_button)
|
||||
hlay0.addWidget(self.flipy_button)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid0.addWidget(separator_line, 27, 0, 1, 3)
|
||||
# #############################################################################################################
|
||||
# Offset Frame
|
||||
# #############################################################################################################
|
||||
offset_title_lbl = FCLabel('%s' % self.offsetName, color='green', bold=True)
|
||||
self.layout.addWidget(offset_title_lbl)
|
||||
|
||||
# ## Offset Title
|
||||
offset_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.offsetName)
|
||||
grid0.addWidget(offset_title_label, 29, 0, 1, 3)
|
||||
off_frame = FCFrame()
|
||||
self.layout.addWidget(off_frame)
|
||||
|
||||
off_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
off_frame.setLayout(off_grid)
|
||||
|
||||
self.offx_label = FCLabel('%s:' % _("X val"))
|
||||
self.offx_label.setToolTip(
|
||||
@@ -864,9 +906,9 @@ class TransformationEditorUI:
|
||||
"the bounding box for all selected objects.\n"))
|
||||
self.offx_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.offx_label, 31, 0)
|
||||
grid0.addWidget(self.offx_entry, 31, 1)
|
||||
grid0.addWidget(self.offx_button, 31, 2)
|
||||
off_grid.addWidget(self.offx_label, 0, 0)
|
||||
off_grid.addWidget(self.offx_entry, 0, 1)
|
||||
off_grid.addWidget(self.offx_button, 0, 2)
|
||||
|
||||
self.offy_label = FCLabel('%s:' % _("Y val"))
|
||||
self.offy_label.setToolTip(
|
||||
@@ -884,18 +926,20 @@ class TransformationEditorUI:
|
||||
"the bounding box for all selected objects.\n"))
|
||||
self.offy_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.offy_label, 32, 0)
|
||||
grid0.addWidget(self.offy_entry, 32, 1)
|
||||
grid0.addWidget(self.offy_button, 32, 2)
|
||||
off_grid.addWidget(self.offy_label, 2, 0)
|
||||
off_grid.addWidget(self.offy_entry, 2, 1)
|
||||
off_grid.addWidget(self.offy_button, 2, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid0.addWidget(separator_line, 34, 0, 1, 3)
|
||||
# #############################################################################################################
|
||||
# Buffer Frame
|
||||
# #############################################################################################################
|
||||
b_t_lay = QtWidgets.QHBoxLayout()
|
||||
self.layout.addLayout(b_t_lay)
|
||||
|
||||
# ## Buffer Title
|
||||
buffer_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.bufferName)
|
||||
grid0.addWidget(buffer_title_label, 35, 0, 1, 2)
|
||||
buffer_title_lbl = FCLabel('%s' % self.bufferName, color='indigo', bold=True)
|
||||
b_t_lay.addWidget(buffer_title_lbl)
|
||||
|
||||
b_t_lay.addStretch()
|
||||
|
||||
self.buffer_rounded_cb = FCCheckBox('%s' % _("Rounded"))
|
||||
self.buffer_rounded_cb.setToolTip(
|
||||
@@ -905,7 +949,13 @@ class TransformationEditorUI:
|
||||
"of the buffered shape.")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.buffer_rounded_cb, 35, 2)
|
||||
b_t_lay.addWidget(self.buffer_rounded_cb)
|
||||
|
||||
buff_frame = FCFrame()
|
||||
self.layout.addWidget(buff_frame)
|
||||
|
||||
buff_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
buff_frame.setLayout(buff_grid)
|
||||
|
||||
self.buffer_label = FCLabel('%s:' % _("Distance"))
|
||||
self.buffer_label.setToolTip(
|
||||
@@ -928,9 +978,9 @@ class TransformationEditorUI:
|
||||
)
|
||||
self.buffer_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.buffer_label, 37, 0)
|
||||
grid0.addWidget(self.buffer_entry, 37, 1)
|
||||
grid0.addWidget(self.buffer_button, 37, 2)
|
||||
buff_grid.addWidget(self.buffer_label, 0, 0)
|
||||
buff_grid.addWidget(self.buffer_entry, 0, 1)
|
||||
buff_grid.addWidget(self.buffer_button, 0, 2)
|
||||
|
||||
self.buffer_factor_label = FCLabel('%s:' % _("Value"))
|
||||
self.buffer_factor_label.setToolTip(
|
||||
@@ -954,13 +1004,15 @@ class TransformationEditorUI:
|
||||
)
|
||||
self.buffer_factor_button.setMinimumWidth(90)
|
||||
|
||||
grid0.addWidget(self.buffer_factor_label, 38, 0)
|
||||
grid0.addWidget(self.buffer_factor_entry, 38, 1)
|
||||
grid0.addWidget(self.buffer_factor_button, 38, 2)
|
||||
buff_grid.addWidget(self.buffer_factor_label, 2, 0)
|
||||
buff_grid.addWidget(self.buffer_factor_entry, 2, 1)
|
||||
buff_grid.addWidget(self.buffer_factor_button, 2, 2)
|
||||
|
||||
grid0.addWidget(FCLabel(''), 42, 0, 1, 3)
|
||||
GLay.set_common_column_size(
|
||||
[ref_grid, rot_grid, skew_grid, scale_grid, mirror_grid, off_grid, buff_grid], 0)
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
self.ref_combo.currentIndexChanged.connect(self.on_reference_changed)
|
||||
|
||||
def on_reference_changed(self, index):
|
||||
@@ -968,7 +1020,6 @@ class TransformationEditorUI:
|
||||
self.point_label.hide()
|
||||
self.point_entry.hide()
|
||||
self.point_button.hide()
|
||||
|
||||
elif index == 2: # "Point" reference
|
||||
self.point_label.show()
|
||||
self.point_entry.show()
|
||||
|
||||
Reference in New Issue
Block a user