LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::utils::NotificationManager Class Reference

Smart notification system for v1.10.0 Phase 9. More...

#include <NotificationManager.hpp>

Inheritance diagram for ui::qt::utils::NotificationManager:
Inheritance graph
Collaboration diagram for ui::qt::utils::NotificationManager:
Collaboration graph

Classes

struct  Notification
 

Public Types

enum class  NotificationType {
  Info , Warning , Error , Success ,
  Critical
}
 
enum class  NotificationAction { None , GoToEvent , ShowDetails , Dismiss }
 

Signals

void NotificationReceived (const Notification &notification)
 
void NotificationHistoryChanged ()
 

Public Member Functions

void notify (const QString &title, const QString &message, NotificationType type=NotificationType::Info, int eventRow=-1)
 Show a notification.
 
void setNotificationsEnabled (const QString &logLevel, bool enabled)
 Enable/disable notifications for a log level.
 
bool areNotificationsEnabled (const QString &logLevel) const
 
void setDisplayDuration (int milliseconds)
 Configure notification behavior.
 
void setMaxNotifications (int count)
 
void setGroupDuplicates (bool group)
 
const std::vector< Notification > & notificationHistory () const
 Get notification history.
 
void clearHistory ()
 Clear notification history.
 
int unreadCount () const
 Get unread notification count.
 
void playSound (NotificationType type)
 Play sound alert (placeholder for audio system integration)
 

Static Public Member Functions

static NotificationManager & getInstance ()
 

Private Slots

void OnNotificationTimeout ()
 

Private Member Functions

 NotificationManager ()
 
void AddToHistory (const Notification &notification)
 
bool ShouldShowNotification (NotificationType type) const
 

Private Attributes

std::vector< Notification > m_history
 
std::map< QString, bool > m_enabledLevels
 
int m_displayDurationMs {5000}
 
int m_maxNotifications {100}
 
bool m_groupDuplicates {true}
 

Detailed Description

Smart notification system for v1.10.0 Phase 9.

Features:

  • Toast notifications for log events (errors, warnings, critical)
  • Custom notification filtering based on log level/type
  • Notification history tracking with timestamps
  • Desktop notifications on supported platforms
  • Sound alerts and visual indicators
  • Notification grouping and deduplication
  • Configurable display duration and position

Member Enumeration Documentation

◆ NotificationAction

Enumerator
None 
GoToEvent 
ShowDetails 
Dismiss 

◆ NotificationType

Enumerator
Info 
Warning 
Error 
Success 
Critical 

Constructor & Destructor Documentation

◆ NotificationManager()

ui::qt::utils::NotificationManager::NotificationManager ( )
private

Member Function Documentation

◆ AddToHistory()

void ui::qt::utils::NotificationManager::AddToHistory ( const Notification &  notification)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ areNotificationsEnabled()

bool ui::qt::utils::NotificationManager::areNotificationsEnabled ( const QString &  logLevel) const

◆ clearHistory()

void ui::qt::utils::NotificationManager::clearHistory ( )

Clear notification history.

Here is the call graph for this function:

◆ getInstance()

NotificationManager & ui::qt::utils::NotificationManager::getInstance ( )
static

◆ notificationHistory()

const std::vector< Notification > & ui::qt::utils::NotificationManager::notificationHistory ( ) const
inline

Get notification history.

◆ NotificationHistoryChanged

void ui::qt::utils::NotificationManager::NotificationHistoryChanged ( )
signal
Here is the caller graph for this function:

◆ NotificationReceived

void ui::qt::utils::NotificationManager::NotificationReceived ( const Notification &  notification)
signal
Here is the caller graph for this function:

◆ notify()

void ui::qt::utils::NotificationManager::notify ( const QString &  title,
const QString &  message,
NotificationType  type = NotificationType::Info,
int  eventRow = -1 
)

Show a notification.

Here is the call graph for this function:

◆ OnNotificationTimeout

void ui::qt::utils::NotificationManager::OnNotificationTimeout ( )
privateslot

◆ playSound()

void ui::qt::utils::NotificationManager::playSound ( NotificationType  type)

Play sound alert (placeholder for audio system integration)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDisplayDuration()

void ui::qt::utils::NotificationManager::setDisplayDuration ( int  milliseconds)

Configure notification behavior.

Here is the call graph for this function:

◆ setGroupDuplicates()

void ui::qt::utils::NotificationManager::setGroupDuplicates ( bool  group)
Here is the call graph for this function:

◆ setMaxNotifications()

void ui::qt::utils::NotificationManager::setMaxNotifications ( int  count)
Here is the call graph for this function:

◆ setNotificationsEnabled()

void ui::qt::utils::NotificationManager::setNotificationsEnabled ( const QString &  logLevel,
bool  enabled 
)

Enable/disable notifications for a log level.

Here is the call graph for this function:

◆ ShouldShowNotification()

bool ui::qt::utils::NotificationManager::ShouldShowNotification ( NotificationType  type) const
private
Here is the caller graph for this function:

◆ unreadCount()

int ui::qt::utils::NotificationManager::unreadCount ( ) const

Get unread notification count.

Member Data Documentation

◆ m_displayDurationMs

int ui::qt::utils::NotificationManager::m_displayDurationMs {5000}
private

◆ m_enabledLevels

std::map<QString, bool> ui::qt::utils::NotificationManager::m_enabledLevels
private

◆ m_groupDuplicates

bool ui::qt::utils::NotificationManager::m_groupDuplicates {true}
private

◆ m_history

std::vector<Notification> ui::qt::utils::NotificationManager::m_history
private

◆ m_maxNotifications

int ui::qt::utils::NotificationManager::m_maxNotifications {100}
private

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