Skip to content

Commit

Permalink
Draft: gui_ and task_orthoarray cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vocx-fc authored and yorikvanhavre committed Apr 10, 2020
1 parent 8cbb599 commit 48619ad
Show file tree
Hide file tree
Showing 2 changed files with 278 additions and 211 deletions.
17 changes: 12 additions & 5 deletions src/Mod/Draft/draftguitools/gui_orthoarray.py
Expand Up @@ -31,21 +31,23 @@
import FreeCAD as App
import FreeCADGui as Gui
import Draft
import Draft_rc
import Draft_rc # include resources, icons, ui files
from draftutils.messages import _msg, _log
from draftutils.translate import _tr
from draftguitools import gui_base
from drafttaskpanels import task_orthoarray
import draftutils.todo as todo

# The module is used to prevent complaints from code checkers (flake8)
True if Draft_rc.__name__ else False
bool(Draft_rc.__name__)


class GuiCommandOrthoArray(gui_base.GuiCommandBase):
"""Gui command for the OrthoArray tool."""

def __init__(self):
super().__init__()
self.command_name = "OrthoArray"
self.command_name = "Orthogonal array"
# self.location = None
self.mouse_event = None
self.view = None
Expand All @@ -56,14 +58,15 @@ def __init__(self):

def GetResources(self):
"""Set icon, menu and tooltip."""
_msg = ("Creates copies of a selected object, "
_tip = ("Creates copies of a selected object, "
"and places the copies in an orthogonal pattern.\n"
"The properties of the array can be further modified after "
"the new object is created, including turning it into "
"a different type of array.")

d = {'Pixmap': 'Draft_Array',
'MenuText': QT_TRANSLATE_NOOP("Draft", "Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft", _msg)}
'ToolTip': QT_TRANSLATE_NOOP("Draft", _tip)}
return d

def Activated(self):
Expand All @@ -72,6 +75,10 @@ def Activated(self):
We add callbacks that connect the 3D view with
the widgets of the task panel.
"""
_log("GuiCommand: {}".format(_tr(self.command_name)))
_msg("{}".format(16*"-"))
_msg("GuiCommand: {}".format(_tr(self.command_name)))

# self.location = coin.SoLocation2Event.getClassTypeId()
self.mouse_event = coin.SoMouseButtonEvent.getClassTypeId()
self.view = Draft.get3DView()
Expand Down

0 comments on commit 48619ad

Please sign in to comment.