Commit Graph

52 Commits

Author SHA1 Message Date
wmayer
23961706be Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
3877fc62c3 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
1459fd61a4 cppcoreguidelines-special-member-functions
* disable move constructor and move assignment for several core classes
2022-06-25 17:46:48 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
e655ef820b [Gui] Application, command etc: remove unused includes 2022-02-20 22:41:34 +01:00
Chris Hennes
93836b89a5 GUI: Add Python interface to create custom command 2022-02-14 09:56:24 -06:00
wmayer
76da77f80e Gui: add convenience function Command::translatedGroupName() 2021-09-29 15:25:46 +02:00
wmayer
8cbd92d874 port to MSYS2/clang 2021-09-19 19:49:44 +02: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
767bc22948 [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
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
c6777b33e2 [Gui] UserEditMode : take into account in edit command
+ Mark strings for translation
2021-05-14 09:23:04 +02:00
wmayer
ca83354bf9 Gui: [skip ci] refactor Command::invoke 2021-03-28 20:04:31 +02:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
555ecd0427 set platform-specific doCommand() to fix more -Wgnu-zero-variadic-macro-arguments 2019-11-16 00:54:52 +01:00
wmayer
7944c31f93 restore old definition of doCommand macro due to msvc failure 2019-11-14 19:42:24 +01:00
wmayer
aaff1b093e [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-14 00:48:26 +01:00
wmayer
84648aea62 improve strict ISO C++11 (-Wpedantic) 2019-10-14 10:54:57 +02:00
wmayer
77d3c19573 fix typo 2019-10-08 10:36:19 +02:00
Zheng, Lei
3b1aa19f05 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
b583c2c9ac Gui: add document to Command and Selection 2019-10-08 10:14:41 +02:00
wmayer
9fa56345cf 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
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +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
luz.paz
cb4a0adf71 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00
luz.paz
360e581672 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
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Stefan Tröger
1a3fb02eb9 Move App::Part to a separate global toolbar 2017-09-09 16:47:07 +02:00
wmayer
4d6d8e71f4 issue #0002687: zoomin/out during transform 2016-10-09 18:32:18 +02:00
wmayer
947f9575de remove Application::runPythonCode 2016-09-15 23:14:31 +02:00
wmayer
e8554cc77a do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
dbac90022d split compound command in separate commands to make shortcus customizable 2016-09-10 14:47:01 +02:00
Stefan Tröger
7fc0111944 better pipe view handling 2016-04-12 18:12:09 +02:00
jriegel
8eb0d198f8 First claimChildren3D implementation and Starting PartItem implementation 2016-04-12 18:11:45 +02:00
Abdullah Tahiri
89e89c8b2d 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
32377b7635 + use Python's inspect module to get calling instance of addCommand 2015-12-16 23:07:24 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
1d8b7f3582 + duplicate string array for Python commands 2015-09-20 14:11:53 +02:00
wmayer
eb4040d6d0 + support of exclusive Python command groups 2015-09-02 22:52:04 +02:00
wmayer
fc9d1e86ac + support of checkable commands 2015-08-25 18:01:37 +02:00
wmayer
448ded204a + implement class PythonGroupCommand 2015-06-27 17:21:02 +02:00
wmayer
95a0633774 + Extend Command framework to allow to update QAction 2015-06-03 18:30:36 +02:00
wmayer
c94403412d + fixes #0001719: Show current shortcuts (S) in menus and hover text. 2014-08-31 14:28:33 +02:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
966b12813a + fix typos or documentation 2014-03-29 11:46:07 +01:00
wmayer
81865502dc Make Command::getSelection static 2013-04-26 17:09:18 +02:00
jriegel
61914bc772 Add all base system changes from the Assembly branch 2013-02-10 20:02:33 +01:00
wmayer
9c61558ffc Add thickness function 2012-11-26 21:10:09 +01:00