Notifications

Qualified name: mv::util::Notifications

class Notifications : public QObject

Notifications manager class.

Orchestrates the creation and display of notifications (used solely by the help manager)

Note: This class is developed for internal use only

Author

Thomas Kroes

Public Functions

explicit Notifications(QWidget *parent = nullptr)

Construct notifications manager with parent widget.

Parameters:

parent – Pointer to parent widget

void showMessage(const QString &title, const QString &description, const QIcon &icon, const util::Notification::DurationType &durationType, std::int32_t delayMs)

Show message with title, description and icon.

Parameters:
  • title – Message title

  • description – Message description

  • icon – Message icon

  • durationType – Duration type of the notification

  • delayMs – Delay in milliseconds before the notification is shown

void showTask(QPointer<Task> task)

Show task message.

Parameters:

taskTask containing the notification details

void setParentWidget(QWidget *parentWidget)

Set parent widget to parentWidget (notification widgets will anchor to this widget)

Parameters:

parentWidget – Pointer to parent widget

Protected Functions

bool eventFilter(QObject *watched, QEvent *event) override

Watch watched for event.

Parameters:
  • watched – Pointer to watched object

  • event – Event to watch

Returns:

Whether the event was handled