Commit Graph

55 Commits

Author SHA1 Message Date
Zheng, Lei
362c781553 Gui: fix Customize -> Keyboard shortcut priroity list
Add API Command::initAction() to force create action for all commands
with shortcut in order to register with ShortcutManager to obtain a
complete list of actions with the same shortcut.
2022-11-10 23:20:18 +01:00
Zheng, Lei
64bddb0d88 Gui: change Command::getRevision() to const 2022-11-10 23:20:18 +01:00
Zheng, Lei
2328284884 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
wmayer
ba8d5ab055 Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
a909df7f39 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
2b04b01edc cppcoreguidelines-special-member-functions
* disable move constructor and move assignment for several core classes
2022-06-25 17:46:48 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
7cc9261182 [Gui] Application, command etc: remove unused includes 2022-02-20 22:41:34 +01:00
Chris Hennes
c9240fbb4a GUI: Add Python interface to create custom command 2022-02-14 09:56:24 -06:00
wmayer
bc57ba6027 Gui: add convenience function Command::translatedGroupName() 2021-09-29 15:25:46 +02:00
wmayer
e211b89cf8 port to MSYS2/clang 2021-09-19 19:49:44 +02:00
Yorik van Havre
3e483c5268 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
af9690ec06 [Core] Add checks for conflicting accelerators
When compiled in debug mode, this PR adds code to check for conflicting
accelerator keys when a command is created. This can help developers
ensure that their default accelerator key selections don't conflict.

Replace partial match algorithm

Co-authored-by: 0penBrain <48731257+0penBrain@users.noreply.github.com>
2021-08-29 16:13:59 -05:00
Chris Hennes
44ce401a53 [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
a8e7992a7d [Gui] UserEditMode : take into account in edit command
+ Mark strings for translation
2021-05-14 09:23:04 +02:00
wmayer
b55cc8aec1 Gui: [skip ci] refactor Command::invoke 2021-03-28 20:04:31 +02:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
e3530f9690 set platform-specific doCommand() to fix more -Wgnu-zero-variadic-macro-arguments 2019-11-16 00:54:52 +01:00
wmayer
2637280c1d restore old definition of doCommand macro due to msvc failure 2019-11-14 19:42:24 +01:00
wmayer
4291a087b8 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-14 00:48:26 +01:00
wmayer
891f8953fe improve strict ISO C++11 (-Wpedantic) 2019-10-14 10:54:57 +02:00
wmayer
8f72e1fde6 fix typo 2019-10-08 10:36:19 +02:00
Zheng, Lei
845fa8471a Gui: add class GroupCommand help with grouped command
As an example usage, changed StdCmdTreeViewActions to be derived from
GroupCommand
2019-10-08 10:16:00 +02:00
Zheng, Lei
5c5ca1f523 Gui: add document to Command and Selection 2019-10-08 10:14:41 +02:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
luz.paz
0f67e8ddfa Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
b1c0de8dae 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
luz.paz
4cfda0c3a5 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00
luz.paz
b214f606c4 Misc. typo and whitespace fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=3&t=30988#p256964
along with other misc. fixes
2018-09-19 17:26:03 +02:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Stefan Tröger
dd87094672 Move App::Part to a separate global toolbar 2017-09-09 16:47:07 +02:00
wmayer
ff1b9dde41 issue #0002687: zoomin/out during transform 2016-10-09 18:32:18 +02:00
wmayer
afa37847b5 remove Application::runPythonCode 2016-09-15 23:14:31 +02:00
wmayer
f44df3cdf0 do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
ef363f9390 split compound command in separate commands to make shortcus customizable 2016-09-10 14:47:01 +02:00
Stefan Tröger
d796ca2bf9 better pipe view handling 2016-04-12 18:12:09 +02:00
jriegel
29507a44ed First claimChildren3D implementation and Starting PartItem implementation 2016-04-12 18:11:45 +02:00
Abdullah Tahiri
8a3958ced5 Gui: Extension of CommandMacro for system-wide macros
=====================================================

What?
Extension of the CommandMacro constructor to take an additional optional argument to indicate that the macro
is located in the system-wide directory, and shall be executed accordingly.
2016-01-11 19:25:53 +01:00
wmayer
61e1a5ca2f + use Python's inspect module to get calling instance of addCommand 2015-12-16 23:07:24 +01:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
ec91085765 + duplicate string array for Python commands 2015-09-20 14:11:53 +02:00
wmayer
26b424e776 + support of exclusive Python command groups 2015-09-02 22:52:04 +02:00
wmayer
27dc80c846 + support of checkable commands 2015-08-25 18:01:37 +02:00
wmayer
882ecd3ce3 + implement class PythonGroupCommand 2015-06-27 17:21:02 +02:00
wmayer
c91018946c + Extend Command framework to allow to update QAction 2015-06-03 18:30:36 +02:00
wmayer
ce528d1c4a + fixes #0001719: Show current shortcuts (S) in menus and hover text. 2014-08-31 14:28:33 +02:00
wmayer
cc775f9254 + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
79c0e0bd2a + fix typos or documentation 2014-03-29 11:46:07 +01:00