![]() |
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 MCOMPOSITORNOTIFICATIONSINK_H_ 00021 #define MCOMPOSITORNOTIFICATIONSINK_H_ 00022 00023 #include <QHash> 00024 #include <QSet> 00025 #include <QTimer> 00026 #include "widgetnotificationsink.h" 00027 #include <X11/X.h> 00028 00029 #ifdef HAVE_QMSYSTEM 00030 #include <qmdisplaystate.h> 00031 #endif 00032 00033 class MBanner; 00034 class MGConfItem; 00035 00042 class MCompositorNotificationSink : public WidgetNotificationSink 00043 { 00044 Q_OBJECT 00045 00046 public: 00050 MCompositorNotificationSink(); 00051 00055 virtual ~MCompositorNotificationSink(); 00056 00061 void setApplicationEventsDisabled(bool disabled); 00062 00063 signals: 00069 void notificationAdded(const Notification ¬ification); 00070 00071 public slots: 00077 void setTouchScreenLockActive(bool active); 00078 00079 private slots: 00081 virtual void addNotification(const Notification ¬ification); 00082 virtual void removeNotification(uint notificationId); 00084 00088 void disappearCurrentBanner(); 00089 00093 void addOldestBannerToWindow(); 00094 00098 void changeNotificationPreviewMode(); 00099 00103 void updateWindowMask(); 00104 00109 void updateWindowMask(MBanner* banner); 00110 00114 void clearWindowMask(); 00115 00120 void currentBannerDone(); 00121 00122 private: 00126 void createWindowIfNecessary(); 00127 00133 void updateNotification(const Notification ¬ification); 00134 00143 void updateImage(MBanner *infoBanner, const NotificationParameters ¶meters); 00144 00150 bool currentApplicationHasPreviewsDisabled(); 00151 00153 QSet<uint> notificationIds; 00154 00156 QHash<uint, MBanner *> idToBanner; 00157 00159 bool sinkDisabled; 00160 00162 bool allPreviewsDisabled; 00163 00165 MWindow* window; 00166 00168 MGConfItem* notificationPreviewMode; 00169 00171 QList<MBanner *> bannerQueue; 00172 00174 MBanner *currentBanner; 00175 00177 QTimer bannerTimer; 00178 00180 Atom currentAppWindowAtom; 00181 00183 Atom notificationPreviewsDisabledAtom; 00184 00186 bool touchScreenLockActive; 00187 00188 #ifdef HAVE_QMSYSTEM 00189 00190 MeeGo::QmDisplayState displayState; 00191 #endif 00192 00193 #ifdef UNIT_TEST 00194 friend class Ut_MCompositorNotificationSink; 00195 #endif 00196 }; 00197 00198 #endif /* MCOMPOSITORNOTIFICATIONSINK_H_ */
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |