LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DashboardWindowManagerStates.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2010-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 DASHBOARDWINDOWMANAGERSTATES_H
23 #define DASHBOARDWINDOWMANAGERSTATES_H
24 
25 #include "Common.h"
26 
27 #include <QSignalTransition>
28 #include <QState>
29 
31 class SystemUiController;
32 
33 class DWMStateBase : public QState
34 {
35  Q_OBJECT
36 
37 public:
38 
40  virtual ~DWMStateBase() {}
41 
42  virtual void dashboardContentAdded() {}
43  virtual void dashboardContentRemoved() {}
45  virtual void negativeSpaceAnimationFinished();
46  virtual bool allowsSoftClose() const { return true; }
47  virtual void handleUiResizeEvent() {}
48 
49 Q_SIGNALS:
50 
52 
53 protected:
54 
55  virtual void onEntry(QEvent* e);
56 
58 };
59 
60 // --------------------------------------------------------------------
61 
63 {
64 public:
65 
67  virtual ~DWMStateClosed();
68 
69  virtual void dashboardContentAdded();
70  virtual void dashboardContentRemoved();
71 
72 protected:
73 
74  virtual void onEntry(QEvent* e);
75 
76 private:
77 
78  void adjustNegativeSpace();
79 };
80 
81 // --------------------------------------------------------------------
82 
84 {
85 public:
86 
88  virtual ~DWMStateAlertOpen();
89 
90  virtual bool allowsSoftClose() const { return false; }
91 
92 protected:
93 
94  virtual void onEntry(QEvent* e);
95  virtual void onExit(QEvent* e);
96 };
97 
98 // --------------------------------------------------------------------
99 
101 {
102 public:
103 
105  virtual ~DWMStateOpen();
106 
107  virtual void dashboardViewportHeightChanged();
108  virtual void handleUiResizeEvent();
109 
110 protected:
111 
112  virtual void onEntry(QEvent* e);
113  virtual void onExit(QEvent* e);
114 };
115 
116 // --------------------------------------------------------------------
117 
119 {
120 public:
121 
123  QState* target, QObject* sender,
124  const char* signal);
125 
126 
127 protected:
128 
129  virtual bool eventTest(QEvent *e);
130 
131 private:
132 
134 };
135 
136 #endif /* DASHBOARDWINDOWMANAGERSTATES_H */