LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopLevelWindowManager.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2008-2012 Hewlett-Packard Development Company, L.P.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * LICENSE@@@ */
18 
19 
20 
21 
22 #ifndef TOPLEVELWINDOWMANAGER_H
23 #define TOPLEVELWINDOWMANAGER_H
24 
25 #include "Common.h"
26 
27 #include "WindowManagerBase.h"
28 #include "Timer.h"
29 #include <QPropertyAnimation>
30 
31 
32 class Window;
33 class LockWindow;
34 
36 {
37  Q_OBJECT
38 
39 public:
40 
41  TopLevelWindowManager(uint32_t maxWidth, uint32_t maxHeight);
42  virtual ~TopLevelWindowManager();
43 
44  virtual void init();
45 
46  virtual void addWindow(Window* win);
47  virtual void removeWindow(Window* win);
48 
49  virtual bool handleEvent(QEvent* event);
50 
51  bool okToResize();
52  void resize(int width, int height);
53  void delayDockModeLocking();
54  void performDelayedLock();
55 
56  virtual bool handleNavigationEvent(QKeyEvent* keyEvent, bool& propogate);
57 
58 Q_SIGNALS:
59 
60  void signalScreenLockStatusChanged(bool locked);
61 
62 private Q_SLOTS:
63 
64  void slotEnterBrickMode(bool mediaSyncMode);
65  void slotExitBrickMode();
66  void slotBrickSurfAnimationFinished();
67 
68  void slotScreenLocked(int state);
69 
70 private:
71 
72  void lockScreen();
73  void unlockScreen();
74 
75  void createBrickModeWindow();
76 
77  void msmEntryComplete();
78 
79  Window* m_brickWindow;
80  QPixmap* m_brickSurf;
81  QPropertyAnimation m_brickSurfAnimation;
82  bool m_suspendedWebkitProcess;
83  bool m_inBrickMode;
84 
85  LockWindow* m_lockedWindow;
86 };
87 
88 
89 #endif /* TOPLEVELWINDOWMANAGER_H */