Commit Graph

112 Commits

Author SHA1 Message Date
Syres916
6770713eb1 [Gui] Add new Selection Filter functionality (#2)
* [Gui] Add Selection Filters

* [Gui] Add Selection Filters to Toolbar

* [Gui] Add Selection Filter Icons

* [Gui] Add 4 new Selection filter Icon Files

* [Gui] Update Context Menu

* [Gui] Add default Selection Filter icon

* [Gui] Update resource.qrc with new icon

* [Gui] Add SelectFilter dropdown toolbar

* [Gui] Update Content Menu and Toolbar

* [Gui] Icon changed to Plain SVG

* [Gui] edge-selection icon as Plain SVG

* [Gui] vertex-selection icon as Plain SVG

* [Gui] selection-filter.svg replace metadata
2023-08-21 11:07:04 -05:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
Paddle
54e2990b4b Move 'Recent Files' menu entry and rename it 'Open Recent' 2023-07-27 11:40:33 +02:00
Abdullah Tahiri
554ede35d2 Sketcher/Gui: Extend toolbar framework and fix toolbar visibility not preserved
=================================================================================

fixes #9208

Essentially:
- The regular mechanism to save toolbar state when changing from one WB to another
is not designed to support changes within one WB (e.g. from edit mode and back).
- At creation time, toolbars can be initialised with default visible or default hidden
state. Additionally, there is third configuration "Unavailable", which refers to a
toolbar that is hidden, and the control to enable it is also hidden by default.
- The ToolBarManager is extended to enable to set the State of one or more toolbars.
- The State refers to changes to be effected on one or more toolbars by client code:
* ForceHidden allows to hide a toolbar and also hide its control (a toolbar not available
in a mode).
* ForceAvailable allows to make a toolbar available by making its control visible, the
toolbar itself is visible or not depending on user settings.
* RestoreDefault allows to bring the control visibility to the default of the toolbar, the
toolbar itself is visible or not depending on user settings.
* SaveState allows to store the current visibility state of a toolbar. It enables client
code to save the state when appropriate. It provides the only option for default "Unavailable"
toolbars, which are fully managed by client code. It provides additional flexibility to save
other toolbar visibility on request.

For the Sketcher this means:
- That edit mode toolbars are not shown outside edit mode.
- That edit mode toolbars and non-edit mode toolbars can be configured independently.
- that edit mode toolbars' state is saved when leaving edit mode if and only if, the
workbench that is selected when leaving edit mode is the Sketcher WB.
- it won't save the state if the user manually selected another WB and then left edit
mode (why? see limitation above).

Limitation:
- When switching to another WB while in edit mode, the other WB is activated before the
current WB (sketcher WB) is deactivated. This means that at sketcher level, the sketcher
has no chance to save states or do other tidy up actions before the tools of the other WB
are activated.
- This, however, is understood as not relevant enough as to warrant changing the mechanisms
in place.
2023-05-30 16:37:53 +02:00
Chris Hennes
aeb059fc7a GUI: Add missing toolbar translation strings 2023-04-18 09:21:19 -05:00
Ronny Standtke
32650526b7 removed redundant "Toggle visibility" menu item from View menu 2023-04-13 10:57:49 +02:00
marioalexis
ae480d70cd Gui: Add CommandAction descriptor object to access commands action 2023-04-10 16:53:51 +02:00
wmayer
3cd81b9bb3 Gui: add an image view 2023-03-22 15:45:38 +01:00
Adrian Insaurralde Avalos
2d68ad5e7a [Gui] Split "File" toolbar and add "Clipboard" toolbar
"File" is split into "File", "Edit" and "Help"
"Clipboard" is hidden by default
2023-03-03 22:47:11 -06:00
Chris Hennes
cabb88019f Gui: Eliminate variable reuse
Coverity complains about USE_AFTER_FREE here, and it was difficult to reason about the code. To help address this, use different variables for the different parameter groups.
2023-02-26 10:36:16 +01:00
luzpaz
a40a5dcad2 Fix trailing newlines 2023-02-08 15:08:42 +01:00
Jakub Świerk
16f85753aa GUI: Removed Std_ArrangeIcons command. 2023-01-10 13:46:33 +01:00
wmayer
90ddd187f5 Gui: fix some clang-tidy warnings:
* readability-braces-around-statements
2022-11-13 17:42:08 +01:00
wmayer
7f104b077b Gui: fix readability-identifier-length 2022-11-12 23:57:14 +01:00
wmayer
3eaad09ed1 Gui: implement WorkbenchSwitcher class to encapsulate the parameter details 2022-11-11 22:53:02 +01:00
wmayer
e6a8533fa8 Gui: simplify code to handle workbench selector
+ replace three boolean parameters with a single string parameter
+ refactor DlgGeneralImp::saveSettings/loadSettings
+ handle visibility of corner widgets
2022-11-11 22:53:02 +01:00
Zheng, Lei
0a37a85ea2 Minor code change according to suggestions 2022-11-10 23:20:18 +01:00
Zheng, Lei
775452cbc0 Gui: add ShortcutManager to unify shortcut handling
Support longest key sequence match with user defined delay (configurable
through 'Customize -> Keyboard -> Key sequence delay').

Support user defined priority to resolve shortcut conflict through
'Customize -> Keyboard')

