Albert
Loading...
Searching...
No Matches
albert::Notification Class Referencefinal

#include <albert/notification.h>

Description

The notification class.

This is basically a wrapper around the QNotification class.

See also
https://github.com/QtCommunity/QNotification

Inherits QObject.

Public Member Functions

 Notification (const QString &title={}, const QString &text={}, QObject *parent=nullptr)
 Constructs a notification with the given title and text.
 
 ~Notification ()
 Destructs the notification.
 
const QString & title () const
 Returns the title of the notification.
 
void setTitle (const QString &title)
 Sets the title of the notification to title.
 
const QString & text () const
 Returns the text of the notification.
 
void setText (const QString &text)
 Sets the text of the notification to text.
 
void send ()
 Send the notification to the notification server.
 
void dismiss ()
 Dismiss the notification.
 

Signals

void activated ()
 Emitted when the notification is activated, i.e.
 

Constructor & Destructor Documentation

◆ Notification()

albert::Notification::Notification ( const QString &  title = {},
const QString &  text = {},
QObject *  parent = nullptr 
)

Constructs a notification with the given title and text.

◆ ~Notification()

albert::Notification::~Notification ( )

Destructs the notification.

Member Function Documentation

◆ activated

void albert::Notification::activated ( )
signal

Emitted when the notification is activated, i.e.

the user clicked on the notification.

◆ dismiss()

void albert::Notification::dismiss ( )

Dismiss the notification.

This will remove the notification from the notification server.

◆ send()

void albert::Notification::send ( )

Send the notification to the notification server.

This will add the notification to the notification server and present it to the user (Subject to the users settings).

◆ setText()

void albert::Notification::setText ( const QString &  text)

Sets the text of the notification to text.

◆ setTitle()

void albert::Notification::setTitle ( const QString &  title)

Sets the title of the notification to title.

◆ text()

const QString & albert::Notification::text ( ) const

Returns the text of the notification.

◆ title()

const QString & albert::Notification::title ( ) const

Returns the title of the notification.


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