Commit Graph

246 Commits

Author SHA1 Message Date
Roy-043
2b35383744 Draft: Draft_Trimex: Fix wrong angle units in taskpanel: tooltip in DraftGui.py
I have changed the tooltip from "Trim distance" to "Offset distance" to match the tooltip in gui_trimex.py
2021-07-02 11:37:31 +02:00
marioalexis
22b157dbbf Draft: Check special characters using focused input field 2021-06-14 01:37:44 -03:00
Yorik van Havre
966906da96 Merge pull request #4557 from luzpaz/crowdin/whitespaces-substituted-into-code
Crowdin: represent whitespace in code instead of in string
2021-05-05 17:18:35 +02:00
Yorik van Havre
c0c49ebffc Merge branch 'master' into draft-feature_name 2021-04-29 12:40:27 +02:00
Yorik van Havre
07c914a8bb Merge pull request #4710 from marioalexis84/draft-draftgui
Draft: Sync input fields in task panel
2021-04-20 11:50:22 +02:00
luz paz
b94ee8b275 Crowdin: represent whitespace in code instead of in string [skip ci]
Removing possible whitespace from strings lead to more accurate translations
2021-04-19 06:16:09 -04:00
marioalexis
2f81ca40be Draft: Sync input fields in task panel 2021-04-07 18:36:56 -03:00
marioalexis
cce80c6ba4 Draft: Fix tooltip typo and trimex task panel title 2021-03-29 10:51:53 -03:00
Yorik van Havre
4a8319d63e Merge branch 'master' into draft-close_button 2021-03-26 11:19:09 +01:00
Yorik van Havre
94b9374b37 Merge pull request #4348 from marioalexis84/draft-coordinate_input
[0.20] [Draft] Add global mode to enter points - Fixes #0004108
2021-03-26 11:18:23 +01:00
marioalexis
6795e0d7e6 Draft: Change selectUi and makeDumbTask argument named 'callback' to 'on_close_call'
Suggested by user @carlopav
2021-03-20 17:12:58 -03:00
marioalexis
7c00d19a28 Draft: Call finish method if pressed Close button in dumb taskdialog 2021-03-20 17:12:58 -03:00
Chris Hennes
a7522c384e [DRAFT] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
marioalexis
8952eddf83 Draft: Add global mode to enter points - fixes #0004108 2021-02-01 01:26:15 -03:00
Yorik van Havre
f54b452327 Draft: Hide undo button from modify operations 2020-12-14 15:21:25 +01:00
luz paz
fc99ff2def Draft: fix header uniformity + trailing whitespace
[skip ci]
2020-12-11 13:19:49 +01:00
Yorik van Havre
ed3b5a1dd0 Draft: Fixed regression caused by new setstyle button 2020-11-18 11:41:38 +01:00
Yorik van Havre
583b59c29f Draft: Condensed the Draft toolbar style buttons into one with more options 2020-11-10 14:14:18 +01:00
vocx-fc
3a31a36fae 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
3c6fdca582 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
78a5036048 [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
9d9102bc7e Draft: Draft_Text split lines by newline characters 2020-04-06 13:01:32 +02:00
vocx-fc
2a340bcfd3 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
46216d6032 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
580270ce4a 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
6d2c8b5df3 [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
4396b40fec [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
786eac8c01 [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
b90d181188 [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
2e4ce2f220 [Draft] Toolbar, remove option from preferences 2020-02-05 10:50:03 +01:00
vocx-fc
f86980e0b1 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
ac3d5b1633 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
ee10405140 Draft: Use proper multi-line text editor for Draft Text tool 2020-01-29 14:27:01 +01:00
UR-0
7b511d49cb Draft: ShapeStringTaskPanel add parameter DontUseNativeFontDialog 2020-01-22 10:25:13 +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
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
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
luz.paz
8cfa85cf18 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
1987ecabdd Draft: PySide should be available already 2019-11-21 16:35:29 +01:00
luz.paz
e804698edc Draft: use string operator instead of numeric LGTM fix 2019-10-25 10:25:31 -03:00
vocx-fc
ac0e74b220 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
15c6b01237 [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
91ca523f54 Draft: Moved SelectPlane stuff from DraftGui to its own ui file 2019-09-02 22:15:58 -03:00
Dion Moult
bfae0408ac 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
6666a33433 Draft: Added shortcut to toggle near snap during drawing 2019-09-01 13:00:57 -03:00
Yorik van Havre
f16f58c040 Draft: Fixed tooltips 2019-08-26 14:16:19 -03:00
Yorik van Havre
d45a4a347e Draft: fixed color buttons dialogs not starting with the right color 2019-08-24 19:41:26 -03:00
Zheng, Lei
0a4f1abf00 Draft: fix Link(Path)Array 2019-08-17 15:32:51 +02:00
vocx-fc
dc6b02917e 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
cef27c7a72 Draft: Added button to working plane task panel to orient the view to the WP 2019-07-09 12:29:32 -03:00