LunaSysMgr
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
AnimationSettings.h
Go to the documentation of this file.
1
/* @@@LICENSE
2
*
3
* Copyright (c) 2009-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 ANIMATIONSETTINGS_H
23
#define ANIMATIONSETTINGS_H
24
25
#include "Common.h"
26
27
#include <glib.h>
28
#include <map>
29
#include <string>
30
31
#include "
AnimationEquations.h
"
32
33
class
AnimationSettings
34
{
35
public
:
36
37
static
AnimationSettings
*
instance
() {
38
39
if
(G_UNLIKELY(s_instance == 0))
40
new
AnimationSettings
;
41
42
return
s_instance;
43
}
44
45
bool
setValue
(
const
std::string& key,
int
value);
46
bool
getValue
(
const
std::string& key,
int
& value)
const
;
47
std::map<std::string, int>
getAllValues
()
const
;
48
49
AnimationEquation
easeInEquation
(
int
strength)
const
;
50
AnimationEquation
easeOutEquation
(
int
strength)
const
;
51
52
// Animation FPS ------------------------------------
53
54
int
normalFPS
;
55
int
slowFPS
;
56
57
// Card animations -----------------------------------
58
59
int
cardLaunchDuration
;
60
int
cardLaunchCurve
;
61
int
cardSlideDuration
;
62
int
cardSlideCurve
;
63
int
cardTrackGroupCurve
;
64
int
cardTrackGroupDuration
;
65
int
cardTrackCurve
;
66
int
cardTrackDuration
;
67
int
cardMaximizeDuration
;
68
int
cardMaximizeCurve
;
69
int
cardMinimizeDuration
;
70
int
cardMinimizeCurve
;
71
int
cardDeleteDuration
;
72
int
cardDeleteCurve
;
73
int
cardScootAwayOnLaunchDuration
;
74
int
cardScootAwayOnLaunchCurve
;
75
int
cardMoveNormalDuration
;
76
int
cardMoveNormalCurve
;
77
int
cardMoveOverviewDuration
;
78
int
cardMoveOverviewCurve
;
79
int
cardShuffleReorderDuration
;
80
int
cardShuffleReorderCurve
;
81
int
cardGroupReorderDuration
;
82
int
cardGroupReorderCurve
;
83
84
int
cardSwitchReachEndMaximizedDuration
;
85
int
cardSwitchReachEndMaximizedCurve
;
86
int
cardSwitchMaximizedDuration
;
87
int
cardSwitchMaximizedCurve
;
88
89
int
cardBeforeAddDelay
;
90
int
cardPrepareAddDuration
;
91
int
modalCardPrepareAddDuration
;
92
int
cardAddMaxDuration
;
93
int
modalCardAddMaxDuration
;
94
95
int
cardLoadingPulsePauseDuration
;
96
int
cardLoadingPulseDuration
;
97
int
cardLoadingPulseCurve
;
98
int
cardLoadingCrossFadeDuration
;
99
int
cardLoadingCrossFadeCurve
;
100
int
cardLoadingTimeBeforeShowingPulsing
;
101
102
int
cardTransitionDuration
;
103
int
cardTransitionCurve
;
104
105
int
cardGhostDuration
;
106
int
cardGhostCurve
;
107
108
int
cardDimmingDuration
;
109
int
cardDimmingCurve
;
110
111
// Positive/negative space animations -----------------
112
113
int
positiveSpaceChangeDuration
;
114
int
positiveSpaceChangeCurve
;
115
116
// Launcher/QuickLaunch -------------------------------
117
118
int
quickLaunchDuration
;
119
int
quickLaunchCurve
;
120
int
quickLaunchSlideToStacheDuration
;
121
int
quickLaunchSlideToStacheCurve
;
122
int
quickLaunchFadeDuration
;
123
int
quickLaunchFadeCurve
;
124
int
launcherDuration
;
125
int
launcherCurve
;
126
int
universalSearchCrossFadeDuration
;
127
int
universalSearchCrossFadeCurve
;
128
129
int
launcherNormalModeArrowSlideDuration
;
130
int
launcherNormalModeArrowSlideCurve
;
131
132
int
launcherNormalModeScrollDuration
;
133
int
launcherNormalModeScrollCurve
;
134
135
int
launcherNormalModeSnapbackDuration
;
136
int
launcherNormalModeSnapbackCurve
;
137
138
int
launcherTransitionNormalToReorderDuration
;
139
int
launcherTransitionNormalToReorderCurve
;
140
141
int
launcherTransitionReorderToNormalDuration
;
142
int
launcherTransitionReorderToNormalCurve
;
143
144
int
launcherTransitionReorderToMiniDuration
;
145
int
launcherTransitionReorderToMiniCurve
;
146
147
int
launcherTransitionMiniToReorderDuration
;
148
int
launcherTransitionMiniToReorderCurve
;
149
150
int
launcherTransitionToItemReorderDuration
;
151
int
launcherTransitionToItemReorderCurve
;
152
153
int
launcherMiniModeCardSlideUnderDuration
;
154
int
launcherMiniModeCardSlideUnderCurve
;
155
156
int
launcherMiniModeScrollDuration
;
157
int
launcherMiniModeScrollCurve
;
158
159
int
launcherAddCardSlideCardsDuration
;
160
int
launcherAddCardSlideCardsCurve
;
161
162
int
launcherAddCardDuration
;
163
int
launcherAddCardCurve
;
164
165
int
launcherDeleteCardSlideCardsDuration
;
166
int
launcherDeleteCardSlideCardsCurve
;
167
168
int
launcherItemReorderVScrollDuration
;
169
int
launcherItemReorderVScrollCurve
;
170
171
int
launcherItemFadeDuration
;
172
int
launcherItemFadeCurve
;
173
174
int
launcherCardInnerVScrollDuration
;
175
176
int
launcherCardReorderScrollPauseDuration
;
177
178
// Reticle animations ---------------------------------
179
180
int
reticleDuration
;
181
int
reticleCurve
;
182
183
// MSM animations -------------------------------------
184
185
int
brickDuration
;
186
int
brickCurve
;
187
int
progressPulseDuration
;
188
int
progressPulseCurve
;
189
int
progressFinishDuration
;
190
int
progressFinishCurve
;
191
192
// Lock Screen animations -----------------------------
193
194
int
lockWindowFadeDuration
;
195
int
lockWindowFadeCurve
;
196
int
lockPinDuration
;
197
int
lockPinCurve
;
198
int
lockFadeDuration
;
199
int
lockFadeCurve
;
200
201
// Dashboard animations -------------------------------
202
203
int
dashboardSnapDuration
;
204
int
dashboardSnapCurve
;
205
int
dashboardDeleteDuration
;
206
int
dashboardDeleteCurve
;
207
208
// Status Bar animations -----------------------------------
209
210
int
statusBarFadeDuration
;
211
int
statusBarFadeCurve
;
212
int
statusBarColorChangeDuration
;
213
int
statusBarColorChangeCurve
;
214
int
statusBarTitleChangeDuration
;
215
int
statusBarTitleChangeCurve
;
216
int
statusBarTabFadeDuration
;
217
int
statusBarTabFadeCurve
;
218
int
statusBarArrowSlideDuration
;
219
int
statusBarArrowSlideCurve
;
220
int
statusBarItemSlideDuration
;
221
int
statusBarItemSlideCurve
;
222
int
statusBarMenuFadeDuration
;
223
int
statusBarMenuFadeCurve
;
224
225
226
// DockMode animations -------------------------------
227
int
dockFadeScreenAnimationDuration
;
228
int
dockFadeDockAnimationDuration
;
229
int
dockFadeDockStartDelay
;
230
int
dockFadeAnimationCurve
;
231
int
dockRotationTransitionDuration
;
232
int
dockCardSlideDuration
;
233
int
dockCardSlideCurve
;
234
int
dockMenuScrollDuration
;
235
int
dockMenuScrollCurve
;
236
237
// Rotation animations -------------------------------
238
int
rotationAnimationDuration
;
239
private
:
240
241
static
AnimationSettings
* s_instance;
242
std::map<std::string, int*> m_values;
243
244
private
:
245
246
AnimationSettings
();
247
~
AnimationSettings
();
248
249
void
readSettings(
const
char
* filePath);
250
};
251
252
// -------------------------------------------------------------------------------------------------------------
253
254
#define AS(x) (AnimationSettings::instance()->x)
255
256
#define AS_CURVE(x) (static_cast<QEasingCurve::Type>(AnimationSettings::instance()->x))
257
258
#define AS_EASEOUT(x) (AnimationSettings::instance()->easeOutEquation(x))
259
260
#define AS_EASEIN(x) (AnimationSettings::instance()->easeInEquation(x))
261
262
#endif
/* ANIMATIONSETTINGS_H */
luna-sysmgr
Src
base
settings
AnimationSettings.h
Generated on Fri Jun 21 2013 00:53:53 for LunaSysMgr by
1.8.3.1