Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Slots | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Notificator Class Reference

Cross-platform desktop notification client. More...

#include <notificator.h>

Inheritance diagram for Notificator:
[legend]
Collaboration diagram for Notificator:
[legend]

Public Types

enum  Class { Information, Warning, Critical }
 

Public Slots

void notify (Class cls, const QString &title, const QString &text, const QIcon &icon=QIcon(), int millisTimeout=10000)
 Show notification message. More...
 

Public Member Functions

 Notificator (const QString &programName, QSystemTrayIcon *trayIcon, QWidget *parent)
 Create a new notificator. More...
 
 ~Notificator ()
 

Private Types

enum  Mode {
  None, Freedesktop, QSystemTray, Growl12,
  Growl13, UserNotificationCenter
}
 

Private Member Functions

void notifySystray (Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout)
 

Private Attributes

QWidget * parent
 
QString programName
 
Mode mode
 
QSystemTrayIcon * trayIcon
 

Detailed Description

Cross-platform desktop notification client.

Definition at line 24 of file notificator.h.

Member Enumeration Documentation

Enumerator
Information 

Informational message.

Warning 

Notify user of potential problem.

Critical 

An error occurred.

Definition at line 36 of file notificator.h.

enum Notificator::Mode
private
Enumerator
None 

Ignore informational notifications, and show a modal pop-up dialog for Critical notifications.

Freedesktop 

Use DBus org.freedesktop.Notifications.

QSystemTray 

Use QSystemTray::showMessage.

Growl12 

Use the Growl 1.2 notification system (Mac only)

Growl13 

Use the Growl 1.3 notification system (Mac only)

UserNotificationCenter 

Use the 10.8+ User Notification Center (Mac only)

Definition at line 57 of file notificator.h.

Constructor & Destructor Documentation

Notificator::Notificator ( const QString &  programName,
QSystemTrayIcon *  trayIcon,
QWidget *  parent 
)

Create a new notificator.

Note
Ownership of trayIcon is not transferred to this object.

Definition at line 36 of file notificator.cpp.

Here is the call graph for this function:

Notificator::~Notificator ( )

Definition at line 82 of file notificator.cpp.

Here is the call graph for this function:

Member Function Documentation

void Notificator::notify ( Class  cls,
const QString &  title,
const QString &  text,
const QIcon &  icon = QIcon(),
int  millisTimeout = 10000 
)
slot

Show notification message.

Parameters
[in]clsgeneral message class
[in]titletitle shown with message
[in]textmessage content
[in]iconoptional icon to show with message
[in]millisTimeoutnotification timeout in milliseconds (defaults to 10 seconds)
Note
Platform implementations are free to ignore any of the provided fields except for text.

Definition at line 297 of file notificator.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Notificator::notifySystray ( Class  cls,
const QString &  title,
const QString &  text,
const QIcon &  icon,
int  millisTimeout 
)
private

Definition at line 229 of file notificator.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Mode Notificator::mode
private

Definition at line 66 of file notificator.h.

QWidget* Notificator::parent
private

Definition at line 56 of file notificator.h.

QString Notificator::programName
private

Definition at line 65 of file notificator.h.

QSystemTrayIcon* Notificator::trayIcon
private

Definition at line 67 of file notificator.h.


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