Draft: add modules of drafttaskpanels to the proper Doxygen group
This includes `task_circulararray`, `task_orthoarray`, `task_polararray`, `task_scale`, `task_selectplane`, `task_shapestring`. These are added to the `drafttaskpanels` Doxygen group so that the functions and classes contained in each module are listed appropriately in the automatically generated documentation.
This commit is contained in:
@@ -22,9 +22,11 @@
|
||||
# ***************************************************************************
|
||||
"""Provides the task panel code for the Draft CircularArray tool."""
|
||||
## @package task_circulararray
|
||||
# \ingroup DRAFT
|
||||
# \brief This module provides the task panel code for the CircularArray tool.
|
||||
# \ingroup drafttaskpanels
|
||||
# \brief Provides the task panel code for the Draft CircularArray tool.
|
||||
|
||||
## \addtogroup drafttaskpanels
|
||||
# @{
|
||||
import PySide.QtGui as QtGui
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
@@ -502,3 +504,5 @@ class TaskPanelCircularArray:
|
||||
Gui.ActiveDocument.resetEdit()
|
||||
# Runs the parent command to complete the call
|
||||
self.source_command.completed()
|
||||
|
||||
## @}
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the task panel for the Draft OrthoArray tool."""
|
||||
"""Provides the task panel code for the Draft OrthoArray tool."""
|
||||
## @package task_orthoarray
|
||||
# \ingroup DRAFT
|
||||
# \brief Provide the task panel for the Draft OrthoArray tool.
|
||||
# \ingroup drafttaskpanels
|
||||
# \brief Provides the task panel code for the Draft OrthoArray tool.
|
||||
|
||||
## \addtogroup drafttaskpanels
|
||||
# @{
|
||||
import PySide.QtGui as QtGui
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
@@ -408,3 +410,5 @@ class TaskPanelOrthoArray:
|
||||
Gui.ActiveDocument.resetEdit()
|
||||
# Runs the parent command to complete the call
|
||||
self.source_command.completed()
|
||||
|
||||
## @}
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the task panel for the Draft PolarArray tool."""
|
||||
"""Provides the task panel code for the Draft PolarArray tool."""
|
||||
## @package task_polararray
|
||||
# \ingroup DRAFT
|
||||
# \brief This module provides the task panel code for the PolarArray tool.
|
||||
# \ingroup drafttaskpanels
|
||||
# \brief Provides the task panel code for the Draft PolarArray tool.
|
||||
|
||||
## \addtogroup drafttaskpanels
|
||||
# @{
|
||||
import PySide.QtGui as QtGui
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
@@ -448,3 +450,5 @@ class TaskPanelPolarArray:
|
||||
Gui.ActiveDocument.resetEdit()
|
||||
# Runs the parent command to complete the call
|
||||
self.source_command.completed()
|
||||
|
||||
## @}
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
"""Provide the task panel for the Draft Scale tool."""
|
||||
## @package task_scale
|
||||
# \ingroup DRAFT
|
||||
# \brief Provide the task panel for the Draft Scale tool.
|
||||
|
||||
# ***************************************************************************
|
||||
# * (c) 2009 Yorik van Havre <yorik@uncreated.net> *
|
||||
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
|
||||
@@ -26,16 +21,22 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the task panel code for the Draft Scale tool."""
|
||||
## @package task_scale
|
||||
# \ingroup drafttaskpanels
|
||||
# \brief Provides the task panel code for the Draft Scale tool.
|
||||
|
||||
## \addtogroup drafttaskpanels
|
||||
# @{
|
||||
import PySide.QtCore as QtCore
|
||||
import PySide.QtGui as QtGui
|
||||
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
import Draft
|
||||
import Draft_rc
|
||||
import PySide.QtCore as QtCore
|
||||
import PySide.QtGui as QtGui
|
||||
from draftutils.translate import translate
|
||||
_Quantity = App.Units.Quantity
|
||||
|
||||
from draftutils.translate import translate
|
||||
|
||||
# So the resource file doesn't trigger errors from code checkers (flake8)
|
||||
True if Draft_rc.__name__ else False
|
||||
@@ -155,3 +156,5 @@ class ScaleTaskPanel:
|
||||
self.sourceCmd.finish()
|
||||
Gui.ActiveDocument.resetEdit()
|
||||
return True
|
||||
|
||||
## @}
|
||||
|
||||
@@ -20,24 +20,27 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the task panel for the Draft SelectPlane tool."""
|
||||
"""Provides the task panel code for the Draft SelectPlane tool.
|
||||
|
||||
As it is right now this code only loads the task panel .ui file.
|
||||
All logic on how to use the widgets is located in the GuiCommand class
|
||||
itself.
|
||||
On the other hand, the newer tools introduced in v0.19 like OrthoArray,
|
||||
PolarArray, and CircularArray include the logic and manipulation
|
||||
of the widgets in this task panel class.
|
||||
In addition, the task panel code launches the actual function
|
||||
using the delayed mechanism defined by the `todo.ToDo` class.
|
||||
Therefore, at some point this class should be refactored
|
||||
to be more similar to OrthoArray and the new tools.
|
||||
"""
|
||||
## @package task_selectplane
|
||||
# \ingroup DRAFT
|
||||
# \brief This module provides the task panel code for the SelectPlane tool.
|
||||
# \ingroup drafttaskpanels
|
||||
# \brief Provides the task panel code for the Draft SelectPlane tool.
|
||||
|
||||
## \addtogroup drafttaskpanels
|
||||
# @{
|
||||
import FreeCADGui as Gui
|
||||
|
||||
# As it is right now this code only loads the task panel .ui file.
|
||||
# All logic on how to use the widgets is located in the GuiCommand class
|
||||
# itself.
|
||||
# On the other hand, the newer tools introduced in v0.19 like OrthoArray,
|
||||
# PolarArray, and CircularArray include the logic and manipulation
|
||||
# of the widgets in this task panel class.
|
||||
# In addition, the task panel code launches the actual function
|
||||
# using the delayed mechanism defined by the `todo.ToDo` class.
|
||||
# Therefore, at some point this class should be refactored
|
||||
# to be more similar to OrthoArray and the new tools.
|
||||
|
||||
|
||||
class SelectPlaneTaskPanel:
|
||||
"""The task panel definition of the Draft_SelectPlane command."""
|
||||
@@ -48,3 +51,5 @@ class SelectPlaneTaskPanel:
|
||||
def getStandardButtons(self):
|
||||
"""Execute to set the standard buttons."""
|
||||
return 2097152 # int(QtGui.QDialogButtonBox.Close)
|
||||
|
||||
## @}
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
"""Provide the task panel for the Draft ShapeString tool."""
|
||||
## @package task_shapestring
|
||||
# \ingroup DRAFT
|
||||
# \brief Provide the task panel for the Draft ShapeString tool.
|
||||
|
||||
# ***************************************************************************
|
||||
# * (c) 2009 Yorik van Havre <yorik@uncreated.net> *
|
||||
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
|
||||
@@ -26,21 +21,28 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Provides the task panel code for the Draft ShapeString tool."""
|
||||
## @package task_shapestring
|
||||
# \ingroup drafttaskpanels
|
||||
# \brief Provides the task panel code for the Draft ShapeString tool.
|
||||
|
||||
## \addtogroup drafttaskpanels
|
||||
# @{
|
||||
import sys
|
||||
import PySide.QtCore as QtCore
|
||||
import PySide.QtGui as QtGui
|
||||
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
import Draft
|
||||
import Draft_rc
|
||||
import DraftVecUtils
|
||||
import DraftTools
|
||||
import PySide.QtCore as QtCore
|
||||
import PySide.QtGui as QtGui
|
||||
import draftguitools.gui_tool_utils as gui_tool_utils
|
||||
|
||||
from FreeCAD import Units as U
|
||||
from draftutils.translate import translate
|
||||
from draftutils.messages import _msg, _err
|
||||
|
||||
_Quantity = App.Units.Quantity
|
||||
|
||||
|
||||
# So the resource file doesn't trigger errors from code checkers (flake8)
|
||||
True if Draft_rc.__name__ else False
|
||||
|
||||
@@ -60,7 +62,7 @@ class ShapeStringTaskPanel:
|
||||
self.task = loader.load(uiFile)
|
||||
layout.addWidget(self.task)
|
||||
|
||||
qStart = _Quantity(0.0, App.Units.Length)
|
||||
qStart = U.Quantity(0.0, U.Length)
|
||||
self.task.sbX.setProperty('rawValue', qStart.Value)
|
||||
self.task.sbX.setProperty('unit', qStart.getUserPreferred()[2])
|
||||
self.task.sbY.setProperty('rawValue', qStart.Value)
|
||||
@@ -101,7 +103,7 @@ class ShapeStringTaskPanel:
|
||||
if arg["Key"] == "ESCAPE":
|
||||
self.reject()
|
||||
elif arg["Type"] == "SoLocation2Event": # mouse movement detection
|
||||
self.point,ctrlPoint,info = DraftTools.getPoint(self.sourceCmd, arg, noTracker=True)
|
||||
self.point,ctrlPoint,info = gui_tool_utils.getPoint(self.sourceCmd, arg, noTracker=True)
|
||||
if not self.pointPicked:
|
||||
self.setPoint(self.point)
|
||||
elif arg["Type"] == "SoMouseButtonEvent":
|
||||
@@ -124,11 +126,11 @@ class ShapeStringTaskPanel:
|
||||
String = dquote + self.task.leString.text() + dquote
|
||||
FFile = dquote + str(self.fileSpec) + dquote
|
||||
|
||||
Size = str(_Quantity(self.task.sbHeight.text()).Value)
|
||||
Size = str(U.Quantity(self.task.sbHeight.text()).Value)
|
||||
Tracking = str(0.0)
|
||||
x = _Quantity(self.task.sbX.text()).Value
|
||||
y = _Quantity(self.task.sbY.text()).Value
|
||||
z = _Quantity(self.task.sbZ.text()).Value
|
||||
x = U.Quantity(self.task.sbX.text()).Value
|
||||
y = U.Quantity(self.task.sbY.text()).Value
|
||||
z = U.Quantity(self.task.sbZ.text()).Value
|
||||
ssBase = App.Vector(x, y, z)
|
||||
# this try block is almost identical to the one in DraftTools
|
||||
try:
|
||||
@@ -188,3 +190,5 @@ class ShapeStringTaskPanel:
|
||||
self.sourceCmd.creator.finish(self.sourceCmd)
|
||||
self.platWinDialog("Restore")
|
||||
return True
|
||||
|
||||
## @}
|
||||
|
||||
Reference in New Issue
Block a user