#include <notificationsmanager.h>
Class for working with native DBus notifications.
◆ NotificationsManager()
| NotificationsManager::NotificationsManager |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
◆ CreateArgListStructure()
| const QList< QVariant > NotificationsManager::CreateArgListStructure |
( |
const QString & | title, |
|
|
const QString & | message ) const |
|
private |
Constructs and returns special ArgumentsList structure for the Notifications service.
- Returns
- ArgumentsList structure for the Notifications service.
◆ CreateHintsStructure()
| const QVariantMap NotificationsManager::CreateHintsStructure |
( |
| ) |
const |
|
private |
Constructs and returns special Hints structure for the Notifications service.
- Returns
- Hints structure for the Notifications service.
◆ FormatNotificationMessage()
| const QString NotificationsManager::FormatNotificationMessage |
( |
const QString & | message | ) |
const |
|
private |
Formats a message for the Notifications service based on supported features.
- Parameters
-
- Returns
- Formatted string for the Notifications service.
◆ GetCapabilities()
| void NotificationsManager::GetCapabilities |
( |
| ) |
|
|
private |
Gets information about available notifications capabilities and stores it in a private field.
◆ GetNotificationImage()
| const QImage NotificationsManager::GetNotificationImage |
( |
const int | size = 128 | ) |
const |
|
private |
Gets a default image for the Notifications service.
- Parameters
-
| size | Desired image size. Default - 128 px. |
- Returns
- Image for the Notifications service.
◆ SetNotificationSoundMode()
| void NotificationsManager::SetNotificationSoundMode |
( |
const bool | mode | ) |
|
Sets the notification sound mode: loud or silent.
- Parameters
-
| mode | Notification mode: true - loud, false - silent. |
◆ ShowNotification()
| bool NotificationsManager::ShowNotification |
( |
const QString & | title, |
|
|
const QString & | message ) const |
Shows DBus notification with specified title and message.
- Parameters
-
| title | Notification title. |
| message | Notification message. |
- Returns
- Result of the operation.
- Return values
-
| true | The requested operation completed successfully. |
| false | An error occurred when trying to perform the requested operation. |
◆ DBusInstance
| QDBusConnection NotificationsManager::DBusInstance = QDBusConnection::sessionBus() |
|
private |
◆ IsImagesSupported
| bool NotificationsManager::IsImagesSupported |
|
private |
Stores information if the Notifications service supports images.
◆ IsMarkupSupported
| bool NotificationsManager::IsMarkupSupported |
|
private |
Stores information if the Notifications service supports basic HTML markup.
◆ IsSoundEnabled
| bool NotificationsManager::IsSoundEnabled = true |
|
private |
Stores if the notification sound is enabled.
◆ NotifyBusInterface
| const QString NotificationsManager::NotifyBusInterface = QStringLiteral("org.freedesktop.Notifications") |
|
private |
Stores the Notifications DBus interface.
◆ NotifyBusMethodNameCapabilities
| const QString NotificationsManager::NotifyBusMethodNameCapabilities = QStringLiteral("GetCapabilities") |
|
private |
Stores the Notifications DBus GetCapabilities method name.
◆ NotifyBusMethodNameNotify
| const QString NotificationsManager::NotifyBusMethodNameNotify = QStringLiteral("Notify") |
|
private |
Stores the Notifications DBus Notify method name.
◆ NotifyBusName
| const QString NotificationsManager::NotifyBusName = QStringLiteral("org.freedesktop.Notifications") |
|
private |
Stores the Notifications DBus interface name.
◆ NotifyBusPath
| const QString NotificationsManager::NotifyBusPath = QStringLiteral("/org/freedesktop/Notifications") |
|
private |
Stores the Notifications DBus object path.
The documentation for this class was generated from the following files: