![]() |
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 STATUSAREARENDERER_H_ 00021 #define STATUSAREARENDERER_H_ 00022 00023 #include <MNamespace> 00024 #include <QTimer> 00025 #include <MOnDisplayChangeEvent> 00026 #include "statusarea.h" 00027 #include "xeventlistener.h" 00028 00029 #ifdef HAVE_QMSYSTEM 00030 #include "qmdisplaystate.h" 00031 #endif 00032 00033 class QGraphicsScene; 00034 class StatusArea; 00035 class QMeeGoLivePixmap; 00036 00040 class StatusAreaRenderer : public QObject, XEventListenerFilterInterface 00041 { 00042 Q_OBJECT 00043 00044 public: 00050 StatusAreaRenderer(QObject *parent = NULL); 00051 00055 virtual ~StatusAreaRenderer(); 00056 00061 uint sharedPixmapHandle(); 00062 00066 bool xEventFilter(const XEvent &event); 00067 00068 private slots: 00069 00073 virtual void accumulateSceneChanges(const QList<QRectF> ®ion); 00074 00078 void renderAccumulatedRegion(); 00079 00080 #ifdef HAVE_QMSYSTEM 00081 00085 void setSceneRender(MeeGo::QmDisplayState::DisplayState state); 00086 #endif 00087 00088 private: 00090 void wmWindowUnavailable(); 00091 00093 void setupStatusBarVisibleListener(); 00094 00096 bool getStatusBarVisibleProperty(); 00097 00099 void createStatusAreaPropertyWindow(); 00100 00102 void setStatusAreaPropertyWindowIdToRootWindowProperty(); 00103 00105 void setSharedPixmapHandleToWindowProperty(); 00106 00108 QGraphicsScene *scene; 00109 00111 StatusArea *statusArea; 00112 00114 QPixmap statusAreaPixmap; 00116 QPixmap backPixmap; 00118 QMeeGoLivePixmap* statusAreaLivePixmap; 00119 00121 bool createSharedPixmapHandle(); 00122 00124 bool createBackPixmap(); 00125 00127 void setSizeFromStyle(); 00128 00130 Window statusAreaPropertyWindow; 00132 Window windowManagerWindow; 00133 00135 uint statusAreaHeight; 00136 uint statusAreaWidth; 00137 00139 bool statusBarVisible; 00140 00141 #ifdef HAVE_QMSYSTEM 00142 00143 MeeGo::QmDisplayState* displayState; 00144 #endif 00145 00147 bool renderScene; 00148 00150 QTimer accumulationTimer; 00152 QRectF accumulatedRegion; 00153 00155 Atom statusBarVisibleAtom; 00157 Atom windowManagerWindowAtom; 00158 00160 long previousRootWindowEventMask; 00161 00162 #ifdef UNIT_TEST 00163 friend class Ut_StatusAreaRenderer; 00164 #endif 00165 00166 }; 00167 00168 #endif /* STATUSAREARENDERER_H_ */
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |