Commit Graph

91 Commits

Author SHA1 Message Date
Paddle
4407387ab4 Pref: wb: change to disabled + ordered lists. 2023-03-31 14:12:27 +02:00
Paddle
996f4da123 Pref: wb: remove the list of disabled wb.
TODO: Addon Manager should add workbenches to the list of enabled wb on installation. And remove them from the list on uninstall.
TODO: Addon Manager 'disable mode' should be removed.
2023-03-31 14:12:27 +02:00
Paddle
4b60df5ced Preference: Replace the name LazyLoaded by Workbenches. 2023-03-28 11:59:32 +02:00
Paddle
d7efe5a616 Preferences: Workbench : Replace the functions used to retrieve the list of enabled wb 2023-03-28 11:59:32 +02:00
Syres916
e0211a5abd [Gui] Fix display names of Recent Macros 2023-03-09 15:08:35 +01:00
Syres916
5171079cc4 [Gui] Recent macros, improve wording of Hint msg 2023-03-03 20:29:38 -06:00
Syres916
6611f607b4 [Gui] Recent macros, enhance warning msg
See discussion : https://forum.freecadweb.org/viewtopic.php?f=3&t=75350
2023-03-03 20:29:38 -06:00
Abdullah Tahiri
5244e28565 Gui: ActionGroup - aboutToShow and aboutToHide
==============================================

ActionGroup may integrate a drop down menu (internally a QMenu).

QMenu has signals aboutToShow and aboutToHide, which are called just before showing/hiding the menu.

This commit extends ActionGroup by providing corresponding signals.

An ActionGroup can be added to more than one toolbar and thus creates more than one menu. So, it can theoretically
happen that you have opened a menu and click on another menu. For this reason, the menu is passed as argument:

void aboutToHideMenu(QMenu*);
void aboutToShowMenu(QMenu*);
2023-02-25 23:13:55 +01:00
wmayer
684e9fd425 Gui: fix removing item from recent files list 2023-02-16 00:06:33 +01:00
0penBrain
6e65e77915 Gui: ActionGroup also get its tooltip title updated 2022-11-21 04:06:20 +01:00
wmayer
4483c77530 Gui: MSVC requires a user-defined destructor of RecentFilesAction
otherwise the class declaration of Private is needed in the header file
2022-11-16 12:46:47 +01:00
wmayer
dacf04c835 Gui: fix some clang-tidy warnings:
* modernize-return-braced-init-list
* modernize-use-equals-default
* modernize-loop-convert
* readability-implicit-bool-conversion
* readability-named-parameter
2022-11-13 18:43:39 +01:00
wmayer
756e081a78 Gui: fix some clang-tidy warnings:
* readability-braces-around-statements
2022-11-13 17:42:08 +01:00
wmayer
904f92d747 Gui: [skip ci] fix some clang-tidy warnings:
* cppcoreguidelines-non-private-member-variables-in-classes
2022-11-13 17:16:03 +01:00
wmayer
bbb3697b77 Gui: [skip ci] fix some clang-tidy warnings:
* cppcoreguidelines-special-member-functions
* cppcoreguidelines-explicit-virtual-functions
* readability-inconsistent-declaration-parameter-name
2022-11-13 16:35:11 +01:00
wmayer
0679c40d26 Gui: fix readability-identifier-length 2022-11-12 23:57:14 +01:00
wmayer
182aa2ac4c Gui: replace old-style with new-style connect 2022-11-12 21:57:26 +01:00
wmayer
6a8468f5bd Gui: implement WorkbenchSwitcher class to encapsulate the parameter details 2022-11-11 22:53:02 +01:00
wmayer
c966c98614 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
wmayer
2390ed8c8f Gui: [skip ci] fix several warnings reported by GH actions 2022-11-11 22:53:02 +01:00
wmayer
ceb1c83a35 Gui: replace old-style connect() with new-style 2022-11-11 22:53:02 +01:00
wmayer
3ee47be1e0 Gui: don't use '_tooltip' as argument name because it's already used for a class member 2022-11-11 01:25:33 +01:00
wmayer
1139e209a8 Gui: [skip ci] fix several warnings reported by GH actions 2022-11-10 23:52:29 +01:00
Zheng, Lei
1611724d39 Gui: do not remove ending puncuation when clean action title 2022-11-10 23:20:18 +01:00
Zheng, Lei
2a5190f67f Gui: move CommandCompleter into its own source file 2022-11-10 23:20:18 +01:00
Zheng, Lei
3f0f5cff99 Minor code change according to suggestions 2022-11-10 23:20:18 +01:00
Zheng, Lei
31d77a954b Gui: fix action title processing 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
Paddle
8d346f1bf5 Gui: Add setting enabling workbench selector to be on the menubar. Restart required. 2022-11-07 11:57:53 -05:00
wmayer
ec553a9292 Qt6 port:
* Explicitly include some missing headers
* Use 'static const char*' for XPM icon
* Skip template parameters for qMakePair
* Constructor of QFileInfo is marked as 'explicit' now
* QString::fromLatin1() also accepts a QByteArray
* QDateTime::fromTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::fromSecsSinceEpoch()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QApplication::globalStrut() is deprecated. Don't use it any more.
* QWidget::isTopLevel() is deprecated, use QWidget::isWindow()
2022-11-02 15:16:41 +01:00
marioalexis
0382f276a2 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
75acacd1b7 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
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
wmayer
b43784c6e2 Gui: [skip ci] mkae sure the tooltip in ActionGroup::onActivated() disappears again 2022-07-28 16:33:27 +02:00
wmayer
36a6f9e2fc Fix several clazy issue:
* Use multi-arg instead [-Wclazy-qstring-arg]
* Use an empty QLatin1String instead of an empty QStringLiteral [-Wclazy-empty-qstringliteral]
* getter Gui::ProgressBar::canAbort possibly mismarked as a slot [-Wclazy-const-signal-or-slot]
* Missing emit keyword on signal call [-Wclazy-incorrect-emit]
2022-07-24 20:07:04 +02:00
andrea
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
d5921e08ec 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
8d5a957eb0 Gui: use expresion 'keyboard shortcut' to avoid incorrect translation 2022-06-09 13:15:41 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
0penBrain
d5edaf568b [RecentMacros] Check and warn for shortcut conflicts 2022-03-01 18:40:33 +01:00
0penBrain
8bedccb564 [RecentMacros] Refactor restore() 2022-03-01 18:40:33 +01:00
0penBrain
94ddcde7f2 [RecentMacros] Fix shortcut display in status bar 2022-03-01 18:40:33 +01:00
Uwe
b4fff07d9e [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
Uwe
7cc9261182 [Gui] Application, command etc: remove unused includes 2022-02-20 22:41:34 +01:00
Uwe
1e314b0165 [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
0penBrain
58951fd9ec [Macro] Do not try to translate shortcut 2022-01-24 17:00:36 +01:00
0penBrain
c87c492ada [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
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00