Black
This commit is contained in:
@@ -32,19 +32,25 @@ __author__ = "sliptonic (Brad Collette)"
|
||||
__url__ = "https://www.freecadweb.org"
|
||||
__doc__ = "Pocket operation page controller and command implementation."
|
||||
|
||||
|
||||
class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage):
|
||||
'''Page controller class for Pocket operation'''
|
||||
"""Page controller class for Pocket operation"""
|
||||
|
||||
def pocketFeatures(self):
|
||||
'''pocketFeatures() ... return FeaturePocket (see PathPocketBaseGui)'''
|
||||
"""pocketFeatures() ... return FeaturePocket (see PathPocketBaseGui)"""
|
||||
return PathPocketBaseGui.FeaturePocket
|
||||
|
||||
Command = PathOpGui.SetupOperation('Pocket 3D',
|
||||
PathPocket.Create,
|
||||
TaskPanelOpPage,
|
||||
'Path_3DPocket',
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "3D Pocket"),
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Creates a Path 3D Pocket object from a face or faces"),
|
||||
PathPocket.SetupProperties)
|
||||
|
||||
Command = PathOpGui.SetupOperation(
|
||||
"Pocket 3D",
|
||||
PathPocket.Create,
|
||||
TaskPanelOpPage,
|
||||
"Path_3DPocket",
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "3D Pocket"),
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"Path_Pocket", "Creates a Path 3D Pocket object from a face or faces"
|
||||
),
|
||||
PathPocket.SetupProperties,
|
||||
)
|
||||
|
||||
FreeCAD.Console.PrintLog("Loading PathPocketGui... done\n")
|
||||
|
||||
@@ -31,37 +31,48 @@ from PySide import QtCore
|
||||
|
||||
# lazily loaded modules
|
||||
from lazy_loader.lazy_loader import LazyLoader
|
||||
Part = LazyLoader('Part', globals(), 'Part')
|
||||
|
||||
Part = LazyLoader("Part", globals(), "Part")
|
||||
|
||||
__title__ = "Path Pocket Shape Operation UI"
|
||||
__author__ = "sliptonic (Brad Collette)"
|
||||
__url__ = "https://www.freecadweb.org"
|
||||
__doc__ = "Pocket Shape operation page controller and command implementation."
|
||||
|
||||
|
||||
def translate(context, text, disambig=None):
|
||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
||||
|
||||
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
#PathLog.trackModule(PathLog.thisModule())
|
||||
# PathLog.trackModule(PathLog.thisModule())
|
||||
|
||||
|
||||
class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage):
|
||||
'''Page controller class for Pocket operation'''
|
||||
"""Page controller class for Pocket operation"""
|
||||
|
||||
def pocketFeatures(self):
|
||||
'''pocketFeatures() ... return FeaturePocket (see PathPocketBaseGui)'''
|
||||
"""pocketFeatures() ... return FeaturePocket (see PathPocketBaseGui)"""
|
||||
return PathPocketBaseGui.FeaturePocket | PathPocketBaseGui.FeatureOutline
|
||||
|
||||
def taskPanelBaseLocationPage(self, obj, features):
|
||||
if not hasattr(self, 'extensionsPanel'):
|
||||
self.extensionsPanel = PathFeatureExtensionsGui.TaskPanelExtensionPage(obj, features) # pylint: disable=attribute-defined-outside-init
|
||||
if not hasattr(self, "extensionsPanel"):
|
||||
self.extensionsPanel = PathFeatureExtensionsGui.TaskPanelExtensionPage(
|
||||
obj, features
|
||||
) # pylint: disable=attribute-defined-outside-init
|
||||
return self.extensionsPanel
|
||||
|
||||
Command = PathOpGui.SetupOperation('Pocket Shape',
|
||||
PathPocketShape.Create,
|
||||
TaskPanelOpPage,
|
||||
'Path_Pocket',
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Pocket Shape"),
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Creates a Path Pocket object from a face or faces"),
|
||||
PathPocketShape.SetupProperties)
|
||||
|
||||
Command = PathOpGui.SetupOperation(
|
||||
"Pocket Shape",
|
||||
PathPocketShape.Create,
|
||||
TaskPanelOpPage,
|
||||
"Path_Pocket",
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Pocket Shape"),
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"Path_Pocket", "Creates a Path Pocket object from a face or faces"
|
||||
),
|
||||
PathPocketShape.SetupProperties,
|
||||
)
|
||||
|
||||
FreeCAD.Console.PrintLog("Loading PathPocketShapeGui... done\n")
|
||||
|
||||
Reference in New Issue
Block a user