Commit Graph

232 Commits

Author SHA1 Message Date
Yorik van Havre
c25ff3ac16 Draft: Hide undo button from modify operations 2020-12-14 15:21:25 +01:00
luz paz
2a8c1271d5 Draft: fix header uniformity + trailing whitespace
[skip ci]
2020-12-11 13:19:49 +01:00
Yorik van Havre
4af412f1e4 Draft: Fixed regression caused by new setstyle button 2020-11-18 11:41:38 +01:00
Yorik van Havre
88f5fc20b1 Draft: Condensed the Draft toolbar style buttons into one with more options 2020-11-10 14:14:18 +01:00
vocx-fc
bc0cfdfda2 Draft: use new name of the icon Part_3D_object
It is defined in the Part Workbench. Before, it was called `Tree_Part`.
2020-10-22 15:11:45 +02:00
vocx-fc
aaeab8bc5d Draft: move units functions outside DraftGui.py
The functions `getDefaultUnit`, `makeFormatSpec`, `displayExternal`
are used to get the default unit schema for lengths and angles,
and display a string with a particular format.

They aren't used in `DraftGui.py`, but are used by the
viewprovider of the Dimension objects. Therefore, they are moved
into a separate module, so that they can be imported without
using the entire `DraftGui` module.
2020-07-10 12:29:30 +02:00
carlopav
55e537d79d [Draft] Improved Snapper Toolbar Behaviour
Changed snap toolbar behaviour:
- create a list of available snaps (Gui.Snapper.snaps)
- make it consistent with Snap Gui Commands (in gui_snaps module)
- create a list of active snaps (Gui.Snapper.active_snaps)
- refactor the isEnabled() method to allow it to check if the given snap is in Gui.Snapper.active_snaps and not if the snap toolbar button isChecked()
- updated and reordered the new list of gui snap commands in draftutils.init_tools and used it as a base to refactor the creation of draft toolbar
- updated all the draft snap gui tools to make them control the toolbar buttons directly
.


.


.
2020-04-20 12:38:06 +02:00
vocx-fc
6cc5001c08 Draft: Draft_Text split lines by newline characters 2020-04-06 13:01:32 +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
699624fd26 Draft: move DraftSnap to another module
And do not load the `Snapper` in `DraftGui`.
The Snapper should be initialized by the module
that imports `DraftGui`, most probably `DraftTools`
or even by the `InitGui` of the workbench.
2020-03-20 08:11:04 -03:00
carlopav
e79c1e6c99 [Draft] Uniform length and xyz inputfield behaviour
Single returnPressed to accept point if cursor is parallel to xyz axis for bot setfocus on x and on length inputfields.
[Draft] Edit_updated tooltip


[Draft] DraftGui Further cleanup and bugfix
2020-03-12 09:11:34 -03:00
carlopav
f5f43913e0 [Draft] DraftGui and DraftEdit Cleanup to remove AddPoint & DelPoint
Lines to be deleted in DraftGui in the future, are now commented.
2020-03-12 09:11:34 -03:00
carlopav
6182aea46b [Draft] DraftGui Bugfix on selecting inputfields
https://forum.freecadweb.org/viewtopic.php?f=23&t=43145&p=367517#p367517
2020-03-12 09:11:34 -03:00
Syres916
b5a92b656d [Draft] Bugfix for new users opening Shapestring
See Discussion : https://forum.freecadweb.org/viewtopic.php?f=23&t=42808
2020-02-05 10:51:12 +01:00
carlopav
7d6f0f3626 [Draft] Toolbar, remove option from preferences 2020-02-05 10:50:03 +01:00
vocx-fc
ad977bb807 Draft: disable the Toolbar mode of Gui commands
The `Taskview` mode (value 1) is set fixed in `DraftGui.py`
even if the widget shows the other value `Toolbar` (value 0),
as this mode is unmaintained and obsolete.
At the same time, clarify the behavior with a new tooltip.
2020-02-05 10:50:03 +01:00
triplus
461309df23 Draft - Toolbar mode input size issue
https://forum.freecadweb.org/viewtopic.php?f=34&t=42782
2020-02-05 10:48:27 +01:00
Yorik van Havre
1350da3f22 Draft: Use proper multi-line text editor for Draft Text tool 2020-01-29 14:27:01 +01:00
UR-0
c857dfef84 Draft: ShapeStringTaskPanel add parameter DontUseNativeFontDialog 2020-01-22 10:25:13 +01:00
vocx-fc
b52ac5fc6a 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
vocx-fc
2ab75d7f23 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
vocx-fc
692fa7e702 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
luz.paz
ae7cb9e300 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
vocx-fc
5ee4a2e87c Draft: PySide should be available already 2019-11-21 16:35:29 +01:00
luz.paz
bec8e1befd Draft: use string operator instead of numeric LGTM fix 2019-10-25 10:25:31 -03:00
vocx-fc
1b044e91df Draft: DraftGui, use boolean values to set up an option instead of numeric values 1 and 0 2019-10-14 16:45:33 -03:00
Syres916
867a09f731 [Draft] ShapeString Task Panel Allow Windows...
....Users to view Font Files without the need to modify permissions on the Fonts folder. Also keeping the rest of FreeCAD file dialog boxes as standard.
2019-10-11 19:11:12 -04:00
Yorik van Havre
864619fcec Draft: Moved SelectPlane stuff from DraftGui to its own ui file 2019-09-02 22:15:58 -03:00
Dion Moult
3c52a3c2d1 Fix UI labels and unit type to be angle instead of length when doing draft rotate 2019-09-02 16:05:36 -03:00
Yorik van Havre
679f7e91c7 Draft: Added shortcut to toggle near snap during drawing 2019-09-01 13:00:57 -03:00
Yorik van Havre
e9cbbb38ff Draft: Fixed tooltips 2019-08-26 14:16:19 -03:00
Yorik van Havre
59ac90897b Draft: fixed color buttons dialogs not starting with the right color 2019-08-24 19:41:26 -03:00
Zheng, Lei
5509a9b438 Draft: fix Link(Path)Array 2019-08-17 15:32:51 +02:00
vocx-fc
a2103d814f Draft: DraftGui.py, the docstrings need triple quotes and be next to the method or class in order to be picked up by Doxygen or Sphinx; this complies with PEP 257 2019-08-14 14:30:46 -03:00
Yorik van Havre
7c53cbf921 Draft: Added button to working plane task panel to orient the view to the WP 2019-07-09 12:29:32 -03:00
Yorik van Havre
169c975e19 Draft: Remember Offset copy mode separately from Move copy mode 2019-07-06 16:52:58 -03:00
Yorik van Havre
122dfd4a62 Draft: Set global copy mode to False by default 2019-07-06 14:05:31 -03:00
Yorik van Havre
07d3423add Arch: Misc bugfixes 2019-07-05 20:58:44 -03:00
Yorik van Havre
36bc48c9bf Draft: Better positioned layers button popup + new layer entry 2019-06-30 13:32:42 -03:00
Yorik van Havre
507c40669d Draft: Turned autogroup button into layers selector (added pref option to restore old groups-based system) 2019-06-30 01:00:50 -03:00
wmayer
ff7975291d Draft: QPixmap.fill expects a QColor, not an int or long 2019-06-14 11:30:43 +02:00
Yorik van Havre
5ee99ca4ee Draft: Introduced Layers system (former VisGroup) 2019-06-05 18:47:01 -03:00
Yorik van Havre
e2f65ef010 Draft: Fixed regressions in Scale tool + reimplemented Clone mode 2019-06-03 19:06:27 -03:00
Yorik van Havre
b9bcffda03 Draft: Now uses general FreeCAD shape colors instead of defining its own 2019-06-03 17:47:39 -03:00
Dion Moult
95378e5c6b Fix draft missing line tracker when snapper detects an object without any snap targets 2019-06-03 16:36:07 -03:00
Dion Moult
1c243cfc57 Add customisable in-command shortcut keys rather than hardcoding them 2019-06-03 16:31:25 -03:00
Derek V. Schmalenberger
a6fca79576 increased default snapRange from 5 to 8
Grid snapping will fail with a snapRange of 5 if a line or arc passes through the grid point.
2019-05-20 11:08:48 -03:00
luz.paz
11f4f30a37 Misc. typo fixes
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller -L pard,wallthickness,commen,byteorder,alocation`
2019-05-17 13:19:36 +02:00
Yorik van Havre
2e616a4749 Draft: Removed annoying an unuseful verbose command line output 2019-05-16 15:31:57 -03:00