Commit Graph

127 Commits

Author SHA1 Message Date
Furgo
4500d0fd07 Draft toggle grid as a toggle button to indicate grid visibility (#14452)
Makes the button for the Draft_ToggleGrid command act as a real toggle button to provide visual feedback of the grid visibility state.

---------

Co-authored-by: Syres916 <46537884+Syres916@users.noreply.github.com>
2024-06-13 15:31:29 +02:00
Roy-043
ccd7d33d70 Draft: add parameter observer
To avoid having to restart FreeCAD after changing parameters.
2023-11-21 20:42:16 +01:00
Roy-043
d72df2f3e2 Draft: PlaneGui: view observer to update the Tray
Related issue:
#5603.

The view observer starts/stops when the Draft workbench is activated/deactivated.

Additionally:
* Minor improvements to _update_grid and _update_gui.
2023-11-05 21:42:44 +01:00
Vincenzo Calligaro
50725bf253 [Feature Request] [Draft] [UI/UX] new Draft_Hyperlink command (#10878)
* Draft: added the new Draft_Hyperlink command

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>

* Draft: added the new Draft_Hyperlink command
 * Updated regex condition for more Windows file paths and network resources
 * Added check for file existence
 * Modified syntax for Win32/CygWin case
 * Declared ret variable outside if statement

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>

* Draft: added the new Draft_Hyperlink command
 * Replaced os.startfile and subprocess.call with QDesktopServices.openUrl
 * Removed unused Python dependencies

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>

---------

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2023-10-23 17:42:47 +02:00
Chris Hennes
0100e8f843 Gui: Correct translation context of pref pages
Preference page title strings must be in QObject
2023-05-19 20:46:12 -05:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Roy-043
6173d48da7 Draft: housekeeping: remove temporary DraftFillet module (#8233) 2023-01-22 20:03:58 +01:00
Roy-043
1eee16e9f3 Draft: Change Snap toolbar to standard toolbar 2022-10-27 10:45:48 +02:00
0penBrain
9848d6017e [BugFix] Draft: ensure Working Panel toolbar is deactivated on FC closing
Fixes #6242
2022-04-29 10:16:37 +02:00
Roy
93a41d2941 Draft: Fix translation issues 2022-01-10 10:17:53 +01:00
Roy-043
482cf61025 Draft: fix context menu
Remove call to get_draft_line_commands.
Update the ContextMenu function. The items are based on the utilities menu now. And the context menu is the same for the Tree view and the 3D view.
2021-10-12 14:35:36 +02:00
Roy-043
9687262cfc Update InitGui.py
Removed temp code.
2021-10-02 09:44:01 +02:00
Roy-043
a1499c297e Draft: fix shortcuts in menus and more (InitGui.py) 2021-09-28 14:49:22 +02:00
marioalexis
d428b30635 Draft: Make featureName attribute translation-independent
The translation for the task panel title is done in the Ui method call
2021-03-29 10:51:53 -03:00
carlopav
8d23cd676a Draft: Cleanup of Draft Edit 2020-05-25 13:37:55 +02:00
carlopav
3fd9d48691 Draft: fix to statusbar import on wb Activated and Deactivated
Import statusbar related functions only if snapper is loaded
added new line at the end
2020-04-30 13:48:33 +02:00
carlopav
be75f4febc [Draft] Statusbar widgets, preferences to disable draft statusba
.


.


.


.
2020-04-20 12:38:06 +02:00
carlopav
a23224da88 [Draft] Added Draft Snap Statusbar
.
2020-04-20 12:38:06 +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
8d94a0e334 Draft: new utility toolbar with some useful commands
These commands are useful but are "hiden"
inside the "Utilities" menu, so not many poeple know about them.
By placing them in a toolbar, they will be more discoverable.
2020-04-16 11:40:58 +02:00
vocx-fc
a104ece52e Draft: update InitGui with context commands
The `ContextMenu` method defines commands that will be listed
when right clicking and opening the context menu in the 3D view
or the tree view.

This sets up the line GUI commands when either a line, wire,
polyline, spline, or bezier curve is active.

However, this currently doesn't work at all for unknown reasons.
Maybe some other functionality in the internal C++ code
needs to be changed first.
2020-04-16 11:40:58 +02:00
carlopav
0745f760a0 [Draft] Removed annotation styles objects
Removed Annotation styles current implementation.
As pointed out by yorik, in https://forum.freecadweb.org/viewtopic.php?f=23&t=44051&p=385710#p385179, this feature will be added using document Meta property.
2020-04-16 11:37:10 +02:00
carlopav
34cf98102c [Draft] Dimension style object
still have to split viewprovider from object.
[Draft] Dimension Style code cleanup

thx @vocx-fc for reviewing
further cleanup


[Draft] Dimension Style improvements

Added a property to the dimension object to link the dimension style.
Improved the update of dimensions when style changes. This can be done in 2 different ways: by setting AutoUpdate property to True or by activating Update function from the viewprovider context menu.
2020-04-16 11:37:10 +02:00
carlopav
e65c61036b [Draft] Annotation scale support and statusbar widget
Initial commit
Preliminary support for Draft Dimensions


[Draft] Statusbar Widget code cleanup
2020-04-16 11:37:10 +02:00
vocx-fc
26864d9633 Draft: moved some unit tests to TestDraftGui
Those unit tests that are registered in `Init.py` will always run,
while those that are registerd in `InitGui.py` will only run
when the graphical interface is available.

This allows us to more clearly distinguish functions that
should be able to run always, from those that may run only
when the interfce is available.
2020-04-08 11:07:51 +02:00
vocx-fc
c55a5a9146 Draft: unit tests registered in Init.py
This means that now the unit tests will run from
the console mode when using
```
FreeCADCmd -t 0
FreeCAD --console -t 0
```

This will allow us to catch errors more easily,
as we separate better the behavior of non-GUI
and GUI-required modules.

Also small spacing fixes and position of the license.
2020-04-08 11:07:51 +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
b1a71f4a53 Draft: new Draft_OrthoArray command
It replaces the older `Draft_Array` command, and provides
a task panel to select the properties, similar to the
`Draft_PolarArray` and `Draft_CircularArray` commands.

It can also create `App::Links` directly from this task
panel, so it also replaces the `Draft_LinkArray`
introduced by the LinkMerge.
2020-03-03 21:27:31 +01:00
vocx-fc
9dc24a9d4d Draft, Arch: group the array tools 2020-03-02 11:41:22 -03:00
vocx-fc
01df7c0a63 Draft: added init_tools to create the toolbars 2020-02-10 11:02:28 +01:00
vocx-fc
0cb62a9e4f Draft: explicitly import modules in the initialization
Also other small fixes: cleanup for getting the icon
of the workbench; we don't need to test for PySide because
it should already exist as part of the system
for the entire interface to work; cleanup of the printing
functions.
2020-02-10 11:02:28 +01:00
carlopav
202d100780 [Draft] Context menu bugfix
If "Line" is not translated, the menu is not appended
2020-01-29 09:32:52 +01:00
carlopav
fbef5ab1f0 [Draft] Reorganize menu & toolbars
According to what experimented in BIM WB.
2020-01-27 10:06:33 +01:00
vocx-fc
5143369fc9 Draft: add new command for Draft CircularArray
Added object, viewprovider, icon; gui command definition, task panel,
add command to InitGui; add callbacks, and delay system.
2020-01-08 15:16:07 +01:00
vocx-fc
fa44c7ae2f Draft: new command for Draft PolarArray
Added object, viewprovider, icon; gui command definition, task panel,
add command to InitGui; add callbacks, and delay system.
2020-01-07 07:18:39 -03: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
c021ff70de Draft: rename SubelementModify to SubelementHighlight 2019-11-11 18:04:10 -03:00
vocx-fc
1d83fa7d92 Draft: renamed the command Draft_Edit_Improved to Draft_SubelementModify because the previous name was confusing; also provide a new icon 2019-10-10 19:13:28 -03:00
vocx-fc
a2f65493a0 Draft: DraftFillet, improved the tool, now the radius of the tool can be selected when launched; the tool should work without needing to import DraftFillet manually 2019-09-04 23:14:55 -03:00
vocx-fc
d5ca09c77b Draft: added DraftFillet.py to the sources, also InitGui.py, Draft.py, DraftTools.py, and CMakeLists.txt 2019-08-22 10:54:41 -03:00
Zheng, Lei
de66e563e0 Draft/Arch related changes
* Add Draft_LinkArray and Draft_PathLinkArray that uses link for both
  data and visualization, which supports linking external objects

* Add link group support for draft snap

* Fix ArchWindows expression ambiguity
2019-08-17 15:32:47 +02:00
Yorik van Havre
16c26cb3b1 Draft: Reorganizing DraftEdit and future Draft command modules 2019-08-12 21:30:45 -03:00
vocx-fc
364e3927c1 Draft: improved the style of the code, checked with flake8 2019-07-26 10:54:01 -03:00
carlopav
c351b9094a [Draft] Update DraftEdit PR with Yorik suggestions
Cleanings of import at the beginning of new module.
Moved command setup in InitGui and removed import DraftEdit from DraftTools.
2019-06-17 16:39:56 -03:00
Yorik van Havre
5ee99ca4ee Draft: Introduced Layers system (former VisGroup) 2019-06-05 18:47:01 -03:00
Yorik van Havre
2e616a4749 Draft: Removed annoying an unuseful verbose command line output 2019-05-16 15:31:57 -03:00
carlopav
5aeb15db0c [Draft] Insert the arc group in the draft toolbar
small fix to add the arc group to the toolbar.
2019-05-14 11:20:27 -03:00
Dion Moult
4c04d8ee94 Add new edit tool icon, shortcut, and basic modes.
* It allows you to select multiple objects to edit instead of just one.
 * It highlights the object lines and the points in red.
 * It stays in the mode and allows you to run other modifiers.
 * A very hackish hook into the move modifier is added as a proof of concept.
2019-05-08 10:26:54 -03:00
carlopav
5db6da0eed Split the command in two
With this commit 2 commands are created, one for current bezier curve tool behaviour, the other for cubic bezier in inkscape style...
grouped in a dropdown button in the toolbar.
2019-04-08 17:17:21 -03:00
Yorik van Havre
4f19a65559 Draft: Added 3-point arc command from BIM WB 2019-04-07 17:23:42 -03:00