Commit Graph

82 Commits

Author SHA1 Message Date
0penBrain
5429aeef3f Gui: ActionGroup also get its tooltip title updated 2022-11-21 04:06:20 +01:00
wmayer
5166ca54c0 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
aa0465e162 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
90ddd187f5 Gui: fix some clang-tidy warnings:
* readability-braces-around-statements
2022-11-13 17:42:08 +01:00
wmayer
25ee791786 Gui: [skip ci] fix some clang-tidy warnings:
* cppcoreguidelines-non-private-member-variables-in-classes
2022-11-13 17:16:03 +01:00
wmayer
e0bf6d48d5 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
7f104b077b Gui: fix readability-identifier-length 2022-11-12 23:57:14 +01:00
wmayer
e470bdc018 Gui: replace old-style with new-style connect 2022-11-12 21:57:26 +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
wmayer
2e1feaa78e Gui: [skip ci] fix several warnings reported by GH actions 2022-11-11 22:53:02 +01:00
wmayer
5bf7199804 Gui: replace old-style connect() with new-style 2022-11-11 22:53:02 +01:00
wmayer
439a2c65cf 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
6e6e42f696 Gui: [skip ci] fix several warnings reported by GH actions 2022-11-10 23:52:29 +01:00
Zheng, Lei
2138189f8e Gui: do not remove ending puncuation when clean action title 2022-11-10 23:20:18 +01:00
Zheng, Lei
028c30e56d Gui: move CommandCompleter into its own source file 2022-11-10 23:20:18 +01:00
Zheng, Lei
0a37a85ea2 Minor code change according to suggestions 2022-11-10 23:20:18 +01:00
Zheng, Lei
063ad7a5f0 Gui: fix action title processing 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
wmayer
fac648fff5 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
ff1b4eff05 Gui: Replace C cast 2022-09-18 11:06:51 -05: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
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
wmayer
45576f87c8 Gui: [skip ci] mkae sure the tooltip in ActionGroup::onActivated() disappears again 2022-07-28 16:33:27 +02:00
wmayer
916c814219 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
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
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