Commit Graph

219 Commits

Author SHA1 Message Date
vocx-fc
9667bb957a Draft: translate functions with the context set to Draft 2020-03-02 11:45:27 -03:00
vocx-fc
adfc58580d Draft, Arch: group the array tools 2020-03-02 11:41:22 -03:00
vocx-fc
b6791b5571 Draft: angle dimension icon saved as plain SVG
As discussed in the previous request, the icon
is saved as Plain SVG, meaning that Inkscape-specific tags
are removed. This is better for compatibility purposes
for use with other SVG editors and viewers.
2020-02-15 19:33:23 +01:00
vocx-fc
107a945ccc Draft: standardized module to build messages 2020-02-10 11:12:45 +01:00
vocx-fc
fd533c74ba Draft: disable the excessive output in the ToDo class 2020-02-10 11:09:10 +01:00
vocx-fc
ccebb92258 Draft: added init_tools to create the toolbars 2020-02-10 11:02:28 +01:00
carlopav
5e22086d71 [Draft] Autogroup bugfix 2020-01-27 10:12:02 +01:00
carlopav
78252e959a [Draft] Autogroup: better support for App::Link
https://forum.freecadweb.org/viewtopic.php?f=23&t=40400&start=30#p360248
Reference to forum topic.
small fix


small fix
2020-01-18 17:51:21 +01:00
carlopav
ec57ffd875 Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-16 14:30:10 +01:00
Yorik van Havre
3f30f8b345 Merge branch 'master' into DraftModifiersAppPart 2020-01-16 14:26:45 +01:00
wmayer
099cc2c59e Draft: only try to import FreeCADGui, coin and QtGui if FreeCAD.GuiUp is true 2020-01-15 12:24:18 +01:00
vocx-fc
d8fd4b2f9c Draft: move translate function to translate module
The translate mechanism in Draft depends on the `QtCore`
`translate` function. This is defined in its own module
so that `DraftGui.py` is not as big and hard to manage.

Other modules in Draft can import the translate function
without needing to import the entire interface, which
often causes errors and circular dependencies.

We can import `QtCore.QT_TRANSLATE_NOOP` at the top level
in `Draft.py` because it does not depend on the graphical
interface.
2020-01-15 10:05:52 +01:00
Yorik van Havre
9ed1c1b281 Merge branch 'master' into DraftModifiersAppPart 2020-01-14 12:50:43 +01:00
vocx-fc
abd31f0b2b Draft: move todo static class to the todo module
The todo class in `DraftGui.py` can be placed in its
own module so that `DraftGui.py` isn't as big
and hard to maintain.
2020-01-14 12:49:29 +01:00
carlopav
f21c387b04 [Draft] Autogroup changes to include App::Part
[Draft] merged with recent changes


[Draft] App part support small fix
2020-01-13 23:13:38 +01:00
carlopav
6e70467335 Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-10 10:36:34 +01:00
vocx-fc
4d956930f5 Draft: new module for GUI utility functions
Many auxiliary tools used by `Draft.py` can be defined
in another module. Many functions are moved to this module
so that `Draft.py` isn't as big and hard to maintain.

The following is a list o functions that were moved:
`get3DView`, `autogroup`, `dimSymbol`, `dimDash`,
`removeHidden`, `formatObject`, `getSelection`,
`getSelectionEx`, `select`, `loadTexture`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines,
particularly the use of `snake_case`. For example,
`get3DView` is now `get_3d_view`.

Aliases are provided for the old names so that
other functions and classes that depend on these
won't break. The new names should be the official
programming interface, while the old names
should be deprecated at some point in the future.
2020-01-10 10:04:07 +01:00
carlopav
516cb397c6 [Draft] get_group_contents removed App::Part
Removed App::Part from get_group_contents because it result in double movements of Part objects
2020-01-09 14:45:58 +01:00
vocx-fc
7721ca0157 Draft: new module for utility functions
Many auxiliary tools used by `Draft.py` can be defined
in another module. Many functions are moved to this module
so that `Draft.py` isn't as big and hard to maintain.

The following is a list of functions and attributes that were moved:
`stringencodecoin`, `arrowtypes`, `typecheck`,
`getParamType`, `getParam`, `setParam`, `precision`,
`tolerance`, `epsilon`, `getRealName`, `getType`,
`getObjectsOfType`, `isClone`, `getGroupNames`,
`ungroup`, `shapify`, `getGroupContents`,
`printShape`, `compareObjects`, `loadSvgPatterns`,
`svgpatterns`, `getMovableChildren`, `getWindows`,
`utf8_decode`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines, particularly
the use of `snake_case`. For example, `getGroupNames`
is now `get_group_names`; `getMovableChildren`
is now `get_movable_children`.

Aliases are provided for the old names so that
other functions and classes that depend on these
won't break. The new names should be the official
programming interface, while the old names
should be deprecated at some point in the future.
2020-01-08 15:16:55 +01:00