game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
QtNotificationService Class Reference

#include <qt_notification_service.h>

Inheritance diagram for QtNotificationService:
Collaboration diagram for QtNotificationService:

Public Member Functions

 QtNotificationService (QObject *parent=nullptr, ThemeManager *themeManager=nullptr)
 ~QtNotificationService () override
void clearAll () override
 Clear all notifications.
void error (const std::string &message, float duration=5.0f) override
 Show an error notification.
void info (const std::string &message, float duration=3.0f) override
 Show an info notification.
void notificationReceived (const QString &message, int type, float duration)
void setParentWidget (QWidget *widget)
void show (const core::Notification &notification) override
 Show a notification with full control.
void success (const std::string &message, float duration=3.0f) override
 Show a success notification.
void warning (const std::string &message, float duration=5.0f) override
 Show a warning notification.
Public Member Functions inherited from core::INotificationService
virtual ~INotificationService ()=default

Detailed Description

Definition at line 87 of file qt_notification_service.h.

Constructor & Destructor Documentation

◆ QtNotificationService()

QtNotificationService::QtNotificationService ( QObject * parent = nullptr,
ThemeManager * themeManager = nullptr )
explicit

Definition at line 252 of file qt_notification_service.cpp.

References notificationReceived().

◆ ~QtNotificationService()

QtNotificationService::~QtNotificationService ( )
overridedefault

Member Function Documentation

◆ clearAll()

void QtNotificationService::clearAll ( )
overridevirtual

Clear all notifications.

Implements core::INotificationService.

Definition at line 297 of file qt_notification_service.cpp.

◆ error()

void QtNotificationService::error ( const std::string & message,
float duration = 5.0f )
overridevirtual

Show an error notification.

Implements core::INotificationService.

Definition at line 285 of file qt_notification_service.cpp.

References core::Error, and notificationReceived().

◆ info()

void QtNotificationService::info ( const std::string & message,
float duration = 3.0f )
overridevirtual

Show an info notification.

Implements core::INotificationService.

Definition at line 267 of file qt_notification_service.cpp.

References core::Info, and notificationReceived().

◆ notificationReceived()

void QtNotificationService::notificationReceived ( const QString & message,
int type,
float duration )

◆ setParentWidget()

void QtNotificationService::setParentWidget ( QWidget * widget)

Definition at line 261 of file qt_notification_service.cpp.

◆ show()

void QtNotificationService::show ( const core::Notification & notification)
overridevirtual

Show a notification with full control.

Implements core::INotificationService.

Definition at line 291 of file qt_notification_service.cpp.

References core::Notification::duration, core::Notification::message, notificationReceived(), and core::Notification::type.

◆ success()

void QtNotificationService::success ( const std::string & message,
float duration = 3.0f )
overridevirtual

Show a success notification.

Implements core::INotificationService.

Definition at line 273 of file qt_notification_service.cpp.

References notificationReceived(), and core::Success.

◆ warning()

void QtNotificationService::warning ( const std::string & message,
float duration = 5.0f )
overridevirtual

Show a warning notification.

Implements core::INotificationService.

Definition at line 279 of file qt_notification_service.cpp.

References notificationReceived(), and core::Warning.


The documentation for this class was generated from the following files: