![]() |
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 NOTIFICATIONAREASINK_H_ 00021 #define NOTIFICATIONAREASINK_H_ 00022 00023 #include "widgetnotificationsink.h" 00024 00025 class MBanner; 00026 class NotificationManagerInterface; 00027 00031 class NotificationAreaSink : public WidgetNotificationSink 00032 { 00033 Q_OBJECT 00034 00035 public: 00039 NotificationAreaSink(); 00040 00044 virtual ~NotificationAreaSink(); 00045 00047 void updateCurrentNotifications(NotificationManagerInterface ¬ificationManagerInterface); 00048 00049 private slots: 00051 virtual void addGroup(uint groupId, const NotificationParameters ¶meters); 00052 virtual void removeGroup(uint groupId); 00053 virtual void addNotification(const Notification ¬ification); 00054 virtual void removeNotification(uint notificationId); 00056 00062 void applyPrivacySetting(bool privacyEnabled); 00063 00064 signals: 00070 void addNotification(MBanner ¬ification); 00071 00077 void removeNotification(MBanner ¬ification); 00078 00082 void bannerClicked(); 00083 00089 void notificationAddedToGroup(MBanner &banner); 00090 00091 private: 00093 void setupInfoBanner(MBanner *infoBanner, const NotificationParameters ¶meters); 00094 00096 void updateNotification(MBanner *infoBanner, const NotificationParameters ¶meters); 00097 00099 QHash<uint, MBanner *> notificationIdToMBanner; 00100 00102 QHash<uint, NotificationParameters> notificationGroupParameters; 00103 00105 QHash<uint, MBanner *> groupIdToMBanner; 00106 00108 QHash<uint, uint> notificationCountOfGroup; 00109 00111 QHash<uint, uint> notificationIdToGroupId; 00112 00114 void removeGroupBanner(uint groupId); 00115 00117 void increaseNotificationCountOfGroup(const Notification ¬ification); 00118 00125 MBanner* createGroupBanner(uint groupId, const NotificationParameters ¶meters); 00126 00128 void addNotificationToGroup(const Notification ¬ification); 00130 void addStandAloneNotification(const Notification ¬ification); 00132 void deleteGroupFromNotificationCountOfGroup(const uint groupId); 00134 uint decreaseNotificationCountOfGroup(uint groupId); 00136 void updatePrefixForNotificationGroupBannerTimestamp(MBanner *infoBanner, uint count); 00137 }; 00138 00139 #endif /* NOTIFICATIONAREASINK_H_ */
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |