diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui
index 7c378421e8..d80e6c992d 100644
--- a/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui
+++ b/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui
@@ -26,7 +26,7 @@
Circular array
- -
+
-
@@ -39,13 +39,6 @@
-
-
-
- (Placeholder for the icon)
-
-
-
- -
-
@@ -63,7 +56,7 @@
Distance from one layer of objects to the next layer of objects.
-
+ mm
200.000000000000000
@@ -88,7 +81,7 @@ It cannot be zero.
It cannot be zero.
-
+ mm
100.000000000000000
@@ -133,7 +126,7 @@ It must be at least 2.
- -
+
-
The number of symmetry lines in the circular array.
@@ -148,7 +141,7 @@ It must be at least 2.
- -
+
-
The coordinates of the point through which the axis of rotation passes.
@@ -176,11 +169,11 @@ Change the direction of the axis itself in the property editor.
-
+ mm
- -
+
-
Y
@@ -196,7 +189,7 @@ Change the direction of the axis itself in the property editor.
-
+ mm
@@ -216,7 +209,7 @@ Change the direction of the axis itself in the property editor.
-
+ mm
@@ -235,7 +228,7 @@ Change the direction of the axis itself in the property editor.
- -
+
-
-
@@ -264,7 +257,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f
- -
+
-
Qt::Vertical
diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui
index 2211ecbfe5..3538807d34 100644
--- a/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui
+++ b/src/Mod/Draft/Resources/ui/TaskPanel_OrthoArray.ui
@@ -26,7 +26,7 @@
Orthogonal array
-
-
+
-
@@ -183,7 +183,7 @@ The number must be at least 1 in each direction.
- -
+
-
Distance between the elements in the X direction.
@@ -212,7 +212,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
100.000000000000000
@@ -226,7 +226,7 @@ Negative values will result in copies produced in the negative direction.
- -
+
-
@@ -235,7 +235,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
@@ -255,7 +255,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
@@ -274,7 +274,7 @@ Negative values will result in copies produced in the negative direction.
- -
+
-
Distance between the elements in the Y direction.
@@ -303,7 +303,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
@@ -323,7 +323,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
100.000000000000000
@@ -346,7 +346,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
@@ -365,7 +365,7 @@ Negative values will result in copies produced in the negative direction.
- -
+
-
Distance between the elements in the Z direction.
@@ -394,7 +394,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
@@ -414,7 +414,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
@@ -434,7 +434,7 @@ Negative values will result in copies produced in the negative direction.
-
+ mm
100.000000000000000
@@ -456,7 +456,7 @@ Negative values will result in copies produced in the negative direction.
- -
+
-
-
@@ -485,7 +485,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f
- -
+
-
Qt::Vertical
diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui
index 4d97d5476d..dbd90d4390 100644
--- a/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui
+++ b/src/Mod/Draft/Resources/ui/TaskPanel_PolarArray.ui
@@ -26,7 +26,7 @@
Polar array
-
-
+
-
@@ -39,13 +39,6 @@
-
-
-
- (Placeholder for the icon)
-
-
-
- -
-
@@ -67,7 +60,7 @@ A negative angle produces a polar pattern in the opposite direction.
The maximum absolute value is 360 degrees.
-
+ °
-360.000000000000000
@@ -110,7 +103,7 @@ It must be at least 2.
- -
+
-
The coordinates of the point through which the axis of rotation passes.
@@ -138,7 +131,7 @@ Change the direction of the axis itself in the property editor.
-
+ mm
@@ -149,7 +142,7 @@ Change the direction of the axis itself in the property editor.
- -
+
-
@@ -158,7 +151,7 @@ Change the direction of the axis itself in the property editor.
-
+ mm
@@ -178,7 +171,7 @@ Change the direction of the axis itself in the property editor.
-
+ mm
@@ -197,7 +190,7 @@ Change the direction of the axis itself in the property editor.
- -
+
-
-
@@ -226,7 +219,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f
- -
+
-
Qt::Vertical
diff --git a/src/Mod/Draft/Resources/ui/TaskShapeString.ui b/src/Mod/Draft/Resources/ui/TaskShapeString.ui
index 75ae57f9bf..37a85179f7 100644
--- a/src/Mod/Draft/Resources/ui/TaskShapeString.ui
+++ b/src/Mod/Draft/Resources/ui/TaskShapeString.ui
@@ -53,7 +53,7 @@
Enter coordinates or select point with mouse.
-
+ mm
@@ -70,7 +70,7 @@
Enter coordinates or select point with mouse.
-
+ mm
@@ -87,7 +87,7 @@
Enter coordinates or select point with mouse.
-
+ mm
@@ -128,7 +128,7 @@ Uncheck to use working plane coordinate system
Height of the result
-
+ mm
0.000000000000000
diff --git a/src/Mod/Draft/drafttaskpanels/task_circulararray.py b/src/Mod/Draft/drafttaskpanels/task_circulararray.py
index c2cffabba3..31d5361b35 100644
--- a/src/Mod/Draft/drafttaskpanels/task_circulararray.py
+++ b/src/Mod/Draft/drafttaskpanels/task_circulararray.py
@@ -78,66 +78,31 @@ class TaskPanelCircularArray:
"""
def __init__(self):
- self.name = "Circular array"
- _log(translate("draft","Task panel:") + " {}".format(translate("draft","Circular array")))
- # The .ui file must be loaded into an attribute
- # called `self.form` so that it is displayed in the task panel.
- ui_file = ":/ui/TaskPanel_CircularArray.ui"
- self.form = Gui.PySideUic.loadUi(ui_file)
-
- icon_name = "Draft_CircularArray"
- svg = ":/icons/" + icon_name
- pix = QtGui.QPixmap(svg)
- icon = QtGui.QIcon.fromTheme(icon_name, QtGui.QIcon(svg))
- self.form.setWindowIcon(icon)
- self.form.setWindowTitle(translate("draft","Circular array"))
-
- self.form.label_icon.setPixmap(pix.scaled(32, 32))
+ self.form = Gui.PySideUic.loadUi(":/ui/TaskPanel_CircularArray.ui")
+ self.form.setWindowTitle(translate("draft", "Circular array"))
+ self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_CircularArray.svg"))
# -------------------------------------------------------------------
- # Default values for the internal function,
- # and for the task panel interface
- start_distance = U.Quantity(50.0, App.Units.Length)
- length_unit = start_distance.getUserPreferred()[2]
-
- self.r_distance = 2 * start_distance.Value
- self.tan_distance = start_distance.Value
-
- self.form.spinbox_r_distance.setProperty('rawValue',
- self.r_distance)
- self.form.spinbox_r_distance.setProperty('unit', length_unit)
- self.form.spinbox_tan_distance.setProperty('rawValue',
- self.tan_distance)
- self.form.spinbox_tan_distance.setProperty('unit', length_unit)
-
- self.number = 3
- self.symmetry = 1
-
- self.form.spinbox_number.setValue(self.number)
- self.form.spinbox_symmetry.setValue(self.symmetry)
-
+ # Default values for the internal function, and for the task panel interface
+ self.center = App.Vector()
# TODO: the axis is currently fixed, it should be editable
# or selectable from the task panel
self.axis = App.Vector(0, 0, 1)
-
- start_point = U.Quantity(0.0, App.Units.Length)
- length_unit = start_point.getUserPreferred()[2]
-
- self.center = App.Vector(start_point.Value,
- start_point.Value,
- start_point.Value)
-
- self.form.input_c_x.setProperty('rawValue', self.center.x)
- self.form.input_c_x.setProperty('unit', length_unit)
- self.form.input_c_y.setProperty('rawValue', self.center.y)
- self.form.input_c_y.setProperty('unit', length_unit)
- self.form.input_c_z.setProperty('rawValue', self.center.z)
- self.form.input_c_z.setProperty('unit', length_unit)
-
+ self.r_distance = 100
+ self.tan_distance = 50
+ self.number = 3
+ self.symmetry = 1
self.fuse = params.get_param("Draft_array_fuse")
self.use_link = params.get_param("Draft_array_Link")
+ self.form.input_c_x.setProperty('rawValue', self.center.x)
+ self.form.input_c_y.setProperty('rawValue', self.center.y)
+ self.form.input_c_z.setProperty('rawValue', self.center.z)
+ self.form.spinbox_r_distance.setProperty('rawValue', self.r_distance)
+ self.form.spinbox_tan_distance.setProperty('rawValue', self.tan_distance)
+ self.form.spinbox_number.setValue(self.number)
+ self.form.spinbox_symmetry.setValue(self.symmetry)
self.form.checkbox_fuse.setChecked(self.fuse)
self.form.checkbox_link.setChecked(self.use_link)
# -------------------------------------------------------------------
diff --git a/src/Mod/Draft/drafttaskpanels/task_orthoarray.py b/src/Mod/Draft/drafttaskpanels/task_orthoarray.py
index 93076d35e7..5be612a1a1 100644
--- a/src/Mod/Draft/drafttaskpanels/task_orthoarray.py
+++ b/src/Mod/Draft/drafttaskpanels/task_orthoarray.py
@@ -78,20 +78,10 @@ class TaskPanelOrthoArray:
"""
def __init__(self):
- self.name = "Orthogonal array"
- _log(translate("draft","Task panel:") + " {}".format(translate("draft","Orthogonal array")))
- # The .ui file must be loaded into an attribute
- # called `self.form` so that it is displayed in the task panel.
- ui_file = ":/ui/TaskPanel_OrthoArray.ui"
- self.form = Gui.PySideUic.loadUi(ui_file)
-
- icon_name = "Draft_Array"
- svg = ":/icons/" + icon_name
- pix = QtGui.QPixmap(svg)
- icon = QtGui.QIcon.fromTheme(icon_name, QtGui.QIcon(svg))
- self.form.setWindowIcon(icon)
- self.form.setWindowTitle(translate("draft","Orthogonal array"))
+ self.form = Gui.PySideUic.loadUi(":/ui/TaskPanel_OrthoArray.ui")
+ self.form.setWindowTitle(translate("draft", "Orthogonal array"))
+ self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_Array.svg"))
# -------------------------------------------------------------------
# Default values for the internal function,
@@ -100,32 +90,21 @@ class TaskPanelOrthoArray:
start_y = params.get_param("YInterval", "Mod/Draft/OrthoArrayLinearMode")
start_z = params.get_param("ZInterval", "Mod/Draft/OrthoArrayLinearMode")
- length_unit = App.Units.Quantity(0.0, App.Units.Length).getUserPreferred()[2]
-
self.v_x = App.Vector(start_x, 0, 0)
self.v_y = App.Vector(0, start_y, 0)
self.v_z = App.Vector(0, 0, start_z)
self.form.input_X_x.setProperty('rawValue', self.v_x.x)
- self.form.input_X_x.setProperty('unit', length_unit)
self.form.input_X_y.setProperty('rawValue', self.v_x.y)
- self.form.input_X_y.setProperty('unit', length_unit)
self.form.input_X_z.setProperty('rawValue', self.v_x.z)
- self.form.input_X_z.setProperty('unit', length_unit)
self.form.input_Y_x.setProperty('rawValue', self.v_y.x)
- self.form.input_Y_x.setProperty('unit', length_unit)
self.form.input_Y_y.setProperty('rawValue', self.v_y.y)
- self.form.input_Y_y.setProperty('unit', length_unit)
self.form.input_Y_z.setProperty('rawValue', self.v_y.z)
- self.form.input_Y_z.setProperty('unit', length_unit)
self.form.input_Z_x.setProperty('rawValue', self.v_z.x)
- self.form.input_Z_x.setProperty('unit', length_unit)
self.form.input_Z_y.setProperty('rawValue', self.v_z.y)
- self.form.input_Z_y.setProperty('unit', length_unit)
self.form.input_Z_z.setProperty('rawValue', self.v_z.z)
- self.form.input_Z_z.setProperty('unit', length_unit)
self.n_x = params.get_param("XNumOfElements", "Mod/Draft/OrthoArrayLinearMode")
self.n_y = params.get_param("YNumOfElements", "Mod/Draft/OrthoArrayLinearMode")
@@ -245,8 +224,8 @@ class TaskPanelOrthoArray:
# we should not ever do this but maybe a sanity check here?
if self.linear_mode:
- if not (self.form.radiobutton_x_axis.isChecked() or
- self.form.radiobutton_y_axis.isChecked() or
+ if not (self.form.radiobutton_x_axis.isChecked() or
+ self.form.radiobutton_y_axis.isChecked() or
self.form.radiobutton_z_axis.isChecked()):
_err(translate("draft","In Linear mode, at least one axis must be selected."))
return False
@@ -442,7 +421,7 @@ class TaskPanelOrthoArray:
if self.linear_mode:
self.form.button_linear_mode.setText(translate("draft", "Switch to ortho mode"))
-
+
# check radiobutton based on current cfg
self.update_axis_ui()
diff --git a/src/Mod/Draft/drafttaskpanels/task_polararray.py b/src/Mod/Draft/drafttaskpanels/task_polararray.py
index ceb6d7769a..267b8193c5 100644
--- a/src/Mod/Draft/drafttaskpanels/task_polararray.py
+++ b/src/Mod/Draft/drafttaskpanels/task_polararray.py
@@ -78,54 +78,24 @@ class TaskPanelPolarArray:
"""
def __init__(self):
- self.name = "Polar array"
- _log(translate("draft","Task panel:") + " {}".format(self.name))
- # The .ui file must be loaded into an attribute
- # called `self.form` so that it is displayed in the task panel.
- ui_file = ":/ui/TaskPanel_PolarArray.ui"
- self.form = Gui.PySideUic.loadUi(ui_file)
-
- icon_name = "Draft_PolarArray"
- svg = ":/icons/" + icon_name
- pix = QtGui.QPixmap(svg)
- icon = QtGui.QIcon.fromTheme(icon_name, QtGui.QIcon(svg))
- self.form.setWindowIcon(icon)
- self.form.setWindowTitle(translate("draft","Polar array"))
-
- self.form.label_icon.setPixmap(pix.scaled(32, 32))
+ self.form = Gui.PySideUic.loadUi(":/ui/TaskPanel_PolarArray.ui")
+ self.form.setWindowTitle(translate("draft", "Polar array"))
+ self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_PolarArray.svg"))
# -------------------------------------------------------------------
- # Default values for the internal function,
- # and for the task panel interface
- start_angle = U.Quantity(360.0, App.Units.Angle)
- angle_unit = start_angle.getUserPreferred()[2]
-
- self.angle = start_angle.Value
+ # Default values for the internal function, and for the task panel interface
+ self.center = App.Vector()
+ self.angle = 360
self.number = 5
-
- self.form.spinbox_angle.setProperty('rawValue', self.angle)
- self.form.spinbox_angle.setProperty('unit', angle_unit)
-
- self.form.spinbox_number.setValue(self.number)
-
- start_point = U.Quantity(0.0, App.Units.Length)
- length_unit = start_point.getUserPreferred()[2]
-
- self.center = App.Vector(start_point.Value,
- start_point.Value,
- start_point.Value)
-
- self.form.input_c_x.setProperty('rawValue', self.center.x)
- self.form.input_c_x.setProperty('unit', length_unit)
- self.form.input_c_y.setProperty('rawValue', self.center.y)
- self.form.input_c_y.setProperty('unit', length_unit)
- self.form.input_c_z.setProperty('rawValue', self.center.z)
- self.form.input_c_z.setProperty('unit', length_unit)
-
self.fuse = params.get_param("Draft_array_fuse")
self.use_link = params.get_param("Draft_array_Link")
+ self.form.input_c_x.setProperty('rawValue', self.center.x)
+ self.form.input_c_y.setProperty('rawValue', self.center.y)
+ self.form.input_c_z.setProperty('rawValue', self.center.z)
+ self.form.spinbox_angle.setProperty('rawValue', self.angle)
+ self.form.spinbox_number.setValue(self.number)
self.form.checkbox_fuse.setChecked(self.fuse)
self.form.checkbox_link.setChecked(self.use_link)
# -------------------------------------------------------------------
diff --git a/src/Mod/Draft/drafttaskpanels/task_shapestring.py b/src/Mod/Draft/drafttaskpanels/task_shapestring.py
index d6d89b7f60..13bb81b45e 100644
--- a/src/Mod/Draft/drafttaskpanels/task_shapestring.py
+++ b/src/Mod/Draft/drafttaskpanels/task_shapestring.py
@@ -51,16 +51,9 @@ class ShapeStringTaskPanel:
def __init__(self, point=None, size=None, string="", font=""):
self.form = Gui.PySideUic.loadUi(":/ui/TaskShapeString.ui")
- self.form.setObjectName("ShapeStringTaskPanel")
self.form.setWindowTitle(translate("draft", "ShapeString"))
self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_ShapeString.svg"))
- unit_length = App.Units.Quantity(0.0, App.Units.Length).getUserPreferred()[2]
- self.form.sbX.setProperty("unit", unit_length)
- self.form.sbY.setProperty("unit", unit_length)
- self.form.sbZ.setProperty("unit", unit_length)
- self.form.sbHeight.setProperty("unit", unit_length)
-
self.global_mode = params.get_param("GlobalMode")
self.form.cbGlobalMode.setChecked(self.global_mode)
self.change_coord_labels()