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
parentwidget.- 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,descriptionandicon.- 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
taskmessage.- Parameters:
task – Task 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
watchedforevent.- Parameters:
watched – Pointer to watched object
event – Event to watch
- Returns:
Whether the event was handled