From d441590274248ff25f070d75fd89b43e69e60cff Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 20 Aug 2017 02:03:21 +0200 Subject: [PATCH] Add documentation about D-Bus notification actions --- misc/dbusnotification.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/misc/dbusnotification.h b/misc/dbusnotification.h index caf801b..221a530 100644 --- a/misc/dbusnotification.h +++ b/misc/dbusnotification.h @@ -116,8 +116,7 @@ inline const QString &DBusNotification::icon() const * \brief Sets the icon name. * \remarks * The specified \a icon should be either an URI (file:// is the only URI schema - * supported - * right now) or a name in an icon theme. + * supported right now) or a name in an icon theme. */ inline void DBusNotification::setIcon(const QString &icon) { @@ -134,11 +133,25 @@ inline void DBusNotification::setTimeout(int timeout) m_timeout = timeout; } +/*! + * \brief Returns the actions for the notification. + * + * The actions are a list of action IDs and action names. The ID is returned by + * the actionInvoked() signal if an action is triggered. The action name is the + * user-visible name of the notification. + * + * Example: { QStringLiteral("dismiss"), tr("Dismiss notification"), + * QStringLiteral("details"), tr("Show details") } + */ inline const QStringList &DBusNotification::actions() const { return m_actions; } +/*! + * \brief Sets the actions for the notification. + * \sa see actions() for details and an example + */ inline void DBusNotification::setActions(const QStringList &actions) { m_actions = actions;