--- a/vtuis/videotelui/src/CVtUiAppUi.cpp Fri Feb 19 22:53:04 2010 +0200
+++ b/vtuis/videotelui/src/CVtUiAppUi.cpp Fri Mar 12 15:43:03 2010 +0200
@@ -34,6 +34,7 @@
#include "VtUiPanic.h"
#include "CVtUiActivateBtHfDialog.h"
#include "CVtUiRemoteVideoControl.h"
+#include "CVtUiEndCallButtonPane.h"
#include <csxhelp/incl.hlp.hrh>
@@ -540,6 +541,12 @@
// Owned number entry activation control.
CVtUiNumberEntryActivationControl* iNumberEntryActivation;
+
+ // Owned button pane control
+ CVtUiEndCallButtonPane* iEndCallButtonPane;
+
+ // ETrue if iButtonPane has been added to stack.
+ TBool iButtonPaneInStack;
};
@@ -830,6 +837,8 @@
FeatureManager::InitializeLibL();
BaseConstructL( EAknEnableSkin | EAknEnableMSK );
+
+ iIsLandScapeOrientation = VtUiLayout::IsLandscapeOrientation();
iCba = Cba();
// Must be done before creating features
@@ -3206,6 +3215,20 @@
__VTPRINTEXIT( "VtUi.SetZoomFactorL" )
}
+// -----------------------------------------------------------------------------
+// CVtUiAppUi::CmdSimulateKeyEvent
+// -----------------------------------------------------------------------------
+//
+void CVtUiAppUi::CmdSimulateKeyEvent( TInt aScanCode )
+ {
+ TRawEvent lEventDown;
+ lEventDown.Set( TRawEvent::EKeyDown, aScanCode );
+ UserSvr::AddEvent( lEventDown );
+ User::After( 100000 );
+ TRawEvent lEventUp;
+ lEventUp.Set( TRawEvent::EKeyUp, aScanCode );
+ UserSvr::AddEvent( lEventUp );
+ }
// -----------------------------------------------------------------------------
// CVtUiAppUi::CmdUpdateVolumeL
@@ -3634,13 +3657,23 @@
break;
case EVtUiAppUiAnsweredQuerySetupStill:
- ActiveExecInitSetSourceL( MVtEngMedia::EMediaStillImage, aRequest );
+ {
+ if ( iIsLandScapeOrientation == VtUiLayout::IsLandscapeOrientation() )
+ {
+ ActiveExecInitSetSourceL( MVtEngMedia::EMediaStillImage, aRequest );
+ }
aNextState = EVtUiAppUiAnsweredQuerySetupStart;
+ }
break;
case EVtUiAppUiAnsweredQuerySetupNone:
- ActiveExecInitSetSourceL( MVtEngMedia::EMediaNone, aRequest );
+ {
+ if ( iIsLandScapeOrientation == VtUiLayout::IsLandscapeOrientation() )
+ {
+ ActiveExecInitSetSourceL( MVtEngMedia::EMediaNone, aRequest );
+ }
aNextState = EVtUiAppUiAnsweredQuerySetupStart;
+ }
break;
case EVtUiAppUiAnsweredQuerySetupStart:
@@ -3790,6 +3823,11 @@
ShowCameraInUseNoteL();
}
+ if ( iIsLandScapeOrientation != VtUiLayout::IsLandscapeOrientation() )
+ {
+ (void) HandleLayoutChanged();
+ }
+
if ( aState != EVtUiAppUiAnsweredQueryFinish )
{
ChangeApplicationFocus( ETrue );
@@ -4553,6 +4591,17 @@
}
// -----------------------------------------------------------------------------
+// CVtUiAppUi::EndCallButtonPane
+// -----------------------------------------------------------------------------
+//
+CVtUiEndCallButtonPane& CVtUiAppUi::EndCallButtonPane()
+ {
+ __VTPRINTENTER( "VtUi.EndCallButtonPane" )
+ __VTPRINTEXIT( "VtUi.EndCallButtonPane" )
+ return *iInstance->iEndCallButtonPane;
+ }
+
+// -----------------------------------------------------------------------------
// CVtUiAppUi::DoExit
// -----------------------------------------------------------------------------
//
@@ -6318,6 +6367,14 @@
iAppUi.AddToStackL( iContextControl );
iContextControlInStack = ETrue;
+ iEndCallButtonPane = CVtUiEndCallButtonPane::NewL( parent );
+
+ VtUiLayout::GetButtonPaneLayout( control );
+
+ AknLayoutUtils::LayoutControl( iEndCallButtonPane, parent, control );
+ iAppUi.AddToStackL( iEndCallButtonPane );
+ iButtonPaneInStack = ETrue;
+
iNaviPane =
CVtUiNaviPane::NewL(
*( iAppUi.NaviPaneL() ),
@@ -6342,6 +6399,10 @@
AknLayoutUtils::LayoutControl( iNumberEntryActivation, parent, control );
VtUiLayout::GetFirstWindowBackgroundLayout( control );
AknLayoutUtils::LayoutControl( iContextControl, parent, control );
+
+ VtUiLayout::GetButtonPaneLayout( control );
+ AknLayoutUtils::LayoutControl( iEndCallButtonPane, parent, control );
+
if(iContextControl)
iContextControl->LayoutRemoteVideo();
@@ -6413,12 +6474,17 @@
{
iAppUi.RemoveFromStack( iRemoteVideoControl );
}
+ if( iEndCallButtonPane && iButtonPaneInStack )
+ {
+ iAppUi.RemoveFromStack( iEndCallButtonPane );
+ }
delete iMainControl;
delete iContextControl;
delete iRemoteVideoControl;
delete iNumberEntryActivation;
delete iNaviPane;
delete iBitmapManager;
+ delete iEndCallButtonPane;
}
// Implementation of CVtUiAppUi::CEventObserver