Add 'All' category in 'Customize -> Keyboard' to list all command and
showing their shortcuts

Unify macro command shortcut setting (BaseApp/Preferences/Shortcut).
2022-11-10 23:20:18 +01:00
Paddle
c87c4bbd9f Gui: Add setting enabling workbench selector to be on the menubar. Restart required. 2022-11-07 11:57:53 -05:00
Chris Hennes
0b294a955c Gui: Remove Print from toolbar
Inadvertently left by previous commit.
2022-10-07 14:20:40 -05:00
PaddleStroke
7720925e28 GUI: Remove copy cut print paste from File toolbar (#7571)
As discussed in the forums poll at https://forum.freecadweb.org/viewtopic.php?f=8&t=71924

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2022-10-07 11:43:41 -05:00
PaddleStroke
de4b18c999 GUI: Remove Edit Mode from File toolbar (#7570)
See poll at https://forum.freecadweb.org/viewtopic.php?f=8&t=71925

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2022-10-07 11:06:01 -05:00
0penBrain
186d671a0c Gui: add 2 commands to store and recall working view in 3D viewport 2022-09-28 17:29:11 +02:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
berniev
7aede27553 Gui: Redundant_string_initialization 2022-08-08 16:51:32 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
923ebef729 Fix several clazy issues:
* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
2022-07-25 00:04:04 +02:00
wmayer
07ccb73fe7 Partially revert "Remove unused code into GUI" 2022-07-17 12:32:03 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Yorik van Havre
6bec7f2e39 Gui: Added 'Report a bug' help menu entry 2022-03-04 14:06:59 +01:00
wmayer
327ed41fd0 Gui: extend Workbench class to allow to define permanent menu items 2022-02-14 16:47:32 +01:00
marioalexis
50478a19d1 Part: Move Part_SectionCut command to Part menu item list 2022-02-08 12:09:09 +01:00
Uwe
cc53e381c6 [Part] feature to make persistent section cut views (#4118)
* [Part] feature to make persistent section cut views

* one aim is to have a feature to make real cuts, not hollow ones like with clipping
* the second one is to have a persistent view, so an object in the tree that can be further exported, meshed etc.

For a detailed description with examples see https://forum.freecadweb.org/viewtopic.php?f=17&t=52441
2022-02-05 01:57:57 +01:00
Uwe
09ba229e8e revert unwanted part from previous commit 2022-02-01 02:47:13 +01:00
Uwe
892476a1c5 [Gui] sort includes
to keep the overview and to reduce diff of a pending PR
2022-02-01 02:40:47 +01:00
Chris Hennes
3aebf0aead GUI: Handle packaged Workbenches and their icons 2021-12-18 20:29:42 -06:00
luz paz
d877ee4d47 Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
luz paz
ef37925b08 Gui: expose the 'Link Actions' toolbar icon to translation
Related to https://github.com/FreeCAD/FreeCAD-translations/issues/51 and https://github.com/FreeCAD/FreeCAD-translations/issues/16
2021-11-10 01:12:45 +01:00
mwganson
ac5f47e6b9 [Dragger] add dragger (Std_TransformManip) to right click context menu when right clicking on an object in the 3D view 2021-10-05 23:02:15 -05:00
wmayer
6f20e3e4d8 Gui: remove QT_TR_NOOP from command group names and use "CommandGroup" as context string 2021-09-29 16:31:55 +02:00
luz paz
543450d454 Crowdin: Expose View -> 'Standard views' -> 'Axonometric' to translation
Closes https://github.com/FreeCAD/FreeCAD-translations/issues/63
2021-09-12 11:04:39 -04:00
Yorik van Havre
10c684cfab Merge pull request #4788 from 0penBrain/UserEditMode
Gui: add user edit mode (default edit mode set by user)
2021-09-02 11:50:03 +02:00
Chris Hennes
f194ca7425 [GUI] Refactor tooltip code to rebuild shortcut
When the shortcut/accelerator key is changed, the tooltip should be
recalculated using the same code that calculated the original. Also
ensure this happens when the accelerator preferences are loaded.

Fixes #4664.
2021-08-25 14:24:17 -05:00
0penBrain
62b8b3b037 [Gui] UserEditMode : add menu and toolbar management 2021-05-14 09:23:04 +02:00
donovaly
4839b14adc [Gui] add Std_TransformManip to MenuItem
I was wondering why we only offer this tool in the context menu. I tested and cannot see a drawback in having it also in the edit menu
2021-03-28 11:34:40 +02:00
Zheng, Lei
5f03a329a3 Gui: add 'Donate' to Help menu 2021-01-04 10:43:37 +08:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
mwganson
b7f829e15f [Macro Menu] add Recent macros to Macro menu + list size preference. Executes selected macro or if Shift+click opens macro in editor. 2020-09-03 11:29:37 +02:00
mwganson
99585f3a85 [Standard Views] add Home view command. Default shortcut is 'Home' key. Restores camera orientation to current home view, configurable in edit menu -> preferences -> display -> navigation -> New Document Camera Orientation / Home view. 2020-07-20 13:48:37 +02:00