Commit Graph

32293 Commits

Author SHA1 Message Date
Jonas Bähr
4eafedb20f PD: Harmonize ExternalInvoluteGear and InternalInvoluteGear
There has been lots of duplicated code between those two, and the recent
changed introduced even more copy/paste code. This commit consolidates
both implementations. The two "public" entry points, `CreateExternalGear`
and `CreateInternalGear` have been kept and now call a shared helper.
2023-03-13 22:10:41 +01:00
Jonas Bähr
b3ab9c1c3c PD: some cleanup of InvoluteGear
This commit removes obsolete files, gets rid of py2 habits like `xrange`
and fixes some comments and blank lines.
2023-03-13 22:10:41 +01:00
marioalexis
b37fe66653 Fem: Remove property name comparison 2023-03-13 22:08:41 +01:00
wmayer
616c72e7e4 CMake: add Qt's WinExtra module 2023-03-13 18:14:11 +01:00
Ronny Standtke
b44f82f0f6 use standard Close button for consistency with other task dialogs 2023-03-13 11:56:27 -05:00
Ronny Standtke
0ff5ff37f4 move "Close" button of angular variant also to north 2023-03-13 11:56:27 -05:00
Abdullah Tahiri
5b3c86d8e3 Sketcher: Constraint - notification and internal geometry command clean up
==========================================================================

- Migration of all constraints to the new non-intrusive notification framework.

- Removal of internal geometry command

- Command to create manually internal geometries is removed (deprecated).
2023-03-13 16:21:01 +01:00
luzpaz
ff470469f5 Fix misc. grammar and whitespace 2023-03-13 15:01:05 +01:00
wmayer
54009f14ee App: fixes #7833: Python2/3 FIXME code in App/FreeCADInit.py to be reviewed
The workaround was needed for Py2 on Windows. Since with Py3 it works as expected the workaround can be removed
2023-03-13 14:07:59 +01:00
wandererfan
5462c9de6f [TD]allow loading SVG item from file 2023-03-12 22:05:16 -04:00
wandererfan
fb9b3a9e9e [TD]fix centering of shape
- centering of shape was not affecting the OCC TShape, so
  we now make a deep copy of the original
2023-03-12 19:21:22 -04:00
xtemp09
37d7f7d570 [TechDraw] Minor improvement of TaskLineDecor.cpp 2023-03-12 13:57:45 -04:00
Abdullah Tahiri
492c941395 Gui: Notifications - Convenience functions to send intrusive/non-intrusive notifications
========================================================================================

Functions to transparently send errors, warnings, notifications and translatednotifications, either
as intrusive messages (modal pop-up QMessageBox style) or as non-intrusive messages (notificationarea),
depending on the preferences of the user.

It is intended to substitute calls to QMessageBox with these functions in WBs, including the Sketcher WB.

Example:

QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
                      QObject::tr("Cannot add a constraint between two external geometries."));

Can be rewritten as:

 Gui::TranslatedNotification(obj,
               QObject::tr("Wrong selection"),
               QObject::tr("Cannot add a constraint between two external geometries."));

or

 Gui::TranslatedNotification("Sketcher",
               QObject::tr("Wrong selection"),
               QObject::tr("Cannot add a constraint between two external geometries."));

where the first parameter (obj or "Sketcher") is the notifier string. If obj is an App::DocumentObject
(or a derived class of it), internally the function transparently calls getFullLabel() to get the notifier
string.
2023-03-12 18:44:55 +01:00
marioalexis
2143976302 Fem: Remove property name comparison 2023-03-12 18:27:39 +01:00
luzpaz
c0b74c7dde libarea: fix whitespace 2023-03-12 18:22:02 +01:00
wmayer
645812b8f7 Tests: suppress warnings C4251 in test module 2023-03-12 17:58:11 +01:00
wmayer
bcc80ba9aa MSYS2: fix linking error with extern templates 2023-03-12 16:17:38 +01:00
wmayer
c8c9f42ae8 MSVC: fix compiler warnings about redefined pre-processor directives
Swapping the order of Qt and Inventor headers fixes them because the latter uses #ifdef/#endif guards
2023-03-12 16:17:38 +01:00
wmayer
8457037f17 clang: fix -Wdeprecated-declarations 2023-03-12 15:05:21 +01:00
wmayer
580b775690 clang: fix -Wunused-parameter, -Wunused-variable, -Wswitch 2023-03-12 15:05:21 +01:00
wmayer
2a970b3045 clang: fix -Wunused-but-set-variable 2023-03-12 15:05:21 +01:00
mosfet80
4cd350d2d0 Removal of unused code due to old <5.2 Qt library (#8842) 2023-03-12 11:08:58 +01:00
Abdullah Tahiri
d43f4cd26b Gui: Preference Page for NotificationArea
=========================================

Configuration preference page for controlling the notification area (non-intrusive messages and widget).
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
eb7bf5d977 Gui: Remove old signal for critical messages in favour of Notification Area
===========================================================================

The former system of autoclosing messageboxes is removed in favour of the Notification Area.
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
340ccb8ed6 Sketcher: SketchObject using the new notification system
========================================================

- CriticalMessage old signal is reconverted to new notification system. This enables to remove the obsolete old system.

- An example of how common errors can be provided with translation support is added, so that App notifications appear
translated in the NotificationArea.
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
b27bd2b4b5 Gui: Add Notification Area to Status bar
========================================

Parameter "NotificationAreaEnabled" can be used to completely disable the Notification Area.

If disabled it won't appear on the UI at all and no non-intrusive notification will be generated.
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
60cb06e20c Gui: Notification Area
======================

A notification area consisting of one area for non-intrusive notifications, and a widget showing previous
errors, warnings, critical messages and notifications.

Notifications being marked with QT_TRANSLATION_NOOP with context "Notifications" are translated.

Messages are shown during a minimum show time, unless pop up (clicked inside). Messages stay until
a maximum show time. Between the minimum and the maximum show times left mouse button events make
the non-intrusive notification disappear.

The widget stores a configurable amount of messages after which old messages are removed to make room for
new ones.

Unread messages are shown in bold.
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
a35374d12e Gui: New Icon for Notification Area
Gui: Icon resources - Warning icon

Gui: Icons - squash
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
63f3bdaf77 Base: Observer - fix template instantiation
===========================================

Merit goes to Werner for figuring out the issue and proposing a MSVC/MSYS2 viable solution:
https://github.com/FreeCAD/FreeCAD/pull/8781#issuecomment-1464898566
2023-03-12 06:06:29 +01:00
Abdullah Tahiri
77dc9bba1b NotificationBox: clang-format formatting 2023-03-12 06:06:29 +01:00
Abdullah Tahiri
cd79ea5994 NotificationBox: Fixes
======================

QToolTip removed the Windows specific behaviour of passing a screen widget as parent for QLabel
in 44fb925f50471ebc23dcccfaa4e9d9873b05d205. NotificationBox code is simplified not to use a
parent widget at all.

A inappropriate review fix actually causing a bug is fixed.

https://github.com/FreeCAD/FreeCAD/pull/8352#discussion_r1111342024
2023-03-12 06:06:29 +01:00
Daniel-Khodabakhsh
827af464e3 Add various matrix related expression functions (#8603)
Adds a few new Expression functions with the goal to:

- Simplify Placement, Rotation, Vector and Matrix object creation.
- Add new matrix functions for rotation and translation.
2023-03-11 20:13:23 -06:00
Hannu Koivisto
57aac275c7 [Draft] Mitigate crash in Draft_Edit (#8749) (#8750)
This mitigates the crash reported in issue #8749.  The crash happens when
using Draft_Edit and using keyboard to enter a coordinate in Edit node
dialog.  This change partially restores behaviour before commit fc14567,
after which FreeCADGui.Control.closeDialog and showDialog calls during
execution of DraftToolBar.editUi are no longer made using the todo.delay
mechanism.  The crash can still be triggered by artificially slowing down key
event processing, so this is not a proper fix, just a mitigation.
2023-03-11 17:44:04 +01:00
Uwe
adb972319f [Sketch] reverse commit 944c02f12b
- as discussed in #8838 (the PR will be improved after the weekend)
2023-03-11 17:26:42 +01:00
Paddle
944c02f12b Sketcher: Solver Message Widget simplification. 2023-03-11 16:08:16 +01:00
BHennen
0f4acc55be Add offset options to Draft PathArray (#8295)
* Add offset options to Draft PathArray

Allows user to specify a starting and ending offset to items in Draft PathArrays.

* [Draft] path array offset

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
2023-03-11 15:54:25 +01:00
Uwe
fff0f535dd [Gui] fix bug on restoring PrefColorButton
- onRestore did not read in transparencies because App::Color::fromPackedRGB was used instead of App::Color::fromPackedRGBA
2023-03-11 15:49:59 +01:00
wandererfan
d0c5b7c045 [TD]remove unused override methods 2023-03-11 08:08:58 -05:00
Uwe
3c31007e58 [FEM] BoxWidget: fix duplicate names
- as reported: https://github.com/FreeCAD/FreeCAD/pull/8825#issuecomment-1464876840
2023-03-11 13:55:14 +01:00
Uwe
1e702cdca2 [FEM] adjust initial position of new box filter
- as discussed in #8825
2023-03-11 13:55:14 +01:00
Roy-043
87b63d186e [Draft] fix regression introduced with #8433 (#8840) 2023-03-11 13:35:24 +01:00
mosfet80
218269bdaf Update json (#8830)
* Update json from 3.9.1 to 3.11.2
2023-03-11 13:30:27 +01:00
Uwe
2c6e696c68 [Zipios] fix testing
- after #8807 testing was broken due to a linking error, the fix was proposed in https://github.com/FreeCAD/FreeCAD/pull/8807#issuecomment-1464295791

- the formatting changes were automatically done according to our current clang file
2023-03-11 10:29:55 +01:00
marioalexis
191879b2c6 Fem: Remove property name comparison 2023-03-11 10:29:29 +01:00
wmayer
da98cfc4d1 Test: fix license unit test 2023-03-11 03:19:59 +01:00
Uwe
1dc9f5484f [FEM] [skip ci] BoxWidget.ui fix
- was reported and automatically fixed by Qt's Designer that the size in the file is incorrect, (the sum of the widget's widths is wider than the main widget's specified size)
2023-03-11 03:19:03 +01:00
marioalexis
a9b167ccbc Fem: Add box filter function 2023-03-11 03:13:57 +01:00
Chris Hennes
f1ffaf3ba9 Addon Manager: Handle icons with query strings 2023-03-10 17:30:51 -06:00
Chris Hennes
1f6c364fa6 Addon Manager: Refactor Metadata
Create a Python-native metadata class. Includes unit tests, and some PyLint cleanup.
2023-03-10 14:25:50 -06:00
wmayer
8532c96c20 PD: add unit test for PR #8763 2023-03-10 19:23:03 +01:00