35
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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: Mini dialer feature
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#include <cvtlogger.h>
|
|
20 |
#include <aknlayoutscalable_apps.cdl.h>
|
|
21 |
#include <aknlayoutscalable_avkon.cdl.h>
|
|
22 |
#include <layoutmetadata.cdl.h>
|
|
23 |
|
|
24 |
#include "cvtuidialervideocontrol.h"
|
|
25 |
|
|
26 |
// Portrait variety constant
|
|
27 |
const static TInt KVarietyPortrait = 0;
|
|
28 |
|
|
29 |
// Landscape variety constant
|
|
30 |
const static TInt KVarietyLandscape = 1;
|
|
31 |
|
|
32 |
// Implementation of CVtUiDialerVideoControl
|
|
33 |
|
|
34 |
// ---------------------------------------------------------------------------
|
|
35 |
// CVtUiDialerVideoControl::NewL
|
|
36 |
// ---------------------------------------------------------------------------
|
|
37 |
//
|
|
38 |
CVtUiDialerVideoControl* CVtUiDialerVideoControl::NewL(
|
|
39 |
CVtUiBitmapManager& aBitmapManager )
|
|
40 |
{
|
|
41 |
__VTPRINTENTER( "DialCtrl.NewL" )
|
|
42 |
CVtUiDialerVideoControl* self =
|
|
43 |
new ( ELeave ) CVtUiDialerVideoControl( aBitmapManager );
|
|
44 |
CleanupStack::PushL( self );
|
|
45 |
self->ConstructL();
|
|
46 |
CleanupStack::Pop(); // self
|
|
47 |
__VTPRINTEXIT( "DialCtrl.NewL" )
|
|
48 |
return self;
|
|
49 |
}
|
|
50 |
|
|
51 |
// ---------------------------------------------------------------------------
|
|
52 |
// CVtUiDialerVideoControl::~CVtUiDialerVideoControl
|
|
53 |
// ---------------------------------------------------------------------------
|
|
54 |
//
|
|
55 |
CVtUiDialerVideoControl::~CVtUiDialerVideoControl()
|
|
56 |
{
|
|
57 |
__VTPRINTENTER( "DialCtrl.~" )
|
|
58 |
__VTPRINTEXIT( "DialCtrl.~" )
|
|
59 |
}
|
|
60 |
|
|
61 |
// ---------------------------------------------------------------------------
|
|
62 |
// CVtUiDialerVideoControl::CVtUiDialerVideoControl
|
|
63 |
// ---------------------------------------------------------------------------
|
|
64 |
//
|
|
65 |
CVtUiDialerVideoControl::CVtUiDialerVideoControl(
|
|
66 |
CVtUiBitmapManager& aBitmapManager ) :
|
|
67 |
CVtUiVideoControlBase( aBitmapManager )
|
|
68 |
{
|
|
69 |
__VTPRINTENTER( "DialCtrl.ctor" )
|
|
70 |
// Disable blind icon drawing
|
|
71 |
SetRenderingHint( ENoBlindIcon );
|
|
72 |
__VTPRINTEXIT( "DialCtrl.ctor" )
|
|
73 |
}
|
|
74 |
|
|
75 |
// ---------------------------------------------------------------------------
|
|
76 |
// CVtUiDialerVideoControl::ConstructL
|
|
77 |
// ---------------------------------------------------------------------------
|
|
78 |
//
|
|
79 |
void CVtUiDialerVideoControl::ConstructL()
|
|
80 |
{
|
|
81 |
__VTPRINTENTER( "DialCtrl.ConstructL" )
|
|
82 |
BaseConstructL();
|
|
83 |
__VTPRINTEXIT( "DialCtrl.ConstructL" )
|
|
84 |
}
|
|
85 |
|
|
86 |
// -----------------------------------------------------------------------------
|
|
87 |
// CVtUiDialerVideoControl::WaitingTextLayout
|
|
88 |
// -----------------------------------------------------------------------------
|
|
89 |
//
|
|
90 |
TAknTextLineLayout CVtUiDialerVideoControl::WaitingTextLayout( TInt aLine )
|
|
91 |
{
|
|
92 |
__VTPRINTENTER( "DialCtrl.WaitingTextLayout" )
|
|
93 |
|
|
94 |
TInt variety( Layout_Meta_Data::IsLandscapeOrientation() ?
|
|
95 |
KVarietyLandscape : KVarietyPortrait );
|
|
96 |
|
|
97 |
TAknWindowComponentLayout l2(
|
|
98 |
AknLayoutScalable_Apps::main_video_tele_dialer_pane( variety ) );
|
|
99 |
|
|
100 |
TAknTextComponentLayout l3;
|
|
101 |
|
|
102 |
#if 0
|
|
103 |
if ( variety == KVarietyPortrait )
|
|
104 |
{
|
|
105 |
if ( !aLine )
|
|
106 |
{
|
|
107 |
l3 = AknLayoutScalable_Apps::main_video_tele_dialer_pane_t1( 0 );
|
|
108 |
}
|
|
109 |
else
|
|
110 |
{
|
|
111 |
l3 = AknLayoutScalable_Apps::main_video_tele_dialer_pane_t2( 0 );
|
|
112 |
}
|
|
113 |
}
|
|
114 |
else
|
|
115 |
{
|
|
116 |
if ( !aLine )
|
|
117 |
{
|
|
118 |
l3 = AknLayoutScalable_Apps::call_video_pane_t1();
|
|
119 |
}
|
|
120 |
else
|
|
121 |
{
|
|
122 |
l3 = AknLayoutScalable_Apps::call_video_pane_t2();
|
|
123 |
}
|
|
124 |
}
|
|
125 |
#endif
|
|
126 |
|
|
127 |
if ( !aLine )
|
|
128 |
{
|
|
129 |
l3 = AknLayoutScalable_Apps::main_video_tele_dialer_pane_t1( 0 );
|
|
130 |
}
|
|
131 |
else
|
|
132 |
{
|
|
133 |
l3 = AknLayoutScalable_Apps::main_video_tele_dialer_pane_t2( 0 );
|
|
134 |
}
|
|
135 |
|
|
136 |
__VTPRINTEXIT( "DialCtrl.WaitingTextLayout" )
|
|
137 |
return TAknWindowComponentLayout::ComposeText( l2, l3 ).LayoutLine();
|
|
138 |
}
|
|
139 |
|
|
140 |
// -----------------------------------------------------------------------------
|
|
141 |
// CVtUiMainControl::LayoutRemoteVideo
|
|
142 |
// -----------------------------------------------------------------------------
|
|
143 |
//
|
|
144 |
void CVtUiDialerVideoControl::LayoutRemoteVideo( )
|
|
145 |
{
|
|
146 |
__VTPRINTENTER( "DialCtrl.LayoutRemoteVideo" )
|
|
147 |
if ( NULL != iRemoteVideoControl && iRemoteVideoControl->IsVisible() )
|
|
148 |
{
|
|
149 |
TRect rectRemoteVideo(StreamClippingRect());
|
|
150 |
iRemoteVideoControl->SetExtent( PositionRelativeToScreen(),rectRemoteVideo.Size() );
|
|
151 |
}
|
|
152 |
__VTPRINTEXIT( "DialCtrl.LayoutRemoteVideo" )
|
|
153 |
}
|