#include <widgetnotificationsink.h>
List of all members.
Detailed Description
WidgetNotificationSink is a common base class for all notification sinks that trigger visual feedback using a graphics widget.
WidgetNotificationSink creates MBanner widgets for notifications. When MBanner is clicked the action bound to the notification is triggered and notification is removed from the notification system signaling notificationRemovalRequested().
The sink can be configured to always show the given notification text in the banners (the default mode) or to only show a generic text instead of the given notification text if the privacy mode is enabled by setting the value of the /desktop/meego/privacy/private_lockscreen_notifications GConf key to true. This can be accomplished with the setHonorPrivacySetting() call.
Constructor & Destructor Documentation
WidgetNotificationSink::WidgetNotificationSink |
( |
|
) |
|
Constructs a widget notification sink.
Member Function Documentation
bool WidgetNotificationSink::containsText |
( |
const Notification & |
notification |
) |
[protected] |
Check whether the notification contains text.
- Parameters:
-
| notification | The notification object to represent with the MBanner. |
- Returns:
true
if the notification contains text, false
otherwise
MBanner * WidgetNotificationSink::createInfoBanner |
( |
const Notification & |
notification |
) |
[protected] |
Creates a MBanner widget to represent a notification object. Ownership of the constructed object is passed to the caller.
- Parameters:
-
| notification | The notification object to represent with the MBanner. |
- Returns:
- Constructed MBanner that represents the notification.
Creates a MBanner widget from the given notification parameters. Ownership of the constructed object is passed to the caller.
- Parameters:
-
| type | Notification type on the basis of which info banner type is to be constructed. |
| groupId | The group ID to be associated with the info banner. |
| params | NotificationParameters according to which configure the MBanner. |
bool WidgetNotificationSink::determineUserRemovability |
( |
const NotificationParameters & |
parameters |
) |
[static, protected] |
Determines user removability of a notification based on the given notification parameters.
- Parameters:
-
| parameters | Notification parameters to determine removability from. |
- Returns:
true
if the notification should be user removable, false
otherwise
QString WidgetNotificationSink::infoBannerGenericText |
( |
const NotificationParameters & |
parameters |
) |
[static, protected] |
Creates a generic text string from notification parameters.
- Parameters:
-
- Returns:
- the generic text
QString WidgetNotificationSink::infoBannerSubtitleText |
( |
const NotificationParameters & |
parameters |
) |
[static, protected] |
Creates a subtitle text string from notification parameters.
- Parameters:
-
- Returns:
- the subtitle text
QString WidgetNotificationSink::infoBannerTitleText |
( |
const NotificationParameters & |
parameters |
) |
[static, protected] |
Creates a title text string from notification parameters.
- Parameters:
-
- Returns:
- the title text
void WidgetNotificationSink::privacySettingChanged |
( |
bool |
privacyEnabled |
) |
[signal] |
Informs about a change in the privacy setting.
- Parameters:
-
| privacyEnabled | true if the privacy was enabled, false if disabled |
void WidgetNotificationSink::setHonorPrivacySetting |
( |
bool |
honor |
) |
|
Controls whether the notification banners should only show a generic text instead of the full notification text if the /desktop/meego/privacy/private_lockscreen_notifications GConf key is set to true. If the GConf key is not honored the private mode is never used.
- Parameters:
-
| honor | if true , privacy setting is honored. If false , the privacy setting is ignored. |
void WidgetNotificationSink::setNotificationsClickable |
( |
bool |
clickable |
) |
|
Sets if notifications are clickable
- Parameters:
-
| clickable | true if notifications are clickable. false if notifications are not clickable |
void WidgetNotificationSink::updateActions |
( |
MBanner * |
infoBanner, |
|
|
const NotificationParameters & |
parameters | |
|
) |
| | [protected] |
Removes old actions from the given info banner and adds the action specified in the notification (if any)
- Parameters:
-
void WidgetNotificationSink::updateImage |
( |
MBanner * |
infoBanner, |
|
|
const NotificationParameters & |
parameters | |
|
) |
| | [protected] |
Updates image for the given info banner Uses primarily imageId parameter, but if not available, then uses iconId parameter. imageId and iconId parameters can be absolute paths to image or logical image id's.
- Parameters:
-
void WidgetNotificationSink::updateTitles |
( |
MBanner * |
infoBanner |
) |
[protected] |
Updates the titles in a banner based on the current privacy mode.
- Parameters:
-
| infoBanner | the MBanner to update |
Member Data Documentation
MBanner property to store the generic text.
MBanner property to store the group ID into.
MBanner property to store the notification ID into.
MBanner property to store the subtitle text.
MBanner property to store the title text.
MBanner property to store the user removability into.
The documentation for this class was generated from the following files: