Commit Graph

54 Commits

Author SHA1 Message Date
wmayer
82a6241fc5 fix (Qt) issues found by clang's clazy tool:
+ -Wclazy-incorrect-emit
+ -Wclazy-strict-iterators
+ -Wclazy-overloaded-signal
+ -Wclazy-qstring-arg
+ -Wclazy-unused-non-trivial-variable
+ -Wclazy-container-anti-pattern
+ -Wclazy-range-loop-reference
+ -Wclazy-const-signal-or-slot
+ -Wclazy-detaching-temporary
+ -Wclazy-qfileinfo-exists
2022-06-29 21:00:54 +02:00
wmayer
3057abfae9 Gui: use expresion 'keyboard shortcut' to avoid incorrect translation 2022-06-09 13:15:41 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
0penBrain
acd5097a13 [RecentMacros] Check and warn for shortcut conflicts 2022-03-01 18:40:33 +01:00
0penBrain
cbf6e3d9bd [RecentMacros] Refactor restore() 2022-03-01 18:40:33 +01:00
0penBrain
40dfb94347 [RecentMacros] Fix shortcut display in status bar 2022-03-01 18:40:33 +01:00
Uwe
a8c912d6f8 [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
Uwe
e655ef820b [Gui] Application, command etc: remove unused includes 2022-02-20 22:41:34 +01:00
Uwe
bb4e6e477c [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
0penBrain
0f994fbf34 [Macro] Do not try to translate shortcut 2022-01-24 17:00:36 +01:00
0penBrain
35c78726a9 [Gui] ActionGroup can declared being a "Mode" action
This will essentially not update the tooltip when an action is checked as it isn't suitable
As example, view DrawStyle command where the group tooltip is better than the selected action tooltip

Only UserEditMode is implemented in this commit, should be pushed to DrawStyle and maybe other after merge
2021-05-15 11:26:20 +02:00
Chris Hennes
098d7b9aee [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
Zheng, Lei
52ae5f8d6c Gui: sync recent action file list from external modification 2021-01-31 18:14:18 +01:00
wmayer
4fca6cdb81 Gui: [skip ci] drop the hard limit of 50 allowed workbenches 2021-01-21 16:42:04 +01:00
Mateusz Skowroński
98f63ba60f Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
Zheng, Lei
cc44089782 Gui: temporary fix of preference menu in macos
QAction defaults menu role to TextHeuristicRole, which causes qt to
guess the menu role based on action title. And titles start with
'Config', 'Options', 'Settings', etc. will be considered as preference
menu. It seems some non-english translation causes the wrong action be
chosen as preference, such as 'Treeview actions'.

This commit just applied a temporary fix to default to QAction::NoRole
for GroupCommand. If there is ever some GroupCommand need to be a
system menu item on macos, we could add some command bit flag for that
purpose.
2020-12-24 16:58:18 +01: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
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
cff0638672 Qt5: QDesktopWidget is deprecated use QScreen [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
f317f900ce Gui: [skip ci] fixes: Std_DrawStyle button image: confusing update behavior 2020-05-01 17:36:00 +02:00
Zheng, Lei
4bd31c4b91 Gui: Command API changes
* invoke(), distinguish between command triggering source. Also add
  support of auto transaction using App::AutoTransaction. Now all
  command will support undo/redo by default.

* setupCheckable(), a helper function to Improve support of
  PythonGroupCommand

* getObjectCmd(), helper function to output Python command to refer to
  an object without ambiguity. Because with introduction of external
  linking, an object can no longer be safely referred through the
  current active document.

* Support auto MacroManager command logger. For commands that does not
  log any output to MacroManager, a log entry of 'Gui.runCommand()' will
  be auto generated.

* Support linked object in copyVisual()

* Modified do/runCommand() to print calling file and line number.

* Add various helper macros for run command involving a document or
  object.
2019-08-17 14:52:10 +02:00
Mateusz Skowroński
7ba96b5f02 Remove unused non-trivial variables. [-Wclazy-unused-non-trivial-variable] Thanks Clazy! 2019-02-11 15:39:15 +01:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
wmayer
e332bfa172 save last accessed file directly in the user parameters 2017-10-26 11:57:45 +02:00
wmayer
67b990c2b5 fixes #0002323: Workbench Start recent list of 3 files is - after a crash - not sync with recent list in File Menu Recent list of 4 files 2017-10-05 10:38:42 +02:00
Markus Lampert
bad543e114 Pop-up action's tooltip if ActionGroup is expanded and the mouse hovers over an action. 2017-09-28 23:22:11 +02:00
wmayer
c526c18b94 fix scan coverity issues: uncaught exception 2017-04-11 14:03:08 +02:00
Kunda
de2392eb18 source typo fixes pt5
+ cleaning up some more non-short-URLs
Issue #2914
2017-03-04 13:07:13 -03:00
wmayer
dfe2039a5d issue #0002678: file names with underscores are not displayed correctly in recent files menu 2016-08-22 22:52:12 +02:00
wmayer
b1c73eba10 + rework parameter dialog 2016-04-01 15:18:56 +02:00
triplus
2b19558ce6 Set QComboBox icon size 2016-02-29 20:14:49 +01:00
Yorik van Havre
a6dd30877b Removed workbench keyboard shortcut W+0. Now only W+1-9 work. 2016-01-08 10:30:44 -02:00
Yorik van Havre
98d4c5efd5 Changed shortcuts of workbenches to W + number 2016-01-07 11:47:53 -02:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
0695552cff QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
Yorik van Havre
fc5c96c537 Changed default shortcuts for 10 first workbenches from CTRL+number to ALT+CTRL+number 2015-12-18 10:39:27 -02:00
Yorik van Havre
ea2549d1a6 Added automatic Ctrl+Number shortcuts for the 10 first woekbenches 2015-11-26 09:11:39 -02:00
wmayer
e6cafe2206 + set object name to tool buttons with popup menu 2015-11-17 18:39:23 +01:00
wmayer
96bee2fa47 + allow to set a default action for an exclusive group 2015-09-20 15:47:11 +02:00
wmayer
41f090b681 + filter out removed workbenches 2015-06-11 00:19:20 +02:00
wmayer
2cf17db852 + fix whitespaces 2015-06-10 23:21:46 +02:00
Przemo Firszt
9b6f2b448e App: Add workbenches with unknown status to enabled list
Newly installed workbenches are not on enabled nor disabled list, so
they were treated as disabled. That behaviur could be confusing for
the user as a newly installed workbench was not shouwing up on the
workbench list. This commit changes that behaviour and new workbenches
are enabled by default.

Reported-by: r-frank
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-10 22:11:24 +02:00
Przemo Firszt
da0e25b709 App: Add dialog to pick preferred workbenches
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-18 22:25:59 +02:00
wmayer
f02cec56ef + use right iterator variable 2015-05-08 12:40:57 +02:00
wmayer
a201bd2a5e + fixes #0001989: 'Open recent' not saved until exit. 2015-04-11 19:04:31 +02:00
wmayer
c94403412d + fixes #0001719: Show current shortcuts (S) in menus and hover text. 2014-08-31 14:28:33 +02:00
Peter Lama
0f5d0b3f77 fixes #0001485: 'About FreeCAD' disappears on Mac OS X 2014-03-20 16:47:35 -07:00