Commit Graph

23 Commits

Author SHA1 Message Date
PaddleStroke
c63be903e4 MenuManager: modernize for loops 2024-06-03 10:40:05 -05:00
Zheng Lei
b00a4384bf Gui: support toolbar drag and drop to status bar and menu bar (#13571)
* Gui: support toolbar drag and drop to status bar and menu bar

Closes FreeCAD/FreeCAD#12979

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Gui: improve toolbar handling in status and menu bar

* Gui: fix workbench tab bar orientation in status or menu bar

* Gui: remove workbench toolbar position settings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-06 17:59:16 +02:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
wmayer
90ddd187f5 Gui: fix some clang-tidy warnings:
* readability-braces-around-statements
2022-11-13 17:42:08 +01:00
wmayer
7f104b077b Gui: fix readability-identifier-length 2022-11-12 23:57:14 +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
Zheng, Lei
ae8ba0de3d Gui: fix shortcut context handling in ShortcutManager
Related #6097

Qt ignores shortcut of actions in invisible toolbar, but not for actions
in a hidden menu action of menu bar, which is likely a Qt bug. The
desired behavior should be that of toolbar actions, so that actions
belong to different workbenches can have the same shortcut without
conflict.

This commit works around this inconsistency by ensuring only the active
actions are added in menu bar. In addition, all active actions will be
added to a zero sized child widget of the main window, which ensures the
shortcuts of these actions being active regardless whether the action is
in toolbar or menu bar, visible or not.
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
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
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
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
3e6e711e06 [Gui] MDIView: remove unused includes 2022-03-05 02:10:24 +01:00
wmayer
327ed41fd0 Gui: extend Workbench class to allow to define permanent menu items 2022-02-14 16:47:32 +01:00
triplus
e56c683f15 Optional ClearMenuBar parameter
Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=34&t=34366

P.S. Note that some mixed line endings were detected in this file and were normalized automatically.
2019-02-28 03:15:13 +01:00
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Peter Lama
cf6c4032d7 Fix duplicate about entries in mac app menu
Clearing the menu bar does not remove the actions from the app menu,
but setting the action role allows Qt to take care of duplicates.
2018-03-30 10:47:19 -07:00
Peter Lama
7db8de70e1 Workaround Qt 5 macOS menu bug
With Qt => 5.9, it would randomly crash when opening a menu after changing workbenches.
Evidently it is a Qt macOS bug related to removing actions from menus.
Recreating the menus everytime avoids the issue.
2018-03-22 09:47:54 -07:00
wmayer
c997180a47 Qt4/Qt5 neutral changes:
+ remove QCoreApplication::UnicodeUTF8/QApplication::UnicodeUTF8
+ remove QCoreApplication::CodecForTr/QApplication::CodecForTr
2016-12-12 14:52:09 +01: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
wmayer
430f35cb92 0000903: V0.13 - Change Individual face color on solid is missing (finish this in 0.14) 2012-12-07 12:13:36 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00