![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of systemui. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef WIDGETNOTIFICATIONSINK_H 00021 #define WIDGETNOTIFICATIONSINK_H 00022 00023 #include "notificationsink.h" 00024 #include <MBanner> 00025 00026 class MGConfItem; 00027 00042 class WidgetNotificationSink : public NotificationSink 00043 { 00044 Q_OBJECT 00045 00046 public: 00050 WidgetNotificationSink(); 00051 00061 void setHonorPrivacySetting(bool honor); 00062 00067 void setNotificationsClickable(bool clickable); 00068 00070 static const char *NOTIFICATION_ID_PROPERTY; 00072 static const char *GROUP_ID_PROPERTY; 00074 static const char *USER_REMOVABLE_PROPERTY; 00076 static const char *TITLE_TEXT_PROPERTY; 00078 static const char *SUBTITLE_TEXT_PROPERTY; 00080 static const char *GENERIC_TEXT_PROPERTY; 00081 00082 signals: 00088 void privacySettingChanged(bool privacyEnabled); 00089 00090 protected: 00096 static bool determineUserRemovability(const NotificationParameters ¶meters); 00097 00104 MBanner *createInfoBanner(const Notification ¬ification); 00105 00113 MBanner *createInfoBanner(Notification::NotificationType type, uint groupId, const NotificationParameters ¶meters); 00114 00120 bool containsText(const Notification ¬ification); 00121 00127 void updateTitles(MBanner *infoBanner); 00128 00136 void updateActions(MBanner *infoBanner, const NotificationParameters ¶meters); 00137 00146 void updateImage(MBanner *infoBanner, const NotificationParameters ¶meters); 00147 00153 static QString infoBannerTitleText(const NotificationParameters ¶meters); 00154 00160 static QString infoBannerSubtitleText(const NotificationParameters ¶meters); 00161 00167 static QString infoBannerGenericText(const NotificationParameters ¶meters); 00168 00169 private slots: 00173 void infoBannerClicked(); 00174 00178 void emitPrivacySettingValue(); 00179 00180 private: 00182 MGConfItem *privacySetting; 00183 00185 bool clickableNotifications; 00186 00187 #ifdef UNIT_TEST 00188 friend class Ut_WidgetNotificationSink; 00189 #endif 00190 }; 00191 00192 #endif // WIDGETNOTIFICATIONSINK_H
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |