Commit Graph

13 Commits

Author SHA1 Message Date
Abdullah Tahiri
77799d5ec4 NotificationArea: Correct painting position
===========================================

QT has a open bug regarding filling the contents of a QMenu in aboutShow:
https://bugreports.qt.io/browse/QTBUG-54421

This commit presents a work-around this bug.

The two step procedure of this commit, forces a recalculation of the size
from the slot and then manually moves the widget to the right position.
2023-03-26 20:26:20 +02:00
Abdullah Tahiri
8608c6a845 NotificationArea: subscription to errors and warnings
=====================================================

Subscription to errors and warnings is controlled by parameters.
2023-03-26 11:33:57 +02:00
Abdullah Tahiri
36a35c6c37 NotificationArea: Clang format 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
f0077e5f8a NotificationArea: Change Icon color to indicate missed notifications 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
c5710055b5 NotificationArea: Parameters to control inactive notification show behaviour 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
6e3bdd8f2a NotificationBox: Convert options to enum class 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
1e3b728f35 NotificationBox: Add option to hide notification if reference widget is deactivated 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
2f8be2c77b NotificationBox: Enable options to not show if reference widget is not active and refactor restricttoarea 2023-03-22 19:13:32 +01:00
Abdullah Tahiri
b04ef3a351 NotificationBox/NotificationArea: Restrict rendering area to main frame
========================================================================

The NotificationBox is extended to take the QRect in global coordinates. Then
it will try to dimension the label within this area. If a fixed width is provided, that
is enforced (take precedence).

The NotificationArea passes the QRect of the main window to the NotificationBox.

This is intended to fix:
https://github.com/FreeCAD/FreeCAD/issues/8940
2023-03-20 15:43:42 +01:00
Abdullah Tahiri
a2bd55109d NotificationArea: Convert plain text to HTML to perserve format 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
4b7a44739f NotificationArea: Use fixed size notifications 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
3ece84fd9d NotificationArea: Allow wrapping of message text to avoid rendering issues with long messages 2023-03-17 11:29:30 +01:00
Abdullah Tahiri
b2ef6f3f43 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