|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef LCEFFECTHANDLER_H |
|
18 #define LCEFFECTHANDLER_H |
|
19 |
|
20 #include <QObject> |
|
21 #include <hbeffect.h> |
|
22 |
|
23 class HbWidget; |
|
24 class LcUiEngine; |
|
25 |
|
26 /** |
|
27 * |
|
28 */ |
|
29 class LcEffectHandler : public QObject |
|
30 { |
|
31 Q_OBJECT |
|
32 friend class UT_LcEffectHandler; |
|
33 friend class UT_LcView; |
|
34 |
|
35 public: |
|
36 |
|
37 enum DissapperEffect{ |
|
38 NormalDissappear, |
|
39 DissappearToFlip |
|
40 }; |
|
41 |
|
42 explicit LcEffectHandler(LcUiEngine& engine, |
|
43 HbWidget* sharedVideo, |
|
44 HbWidget* sharedVideoOverlay, |
|
45 HbWidget* receivedVideo, |
|
46 HbWidget* receivedVideoOverlay); |
|
47 ~LcEffectHandler(); |
|
48 |
|
49 void setVisibility(HbWidget* widget, bool visible); |
|
50 |
|
51 void setDissappearEffect( LcEffectHandler::DissapperEffect aEffectType ); |
|
52 |
|
53 bool isSwapInProgress(); |
|
54 |
|
55 void startEffects(); |
|
56 |
|
57 signals: |
|
58 void swapCompleted(); |
|
59 void loadSwapLayout(); |
|
60 |
|
61 public slots: |
|
62 |
|
63 void showSendWindow(); |
|
64 void showReceiveWindow(); |
|
65 void hideSendWindow(); |
|
66 void hideReceiveWindow(); |
|
67 void windowAppearComplete( HbEffect::EffectStatus status ); |
|
68 void windowDisappearComplete( HbEffect::EffectStatus status ); |
|
69 void windowDisappearToFlipComplete( HbEffect::EffectStatus status ); |
|
70 void windowFlipComplete( HbEffect::EffectStatus status ); |
|
71 void windowSwapSharedComplete( HbEffect::EffectStatus status ); |
|
72 void windowSwapReceivedComplete( HbEffect::EffectStatus status ); |
|
73 void swap(); |
|
74 |
|
75 private: |
|
76 void startEffect( HbWidget* widget, const char *effectId, const char *callBack = "" ); |
|
77 const char* selectSwapEffect( HbWidget* widget ); |
|
78 bool isSharedVideoAtTop() const; |
|
79 bool videosSideBySide() const; |
|
80 void handleSwapCompletion(); |
|
81 void initializeSwap(); |
|
82 |
|
83 private: //data |
|
84 |
|
85 LcUiEngine& mEngine; |
|
86 HbWidget* mSharedVideo; |
|
87 HbWidget* mSharedVideoOverlay; |
|
88 HbWidget* mReceivedVideo; |
|
89 HbWidget* mReceivedVideoOverlay; |
|
90 |
|
91 QString mEffectCallBack; |
|
92 bool mSwapSharedCompleted; |
|
93 bool mSwapReceivedCompleted; |
|
94 bool mSwapInProgress; |
|
95 }; |
|
96 |
|
97 #endif // LCEFFECTHANDLER_H |