=========================================================
Extends notifier types to Gui::Document, App::Document, Gui::ViewProviderDocumentObject.
This allows to pass these objects as notifiers, and the framework gets the right string
from the Label or FullLabel as appropriate.
===============================================================
For translated notifications now the caption is included in the
message, as the translation is already done, and this improves
the semantics of existing messages.
========================================================================================
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.