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 mhome. 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 DESKTOPVIEW_H 00021 #define DESKTOPVIEW_H 00022 00023 #include <MWidgetView> 00024 #include "desktopmodel.h" 00025 #include "desktopstyle.h" 00026 #include "mdesktopbackgroundextensioninterface.h" 00027 #include "windowinfo.h" 00028 00029 class Desktop; 00030 class Switcher; 00031 class QuickLaunchBar; 00032 class LauncherDataStore; 00033 class Launcher; 00034 class NotificationArea; 00035 class QGraphicsLinearLayout; 00036 class MSceneWindow; 00037 class MPannableViewport; 00038 class MOverlay; 00039 class MApplicationExtensionArea; 00040 class MApplicationExtensionInterface; 00041 class MDesktopBackgroundExtensionInterface; 00042 class HomeScreenService; 00043 class ApplicationPackageMonitorListener; 00044 00049 class DesktopView : public MWidgetView, public MDesktopInterface 00050 { 00051 Q_OBJECT 00052 M_VIEW(DesktopModel, DesktopStyle) 00053 00054 public: 00060 DesktopView(Desktop *desktop); 00061 00065 virtual ~DesktopView(); 00066 00068 #ifdef BENCHMARKS_ON 00069 virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0); 00070 #endif 00071 virtual void drawBackground(QPainter *painter, const QStyleOptionGraphicsItem *option) const; 00072 virtual void update(); 00073 virtual M::OrientationAngle orientationAngle(); 00075 00076 private slots: 00078 void setSwitcherHasContent(const QList<WindowInfo> &windowList); 00079 00081 void toggleLauncher(); 00082 00086 void showLauncher(); 00087 00091 void hideLauncher(); 00092 00098 void addExtension(MApplicationExtensionInterface *extension); 00099 00105 void removeExtension(MApplicationExtensionInterface *extension); 00106 00113 void showLauncherAndFocusToButton(const QString &desktopFileEntry = QString()); 00114 00115 #ifdef BENCHMARKS_ON 00116 private slots: 00117 void startBenchmarking(); 00118 void stopBenchmarking(); 00119 void writeFps(); 00120 #endif 00121 00122 private: 00126 void setSceneWindowOrder(); 00127 00131 void setDefocused(); 00132 00138 LauncherDataStore *createLauncherDataStore(); 00139 00141 Switcher *switcher; 00142 00144 MSceneWindow *switcherWindow; 00145 00147 bool switcherHasContent; 00148 00150 LauncherDataStore *launcherDataStore; 00151 00153 ApplicationPackageMonitorListener *packageMonitorListener; 00154 00156 Launcher *launcher; 00157 00159 MSceneWindow *launcherWindow; 00160 00162 bool launcherVisible; 00163 00165 QuickLaunchBar *quickLaunchBar; 00166 00168 MOverlay *quickLaunchBarWindow; 00169 00171 MApplicationExtensionArea *backgroundExtensionArea; 00172 00174 QList<MDesktopBackgroundExtensionInterface*> backgroundExtensions; 00175 00176 #ifdef UNIT_TEST 00177 friend class Ut_DesktopView; 00178 #endif 00179 }; 00180 00181 #endif // DESKTOPVIEW_H
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |