Commit Graph

437 Commits

Author SHA1 Message Date
vocx-fc
5f11802bc0 Draft: move Move GuiCommand to gui_move module 2020-04-24 13:49:13 +02:00
vocx-fc
3370e870fe Draft: move SubelementHighlight to its own module 2020-04-24 13:49:13 +02:00
Yorik van Havre
5b3fea59e0 Draft: Annotation editor 2020-04-22 13:38:17 +02:00
vocx-fc
ace8c98aa8 Draft: move Label GuiCommand to gui_labels module
Also include carlopav's commit ff3bdf86bc for the Draft_Label tool,
which runs the autogroup function on the created label.
2020-04-22 12:07:25 +02:00
vocx-fc
d3646b0577 Draft: move Facebinder GuiCommand to gui_facebinders module 2020-04-22 12:07:25 +02:00
vocx-fc
4c297587c4 Draft: move Point GuiCommand to gui_points module 2020-04-22 12:07:25 +02:00
vocx-fc
afd941b66d Draft: move ShapeString GuiCommand to gui_shapestrings module 2020-04-22 12:07:25 +02:00
vocx-fc
44be767583 Draft: move Dimension GuiCommand to gui_dimensions module 2020-04-22 12:07:25 +02:00
vocx-fc
bec9d01058 Draft: move Text GuiCommand to gui_texts module 2020-04-22 12:07:25 +02:00
vocx-fc
66055ebf14 Draft: move Ellipse GuiCommand to gui_ellipses module 2020-04-22 12:07:25 +02:00
vocx-fc
0e089e998d Draft: move Polygon GuiCommand to gui_polygons module 2020-04-22 12:07:25 +02:00
vocx-fc
59c41fab33 Draft: move Circle GuiCommand to gui_circles module 2020-04-22 12:07:25 +02:00
vocx-fc
ea31a7d452 Draft: move Arc GuiCommand to gui_arcs module
Also move the `ArcGroup` that containst the two arc tools.
2020-04-22 12:07:25 +02:00
vocx-fc
0d891a85e3 Draft: move Rectangle GuiCommand to gui_rectangles module 2020-04-22 12:07:25 +02:00
vocx-fc
689324fe22 Draft: move CubicBezCurve GuiCommand to gui_beziers module
Also move the `BezierGroup` that contains the two Bezier tools.
2020-04-22 12:07:25 +02:00
vocx-fc
17281a250f Draft: move BezCurve GuiCommand to gui_beziers module 2020-04-22 12:07:25 +02:00
vocx-fc
b6cdf9f558 Draft: move BSpline GuiCommand to gui_splines module 2020-04-22 12:07:25 +02:00
vocx-fc
529ec1e1a6 Draft: move Wire GuiCommand to gui_lines module 2020-04-22 12:07:25 +02:00
vocx-fc
934d0f3752 Draft: move Line GuiCommand to gui_lines module 2020-04-22 12:07:25 +02:00
vocx-fc
982a0fdd9c Draft: move Modifier class to gui_base_original module 2020-04-21 12:53:30 +02:00
vocx-fc
9f5e215751 Draft: move Creator class to gui_base_original module 2020-04-21 12:53:30 +02:00
vocx-fc
181c5cb60d Draft: import Part module where necessary for the tools
Also import `DraftGeomUtils` where necessary.

These modules were previously imported globaly when the base
`DraftTool` class was first called by the individual tools
through the `Creator` and `Modifier` classes.

However, since `DraftTool` was moved to a separate module,
these `Part` and `DraftGeomUtils` modules are no longer
in the `DraftTools` namespace, and therefore they
cannot be imported globally anymore.

Now the `Part` and `DraftGeomUtils` modules are imported
in the specific functions where they are actually needed.
2020-04-21 12:53:30 +02:00
vocx-fc
9b3096353c Draft: move the base DraftTool class to its own module
This is the base class of most Draft Gui Commands,
particularly those which were developed a long time ago.
It is inherited by `Creator` and `Modifier`
to set some specific options for some tools.

Newer Gui Commands do not use these classes and thus
are independent of `DraftTool`.

Nevertheless, in the future we expect to organize further
the commands so that they all derive from a few classes,
so that they all share some common properties and behaviors.
2020-04-21 12:53:30 +02:00
vocx-fc
0ba89d1662 Draft: move DraftTools utilities to another module
These small functions and utilities are placed in another
module, so they can be imported and called
by the individual Gui Command classes as necessary.

When these Gui Command classes are moved to their respective
modules, they will be able to import this auxiliary module as well.
2020-04-21 12:53:30 +02:00
vocx-fc
6c890c1966 Draft: move array commands to DraftTools
Previously they were imported directly in `InitGui.py`,
now they are collected in `DraftTools.py`, so that they
are imported at the same time as other modules.

Also provide an icon so this icon appears in the menu.
2020-04-16 11:40:58 +02:00
vocx-fc
1a2e79ecb9 Draft: move Draft_Arc_3Points to gui_arcs module 2020-04-16 11:40:58 +02:00
vocx-fc
1f3a88f1ce Draft: move Draft_AddConstruction to gui_groups module
Also add a new icon for adding to the construction group.
2020-04-16 11:40:58 +02:00
vocx-fc
68119de02f Draft: move Draft_AutoGroup to gui_groups module 2020-04-16 11:40:58 +02:00
vocx-fc
60f3155651 Draft: move Draft_Slope to gui_lineslope module
The class name was renamed to `LineSlope` as it is fundamentally
inteded to control slopes of lines.
2020-04-16 11:40:58 +02:00
vocx-fc
8aeb33f203 Draft: move Draft_FlipDimension to gui_dimension_ops module 2020-04-16 11:40:58 +02:00
vocx-fc
ed55c6e824 Draft: move Draft_Heal to gui_heal module 2020-04-16 11:40:58 +02:00
vocx-fc
8c177c7fe8 Draft: move Draft_ToggleGrid to gui_grid module 2020-04-16 11:40:58 +02:00
vocx-fc
1ed3df9df0 Draft: add base class for Snap commands 2020-04-16 11:40:58 +02:00
vocx-fc
11206b1d3a Draft: move Draft_ShowSnapBar to gui_snaps module 2020-04-16 11:40:58 +02:00
vocx-fc
9eab03b593 Draft: add correct docstring to old Array tools
Previously they mentioned incorrectly the Shape2DView tool.
2020-04-16 11:40:58 +02:00
vocx-fc
ef3ad5121b Draft: move SelectGroup command to gui_groups module 2020-04-16 11:40:58 +02:00
vocx-fc
d05a786e57 Draft: move AddToGroup command to gui_groups module 2020-04-16 11:40:58 +02:00
vocx-fc
14352677c5 Draft: move DisplayMode command to gui_togglemodes module 2020-04-16 11:40:58 +02:00
vocx-fc
9758d983ef Draft: move mode commands to gui_togglemodes module
`Draft_ToggleConstructionMode` and `Draft_ToggleContinueMode`.
They call a base class `BaseMode` which also uses the base
`gui_base.GuiCommandSimplest` class.

Also add a new icon for continue mode.
2020-04-16 11:40:58 +02:00
vocx-fc
7189d3de05 Draft: move line GuiCommands to gui_lineops module
The commands `FinishLine`, `CloseLine`, and `UndoLine`
are moved from the huge `DraftTools.py` to `gui_lineops.py`
to reduce the complexity of the former file.

These GuiCommands aren't actually used presently
in the Draft Workbench. They were used in the past
particularly from the context menu when editing a Line object.
2020-04-16 11:40:58 +02:00
carlopav
ff3bdf86bc [Draft] Improved Autogroup to handle Draft Annotations
Draft Dimension, Label and Text are now correctly auto-added to Part container
2020-04-16 11:37:10 +02:00
Yorik van Havre
97c8eff825 Draft: warn the user if offset direction is not set 2020-04-14 15:35:46 +02:00
vocx-fc
5afce788c9 Draft: move WorkingPlaneProxy to separate module
Previously it was in the `gui_selectplane` module
but we prefer to place it in its own module
so that the files are as small as possible.
2020-04-09 11:41:45 +02:00
vocx-fc
7a6b586a66 Draft: move ShapeString to the creation tools
Previously it was placed in the `annotation` category
but since it creates a group of shapes, it is better
in the `creation` category.

Also small fixes in the menu text and tooltip.
2020-04-07 18:12:06 +02:00
vocx-fc
f00fe58061 Draft: DraftTools.py clean up header and imports
Small spacing fixes like imports in separate lines for
more clarity, and the position of the license.
Also use the class name `ToDo` in `CamelCase`,
as it is indicated in Python guidelines for classes.
2020-04-07 18:12:06 +02:00
vocx-fc
9ed42f61a7 Draft: move Draft_Edit to another module 2020-04-06 12:51:55 +02:00
vocx-fc
7bc2e3ad48 Draft: move ScaleTaskPanel to a module
We remove it from `DraftGui.py` to reduce the size of this file.
Then we import it and tie it to its command defined
in `DraftTools.py`.
2020-04-02 16:53:49 +02:00
vocx-fc
50faaea5bf Draft: move ShapeStringTaskPanel to a module
We remove it from `DraftGui.py` to reduce the size of this file.
Then we import it and tie it to its command defined
in `DraftTools.py`.
2020-04-01 13:22:04 +02:00
vocx-fc
f54ca61463 Draft: move and rename DraftSelectPlane 2020-03-31 12:00:38 +02:00
vocx-fc
a150b3048d Draft: use functions from the utils module, not DraftGui
These functions were moved from DraftGui to individual
modules precisely to make them easy to import.
Otherwise we have to import the entire DraftGui module
which creates dependency problems when we want to use
some functions without the graphical interface.
2020-03-23 12:14:58 +01:00