![]() |
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 STATUSINDICATORMENUDROPDOWNVIEW_H_ 00021 #define STATUSINDICATORMENUDROPDOWNVIEW_H_ 00022 00023 #include <MSceneWindow> 00024 #include <MStylableWidget> 00025 #include <MOverlay> 00026 #include <mscenewindowview.h> 00027 #include "statusindicatormenustyle.h" 00028 00029 class QGraphicsSceneMouseEvent; 00030 class QGraphicsLinearLayout; 00031 class MPannableViewport; 00032 class NotificationArea; 00033 class MPannableViewport; 00034 class MApplicationExtensionArea; 00035 class StatusIndicatorMenuWindow; 00036 class StatusIndicatorMenu; 00037 00042 class EventEaterWidget : public QGraphicsWidget 00043 { 00044 public: 00046 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); 00048 }; 00049 00056 class PannedWidgetController : public MStylableWidget 00057 { 00058 Q_OBJECT 00059 public: 00065 PannedWidgetController(QGraphicsItem *parent = NULL); 00066 00072 const QGraphicsWidget *bottommostWidget() const; 00073 00080 void setBottommostWidget(const QGraphicsWidget *widget); 00081 00083 virtual void setGeometry(const QRectF &rect); 00084 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); 00085 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); 00087 00088 signals: 00092 void positionOrSizeChanged(); 00093 00097 void pressedOutSideContents(); 00098 00099 private: 00101 const QGraphicsWidget *bottommostWidget_; 00102 }; 00103 00104 00105 00106 00107 class StatusIndicatorMenuDropDownView : public MSceneWindowView 00108 { 00109 Q_OBJECT 00110 M_VIEW(MSceneWindowModel, StatusIndicatorMenuStyle) 00111 00112 public: 00118 StatusIndicatorMenuDropDownView(StatusIndicatorMenu *controller); 00119 00123 virtual ~StatusIndicatorMenuDropDownView(); 00124 00126 static const int VIEW_INITIALIZATION_DELAY; 00127 00128 protected: 00130 virtual void applyStyle(); 00132 00133 private slots: 00135 void ensureIsViewable(); 00136 00138 void setPannabilityAndLayout(); 00139 00141 void resetViewport(); 00142 00143 private: 00144 00146 StatusIndicatorMenu *controller; 00147 00149 MApplicationExtensionArea *settingsPluginsExtensionArea; 00150 00152 MApplicationExtensionArea *statusIndicatorExtensionArea; 00153 00155 MApplicationExtensionArea* createVerticalExtensionArea(); 00156 00158 MPannableViewport *pannableViewport; 00159 00161 MOverlay *closeButtonOverlay; 00162 00164 QGraphicsWidget *topRowWidget; 00165 00167 QGraphicsWidget *createTopRow(); 00168 00170 MPannableViewport *createPannableArea(); 00171 00173 QGraphicsWidget *createCloseButtonRow(); 00174 00176 MOverlay *createCloseButtonOverlay(); 00177 00179 MWidgetController *backgroundWidget; 00180 00181 00182 #ifdef UNIT_TEST 00183 friend class Ut_StatusIndicatorMenuDropDownView; 00184 #endif 00185 }; 00186 00187 #endif /* STATUSINDICATORMENUDROPDOWNVIEW_H_ */
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |