|
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 LCVIEW_H |
|
18 #define LCVIEW_H |
|
19 |
|
20 #include <hbview.h> |
|
21 |
|
22 //temp |
|
23 #define LC_UNMUTE_TEXT "Unmute" |
|
24 #define LC_MUTE_TEXT "Mute" |
|
25 #define LC_HANDSET_TEXT "Handset" |
|
26 #define LC_SPEAKER_TEXT "Speaker" |
|
27 |
|
28 class LcUiEngine; |
|
29 class LcUiComponentRepository; |
|
30 class HbLabel; |
|
31 class HbMessageBox; |
|
32 class HbAction; |
|
33 class HbPushButton; |
|
34 class HbZoomSliderPopup; |
|
35 class HbTransparentWindow; |
|
36 class HbMenu; |
|
37 class LcVideoWidget; |
|
38 class LcEffectHandler; |
|
39 class Dialpad; |
|
40 |
|
41 class LcView : public HbView |
|
42 { |
|
43 Q_OBJECT |
|
44 friend class UT_LcView; |
|
45 friend class UT_LcUiComponentRepository; |
|
46 |
|
47 public: |
|
48 |
|
49 explicit LcView(LcUiEngine& engine, LcUiComponentRepository& repository); |
|
50 ~LcView(); |
|
51 |
|
52 public: |
|
53 |
|
54 void init(); |
|
55 void activated(); |
|
56 void deactivated(); |
|
57 void showControl(); |
|
58 void hideControl(); |
|
59 QString currentLayout(); |
|
60 void deActivateFullScreen(); |
|
61 void activatePortrait(); |
|
62 void updateUiElements(); |
|
63 |
|
64 public slots: |
|
65 |
|
66 void endVideoSession(); |
|
67 void disableCamera(); |
|
68 void mute(); |
|
69 void changeCamera(); |
|
70 void switchToVoiceCall(); |
|
71 void speaker(); |
|
72 void showZoom(); |
|
73 void activateFullScreen(); |
|
74 void updateVideoRects(); |
|
75 void swap(); |
|
76 void shareImage(); |
|
77 void updateSwapLayout(); |
|
78 void menuAboutToShow(); |
|
79 void menuAboutToHide(); |
|
80 void back(); |
|
81 //temp |
|
82 void notSupported(); |
|
83 void changeOrientation_Temporary(); |
|
84 |
|
85 |
|
86 private slots: |
|
87 |
|
88 void setMuteActionToUnmute(); |
|
89 void setMuteActionToMute(); |
|
90 void setCameraActionToMain(); |
|
91 void setCameraActionToSecondary(); |
|
92 void setSpeakerActionToHandset(); |
|
93 void setSpeakerActionToSpeaker(); |
|
94 void setCameraActionToDisable(); |
|
95 void setCameraActionToEnable(); |
|
96 void disableControls(); |
|
97 void enableControls(); |
|
98 void landscapeTimerTimeout(); |
|
99 |
|
100 protected: // From HbView |
|
101 |
|
102 void gestureEvent(QGestureEvent *event); |
|
103 |
|
104 protected slots: |
|
105 void openDialpad(); |
|
106 virtual void dialpadOpened(); |
|
107 virtual void dialpadClosed(); |
|
108 virtual void dialpadEditorTextChanged(); |
|
109 |
|
110 protected: |
|
111 void setDialpadPosition(); |
|
112 void enableDialpadCallButton( bool enable ); |
|
113 |
|
114 private: |
|
115 void createNotSupportedNote(); |
|
116 void createContextMenu(); |
|
117 bool isLandscapeOrientation(); |
|
118 QRectF translateRectForOrientation(const QRectF& origRect); |
|
119 QPointF translatePointForOrientation(const QPointF& origPoint); |
|
120 void setVisibility( QGraphicsItem* item, bool visible ); |
|
121 void resetLandscapeTimer(); |
|
122 void addOptionsMenuActions(); |
|
123 void gestureLongPress( QPointF coords ); |
|
124 void gestureShortPress(); |
|
125 |
|
126 private://not owned |
|
127 |
|
128 LcUiEngine& mEngine; |
|
129 LcUiComponentRepository& mRepository; |
|
130 HbLabel* mRecipient; |
|
131 HbLabel* mDuration; |
|
132 HbLabel* mContactIcon; |
|
133 HbLabel* mBrandIcon; |
|
134 LcVideoWidget* mSharedVideoWidget; |
|
135 LcVideoWidget* mReceivedVideoWidget; |
|
136 HbAction* mChangeCameraAction; |
|
137 HbAction* mMuteAction; |
|
138 HbAction* mSpeakerAction; |
|
139 HbAction* mDisableCameraAction; |
|
140 HbAction* mDisableCameraMenuAction; |
|
141 HbMessageBox* mNotSupportedNote; |
|
142 HbZoomSliderPopup* mZoomSlider; |
|
143 HbPushButton* mEndCallButton; |
|
144 |
|
145 LcVideoWidget* mReceivedVideoEffectOverlay; |
|
146 LcVideoWidget* mSharedVideoEffectOverlay; |
|
147 LcEffectHandler* mEffectHandler; |
|
148 |
|
149 private: |
|
150 |
|
151 HbMenu* mItemContextMenu; |
|
152 QTimer* mLandscapeTimer; |
|
153 bool mIsOptionMenuOpen; |
|
154 HbAction* mSoftKeyBackAction; |
|
155 Dialpad* mDialpad; // Not owned |
|
156 }; |
|
157 |
|
158 |
|
159 #endif // LCVIEW_H |