camerauis/cameraapp/generic/src/CamContainerBase.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:30:54 +0100
branchRCL_3
changeset 54 bac7acad7cb3
child 57 2c87b2808fd7
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  Base class for all camera application containers*
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*/
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
// INCLUDE FILES
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
#include <eikmenub.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#include <aknview.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include <avkon.hrh>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include <AknsFrameBackgroundControlContext.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include <AknsDrawUtils.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include <AknUtils.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
// System includes for changing the orientation.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
#include <eikenv.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
#include <eikappui.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
#include <activepalette2ui.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
#include <cameraapp.rsg>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
#include <vgacamsettings.rsg>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
#include <aknlayoutscalable_apps.cdl.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
#include <layoutmetadata.cdl.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
#include <StringLoader.h>
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
#include "CamContainerBase.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
#include "CamAppController.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
#include "CamLogger.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
#include "CamUtility.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
#include "CamAppUi.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
#include "CamNaviCounterControl.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
#include "CamNaviProgressBarControl.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
#include "CamZoomPane.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
#include "camactivepalettehandler.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
#include "CameraUiConfigManager.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
#include "CamViewBase.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
#include "cambackupcontainer.h"
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
  static const TInt KCamBurstCounterLength = 2;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
  _LIT(KCamBurstCounterFormat, "%02d");
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
// ================= STATIC MEMBER VARIABLES ================
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
	
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
MActivePalette2UI* CCamContainerBase::iActivePalette = NULL;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
// ================= MEMBER FUNCTIONS =======================
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
// Destructor
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
CCamContainerBase::~CCamContainerBase()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
  PRINT( _L("Camera => ~CCamContainerBase") );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
  delete iBgContext;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
  iPrimaryZoomInKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
  iPrimaryZoomOutKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
  iSecondaryZoomInKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
  iSecondaryZoomOutKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
  iPrimaryCameraCaptureKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
  iSecondaryCameraCaptureKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
  iPrimaryCameraAFKeys.Close();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
  delete iProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    delete iBurstProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
  if(iBackupContainer)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
      delete iBackupContainer;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
      iBackupContainer = NULL;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
  PRINT( _L("Camera <= ~CCamContainerBase") );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
  }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
// CCamContainerBase::CCamContainerBase
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
// C++ constructor
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
CCamContainerBase::CCamContainerBase( CCamAppController& aController,
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
                                      CAknView&          aView       )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
  : iView( aView ), 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
    iController( aController )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
  }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
// CCamContainerBase::BaseConstructL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
// Symbian OS 2nd phase constructor
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
void CCamContainerBase::BaseConstructL( const TRect& aRect )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
  CreateWindowL();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
  Window().SetBackgroundColor( KRgbBlack );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
  SetRect( aRect );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
  EnableDragEvents(); 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
  CCamAppUiBase* appUi =  static_cast<CCamAppUiBase*>( iEikonEnv->EikAppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
  iCamOrientation = appUi->CamOrientation();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
  // set up the skin background context
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
  CreateBackgroundContextL();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
  iBackupContainer = CCamBackupContainer::NewL(iController,iView,*this);
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
  // zoom keys
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
  iPrimaryZoomInKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
  iPrimaryZoomOutKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
  iSecondaryZoomInKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
  iSecondaryZoomOutKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
  // capture keys
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
  iPrimaryCameraCaptureKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
  iSecondaryCameraCaptureKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
  // AF keys
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
  iPrimaryCameraAFKeys.Reset();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
  if ( iController.UiConfigManagerPtr() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
      // Reading the zoom keys for primary and secondary camera
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
      iController.UiConfigManagerPtr()->
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
          SupportedPrimaryCameraZoomInKeysL( iPrimaryZoomInKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
      iController.UiConfigManagerPtr()->
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
                SupportedPrimaryCameraZoomOutKeysL( iPrimaryZoomOutKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
      
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
      // secondary camera zoom-in/out keys
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
      iController.UiConfigManagerPtr()->
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
                SupportedSecondaryCameraZoomInKeysL( iSecondaryZoomInKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
      iController.UiConfigManagerPtr()->
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
                SupportedSecondaryCameraZoomOutKeysL( iSecondaryZoomOutKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
      
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
      // Reading the capture keys for primary and secondary camera
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
      iController.UiConfigManagerPtr()->
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
                SupportedPrimaryCameraCaptureKeyL( iPrimaryCameraCaptureKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
      
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
      iController.UiConfigManagerPtr()->
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
                      SupportedSecondaryCameraCaptureKeyL( iSecondaryCameraCaptureKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
      
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
      // Reading AF or half capture key press  Keys
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
      iController.UiConfigManagerPtr()->SupportedPrimaryCameraAutoFocusKeyL(
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
                                                       iPrimaryCameraAFKeys );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
  if ( iPrimaryZoomInKeys.Count() <= 0 || iPrimaryZoomOutKeys.Count() <= 0 ||
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
       iSecondaryZoomInKeys.Count() <= 0 || iSecondaryZoomOutKeys.Count() <= 0 ||
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
       iPrimaryCameraCaptureKeys.Count() <= 0 || iSecondaryCameraCaptureKeys.Count() <= 0 ||       
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
       iPrimaryCameraAFKeys.Count() <= 0
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
      )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
      // Leave here, if there are no configured items so that we dont panic 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
      //in any container classes derived from this base class
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
      User::Leave( KErrNotSupported );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
// CCamContainerBase::IsCaptureKeyL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
// Whether or not this key is considered to be a capture key
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
// in the current context
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
TBool CCamContainerBase::IsCaptureKeyL( const TKeyEvent& aKeyEvent,
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
                                       TEventCode aType ) 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
  PRINT1( _L( "Camera => CCamContainerBase::IsCaptureKey event type (%d)" ),  aType ); 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
  // Find out if this key is a capture key
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
  TBool isCaptureKey( EFalse) ;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
  // Repeat events are not classed as capture keys
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
  if ( aKeyEvent.iRepeats != 0 )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
    PRINT( _L( "IsCaptureKey returning false (repeat)" ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
    return isCaptureKey;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
  CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
  if ( appUi && appUi->AppInBackground( ETrue ) )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
      PRINT( _L("IsCaptureKey returning false (AppInBackground() = true") );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
      return isCaptureKey;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
  if ( ECamActiveCameraPrimary == iController.ActiveCamera() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
      isCaptureKey = IsPrimaryCameraCaptureKey( aKeyEvent );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
  else // secondary camera
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
      isCaptureKey = IsSecondaryCameraCaptureKey( aKeyEvent );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
      }  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
  // Each product defines which key/s are treated as capture keys.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
  // Different keys can be mapped for each active camera.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
  // Look for capture event or key up event (note that capture
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
  // event is on the EEventKey for navi-key select press)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
  if ( isCaptureKey )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
      if ( aType == EEventKeyDown || aType == EEventKey || aType == EEventKeyUp || aType == EEventKeyUp )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
        if ( isCaptureKey &&
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
             ( iController.UiConfigManagerPtr()->IsKeyLockWatcherSupported() && iController.IsKeyLockOn() ) )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
            isCaptureKey = !iController.IsKeyLockOn();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
      else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
        // key types doesnt match so dont consider as capture key press.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
        isCaptureKey = EFalse;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
        }  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
  PRINT1( _L( "IsCaptureKey returning %d" ), isCaptureKey );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
  return isCaptureKey;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
  }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
// CCamContainerBase::IsShutterKeyL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
// Whether or not this key is considered to be a shutter key
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
// in the current context
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
TBool CCamContainerBase::IsShutterKeyL( const TKeyEvent& aKeyEvent, TEventCode /* aType */ )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
    PRINT1( _L( "Camera => CCamContainerBase::IsShutterKeyL scancode (%d)" ),  aKeyEvent.iScanCode ); 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
    if ( iController.UiConfigManagerPtr()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
        && iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
#ifndef __WINS__
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
        if ( aKeyEvent.iScanCode == iPrimaryCameraAFKeys[0] )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
#else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
        if ( aKeyEvent.iScanCode == EProductKeyCaptureHalf )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   248
#endif 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   249
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   250
            return ETrue;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   251
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   252
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   253
    return EFalse;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   254
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   255
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   256
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   257
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   258
// CCamZoomPane::CheckForZoomKey
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   259
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   260
TBool CCamContainerBase::CheckForZoomKey( const TKeyEvent& aKeyEvent )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   261
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   262
    return CheckInZoomKeyArray( aKeyEvent );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   263
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   264
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   265
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   266
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   267
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   268
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   269
TBool CCamContainerBase::CheckInZoomKeyArray( const TKeyEvent& aKeyEvent )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   270
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   271
    TCamActiveCamera camera = iController.ActiveCamera();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   272
    TBool zoomKeyFound ( EFalse );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   273
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   274
    if ( camera == ECamActiveCameraPrimary )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   275
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   276
        zoomKeyFound = ( KErrNotFound != 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   277
                         iPrimaryZoomInKeys.Find( aKeyEvent.iScanCode ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   278
        if ( !zoomKeyFound )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   279
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   280
            // Its not zoom-in key, check if its zoom out key
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   281
            zoomKeyFound = ( KErrNotFound != 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   282
                             iPrimaryZoomOutKeys.Find( aKeyEvent.iScanCode ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   283
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   284
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   285
    else if ( camera == ECamActiveCameraSecondary )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   286
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   287
        zoomKeyFound = ( KErrNotFound != 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   288
                         iSecondaryZoomInKeys.Find( aKeyEvent.iScanCode ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   289
        if ( !zoomKeyFound )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   290
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   291
            // Its not zoom-in key, check if its zoom out key
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   292
            zoomKeyFound = ( KErrNotFound != 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   293
                             iSecondaryZoomOutKeys.Find( aKeyEvent.iScanCode ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   294
            }        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   295
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   296
    else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   297
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   298
        // when we reach here, it means we have no zoom keys set, we return back.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   299
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   300
    return zoomKeyFound;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   301
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   302
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   303
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   304
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   305
// CCamContainerBase::IsZoomKeyL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   306
// Whether or not this key is considered to be a shutter key
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   307
// in the current context
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   308
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   309
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   310
TBool CCamContainerBase::IsZoomKeyL( const TKeyEvent& aKeyEvent,
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   311
                                        TEventCode aType ) 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   312
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   313
    PRINT1( _L( "Camera => CCamContainerBase::IsZoomKeyL event type (%d)" ),  aType );  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   314
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   315
    CCamZoomPane* zoom = static_cast<CCamAppUiBase*>( iEikonEnv->EikAppUi() )->ZoomPane();    	
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   316
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   317
    // 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   318
    if( !ZoomAvailable() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   319
    	{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   320
    	return EFalse;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   321
    	}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   322
  	
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   323
  	PRINT( _L( "Camera => CCamContainerBase::IsZoomKeyL " ) );  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   324
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   325
    // It's a possible zoom key if it's an up OR down event, OR
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   326
    // if it's a key event AND we're currently zooming 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   327
    if ( aType == EEventKeyUp || aType == EEventKeyDown || aType == EEventUser ||
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   328
         ( aType == EEventKey && 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   329
           zoom &&
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   330
           zoom->IsCurrentlyZooming() ) )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   331
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   332
        PRINT( _L( "Camera => CCamContainerBase::IsZoomKeyL A" ) )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   333
        return CheckForZoomKey( aKeyEvent );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   334
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   335
	     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   336
	PRINT( _L( "Camera => CCamContainerBase::IsZoomKeyL no" ) )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   337
    return EFalse;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   338
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   339
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   340
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   341
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   342
// CCamContainerBase::ZoomAvailable()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   343
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   344
TBool CCamContainerBase::ZoomAvailable()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   345
	{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   346
	PRINT( _L("Camera => CCamContainerBase::ZoomAvailable"))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   347
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   348
	// Ignore any zoom keys that come when either capturing a burst or still
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   349
  if ( iController.SequenceCaptureInProgress() 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   350
    || ( ECamControllerImage == iController.CurrentMode()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   351
      && ECamCapturing       == iController.CurrentOperation() ) 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   352
    || ECamCompleting == iController.CurrentOperation()  )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   353
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   354
    PRINT( _L("Camera => CCamContainerBase::ZoomAvailable A false"))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   355
    return EFalse;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   356
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   357
	PRINT( _L("Camera => CCamContainerBase::ZoomAvailable yes"))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   358
	return ETrue;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   359
	}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   360
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   361
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   362
// Window
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   363
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   364
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   365
RWindow& 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   366
CCamContainerBase::Window() const
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   367
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   368
  return CCoeControl::Window();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   369
  }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   370
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   371
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   372
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   373
// CCamContainerBase::OfferKeyEventL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   374
// Handles this application view's command keys. Forwards other
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   375
// keys to child control(s).
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   376
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   377
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   378
TKeyResponse 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   379
CCamContainerBase::OfferKeyEventL( const TKeyEvent& aKeyEvent,
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   380
                                         TEventCode aType )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   381
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   382
  PRINT1( _L("Camera => CCamContainerBase::OfferKeyEventL scan code (%d)"), aKeyEvent.iScanCode )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   383
  // if the cancel softkey is pressed
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   384
  if ( aKeyEvent.iScanCode == EStdKeyDevice1 )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   385
    {        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   386
    iView.HandleCommandL( EAknSoftkeyCancel );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   387
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   388
  // or if the select (OK) key is pressed
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   389
  //
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   390
  // (Note: intentionally ignoring repeat key presses here - this is a
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   391
  // work-around as the framework is passing navi-key select repeats
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   392
  // which we have to ignore)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   393
  else if ( aType == EEventKey && 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   394
            aKeyEvent.iCode == EKeyOK && 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   395
            aKeyEvent.iRepeats == 0 )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   396
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   397
    iView.HandleCommandL( EAknSoftkeySelect );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   398
    return EKeyWasConsumed; // indicate key press was processed
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   399
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   400
    // stop video or sequence if get applications key press (short or long)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   401
    // in touch also send key stops
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   402
  else if( aKeyEvent.iCode == EKeyApplication ||
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   403
         ( iController.IsTouchScreenSupported() && 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   404
           aKeyEvent.iScanCode == EStdKeyYes ) ) 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   405
  	{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   406
    if ( ECamControllerVideo == iController.CurrentMode() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   407
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   408
      TCamCaptureOperation operation = iController.CurrentOperation();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   409
      if( ECamCapturing == operation
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   410
       || ECamPaused    == operation )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   411
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   412
        // Stop video 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   413
        iController.StopVideoRecording();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   414
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   415
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   416
    else if ( iController.SequenceCaptureInProgress() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   417
      {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   418
      // Stop sequence capture
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   419
      iController.StopSequenceCaptureL();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   420
      }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   421
    else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   422
    	{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   423
    	// empty statement to remove Lint error, MISRA required rule 60
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   424
    	}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   425
  	}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   426
  else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   427
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   428
    // empty statement to remove Lint error, MISRA required rule 60
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   429
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   430
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   431
  return EKeyWasNotConsumed;  // indicate key press was not processed
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   432
  }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   433
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   434
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   435
// CCamContainerBase::HandleForegroundEventL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   436
// Called to notify of change of app fore/background state
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   437
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   438
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   439
void CCamContainerBase::HandleForegroundEventL( TBool /*aForeground*/ )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   440
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   441
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   442
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   443
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   444
// CCamContainerBase::MopSupplyObject
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   445
// Gets an object whose type is encapsulated by the specified TTypeUid object
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   446
// Supplies the skin context to child controls using the MObjectProvider chain
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   447
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   448
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   449
TTypeUid::Ptr CCamContainerBase::MopSupplyObject( TTypeUid aId )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   450
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   451
    if ( aId.iUid == MAknsControlContext::ETypeId )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   452
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   453
        return MAknsControlContext::SupplyMopObject( aId, iBgContext );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   454
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   455
    return CCoeControl::MopSupplyObject( aId );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   456
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   457
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   458
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   459
// CCamContainerBase::HandleResourceChange
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   460
// Change Client Rect and redraw when resolution changes
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   461
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   462
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   463
void CCamContainerBase::HandleResourceChange( TInt aType )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   464
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   465
    PRINT( _L("Camera => CCamContainerBase::HandleResourceChange" ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   466
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   467
    CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->EikAppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   468
    if ( KEikDynamicLayoutVariantSwitch == aType )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   469
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   470
	    TCamOrientation orientation = appUi->CamOrientation();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   471
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   472
        if( iCamOrientation != orientation )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   473
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   474
            iCamOrientation = orientation;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   475
            if( orientation == ECamOrientationCamcorder || orientation == ECamOrientationCamcorderLeft )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   476
                {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   477
                PRINT( _L("Camera => CCamContainerBase::HandleResourceChange camcorder" ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   478
                SetRect( appUi->ApplicationRect() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   479
                }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   480
            else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   481
                {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   482
                PRINT( _L("Camera => CCamContainerBase::HandleResourceChange not camcorder" ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   483
                SetRect( appUi->ClientRect() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   484
                }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   485
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   486
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   487
            
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   488
    CCoeControl::HandleResourceChange( aType );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   489
    if ( iController.IsTouchScreenSupported() ) 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   490
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   491
        // Update toolbar because HandleResourceChange might reload the default version
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   492
        // Only update toolbaricons if in precaptureview.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   493
        if( appUi->CurrentViewState() != ECamViewStatePostCapture )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   494
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   495
            TRAP_IGNORE( static_cast<CCamViewBase&>( iView ).UpdateToolbarIconsL() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   496
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   497
        }  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   498
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   499
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   500
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   501
// virtual 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   502
void 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   503
CCamContainerBase::HandleAppEvent( const TCamAppEvent& /*aEvent*/ )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   504
  {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   505
  // No action
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   506
  }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   507
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   508
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   509
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   510
// CCamContainerBase::SetPreviousViewId
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   511
// Sets the ID of the previous view
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   512
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   513
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   514
void CCamContainerBase::SetPreviousViewId( TCamAppViewIds aId )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   515
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   516
    iPrevViewId = aId;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   517
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   518
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   519
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   520
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   521
// CCamContainerBase::SetupNaviPanesL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   522
// Set up navi-pane and progress bar if required
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   523
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   524
//    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   525
void CCamContainerBase::SetupNaviPanesL( TCamActiveNaviPane aNaviPane )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   526
	{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   527
	PRINT( _L("Camera => CCamContainerBase::SetupNaviPanesL" ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   528
	TRect rect( Rect() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   529
	
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   530
	if( aNaviPane == ECamPaneCounter )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   531
		{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   532
        iNaviCounterControl = 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   533
            static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() )->NaviCounterControl();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   534
	    iNaviCounterControl->SetMopParent( this );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   535
	    iNaviCounterControl->SetContainerWindowL( *this );  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   536
	    iNaviCounterControl->SetRect( Rect() );            
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   537
	    iNaviCounterControl->MakeVisible( ETrue );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   538
        if ( iNaviProgressBarControl )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   539
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   540
            iNaviProgressBarControl->MakeVisible( EFalse );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   541
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   542
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   543
	    iPaneInUse = ECamPaneCounter;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   544
		}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   545
	else if( aNaviPane == ECamPaneProgress )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   546
		{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   547
		PRINT( _L("Camera => CCamContainerBase::SetupNaviPanesL progress" ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   548
        iNaviProgressBarControl = 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   549
            static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() )->NaviProgressBarControl();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   550
	    iNaviProgressBarControl->SetMopParent( this );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   551
	    iNaviProgressBarControl->SetContainerWindowL( *this );            
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   552
	    iNaviProgressBarControl->SetRect( Rect() );            
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   553
	    iNaviProgressBarControl->MakeVisible( ETrue );    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   554
        if ( iNaviCounterControl )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   555
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   556
            iNaviCounterControl->MakeVisible( EFalse );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   557
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   558
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   559
	    iPaneInUse = ECamPaneProgress;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   560
		}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   561
	else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   562
		{
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   563
		iPaneInUse = ECamPaneUndefined;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   564
		}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   565
	PRINT( _L("Camera <= CCamContainerBase::SetupNaviPanesL" ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   566
	}
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   567
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   568
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   569
// CCamContainerBase::ShowZoomPaneWithTimer
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   570
// Makes Zoom Pane visible for the period of the pane timer.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   571
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   572
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   573
void CCamContainerBase::ShowZoomPaneWithTimer()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   574
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   575
    // No implementation: only meaningful in pre-capture modes
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   576
    PRINT(_L("Camera => CCamContainerBase::ShowZoomPaneWithTimer() - No implementation!"));
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   577
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   578
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   579
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   580
// CCamContainerBase::CreateActivePaletteL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   581
// Creates the Active Palette control
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   582
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   583
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   584
void CCamContainerBase::CreateActivePaletteL()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   585
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   586
    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   587
    appUi->APHandler()->CreateActivePaletteL( *this, this );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   588
    iActivePalette = appUi->ActivePalette();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   589
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   590
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   591
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   592
// CCamContainerBase::DestroyActivePaletteL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   593
// Destroys the Active Palette control
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   594
// ---------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   595
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   596
void CCamContainerBase::DestroyActivePalette()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   597
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   598
    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   599
    appUi->APHandler()->DestroyActivePalette();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   600
    iActivePalette = NULL;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   601
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   602
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   603
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   604
// CCamContainerBase::Redraw
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   605
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   606
void CCamContainerBase::Redraw(const TRect& /*aArea*/)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   607
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   608
    // Do nothing by default; may be overridden
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   609
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   610
   	
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   611
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   612
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   613
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   614
// CCamContainerBase::PrepareProcessingTextL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   615
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   616
//   
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   617
void CCamContainerBase::PrepareProcessingTextL( TBool aStillMode )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   618
    { 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   619
    TAknLayoutRect vidProgressPane;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   620
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   621
    TInt cba =  AknLayoutUtils::CbaLocation() == 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   622
                AknLayoutUtils::EAknCbaLocationLeft? 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   623
                AknLayoutUtils::EAknCbaLocationLeft : 0;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   624
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   625
    if ( CamUtility::IsNhdDevice() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   626
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   627
        vidProgressPane.LayoutRect( Rect(),
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   628
                AknLayoutScalable_Apps::vid4_progress_pane( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   629
                Layout_Meta_Data::IsLandscapeOrientation() ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   630
                
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   631
        iProcessingTextLayout.LayoutText( vidProgressPane.Rect(), 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   632
                AknLayoutScalable_Apps::vid4_progress_pane_t3());  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   633
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   634
    else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   635
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   636
        vidProgressPane.LayoutRect( Rect(), 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   637
                AknLayoutScalable_Apps::vid6_indi_pane( cba ) ); 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   638
                
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   639
        iProcessingTextLayout.LayoutText( vidProgressPane.Rect(), 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   640
                AknLayoutScalable_Apps::vid6_indi_pane_t4( 2 ));  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   641
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   642
        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   643
    // Delete old text 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   644
    if( iProcessingText )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   645
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   646
        delete iProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   647
        iProcessingText = NULL;  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   648
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   649
    if( aStillMode )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   650
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   651
        iProcessingText = StringLoader::LoadL( R_QTN_PROCESSING_IMAGE_TEXT );  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   652
        }        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   653
/*        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   654
    else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   655
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   656
        iProcessingText = StringLoader::LoadL( R_QTN_PROCESSING_VIDEO_TEXT );  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   657
        }                    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   658
*/        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   659
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   660
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   661
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   662
// CCamContainerBase::DismissProcessingTextL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   663
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   664
//     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   665
void CCamContainerBase::DismissProcessingText()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   666
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   667
    delete iProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   668
    iProcessingText = NULL;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   669
    }    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   670
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   671
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   672
// CCamContainerBase::PrepareBurstProcessingTextL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   673
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   674
//   
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   675
void CCamContainerBase::PrepareBurstProcessingTextL()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   676
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   677
    PRINT( _L("Camera => CCamContainerBase::PrepareBurstProcessingTextL" ))	
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   678
    TAknLayoutRect vidProgressPane;  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   679
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   680
    TInt cba =  AknLayoutUtils::CbaLocation() == 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   681
                AknLayoutUtils::EAknCbaLocationLeft? 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   682
                AknLayoutUtils::EAknCbaLocationLeft : 0;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   683
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   684
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   685
    if ( CamUtility::IsNhdDevice() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   686
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   687
        vidProgressPane.LayoutRect(
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   688
                Rect(),
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   689
                AknLayoutScalable_Apps::vid4_progress_pane( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   690
                        Layout_Meta_Data::IsLandscapeOrientation() ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   691
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   692
        iBurstProcessingTextLayout.LayoutText( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   693
                vidProgressPane.Rect(), 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   694
                AknLayoutScalable_Apps::vid4_progress_pane_t3() );  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   695
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   696
    else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   697
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   698
        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   699
        vidProgressPane.LayoutRect(
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   700
                Rect(),
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   701
                AknLayoutScalable_Apps::vid6_indi_pane( cba ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   702
                
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   703
        iBurstProcessingTextLayout.LayoutText( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   704
                vidProgressPane.Rect(), 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   705
                AknLayoutScalable_Apps::vid6_indi_pane_t4( 2 ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   706
        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   707
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   708
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   709
    // Delete old text 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   710
    if( iBurstProcessingText )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   711
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   712
        delete iBurstProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   713
        iBurstProcessingText = NULL;  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   714
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   715
    iBurstProcessingText = StringLoader::LoadL( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   716
                           R_QTN_PROCESSING_IMAGE_TEXT );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   717
    PRINT( _L("Camera <= CCamContainerBase::PrepareBurstProcessingTextL" ))	                       
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   718
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   719
 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   720
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   721
// CCamContainerBase::UpdateBurstProcessingTextL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   722
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   723
//   
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   724
void CCamContainerBase::UpdateBurstProcessingTextL( TInt aHandled, TInt aTotal )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   725
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   726
    PRINT( _L("Camera => CCamContainerBase::UpdateBurstProcessingTextL" ))		
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   727
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   728
    // Delete old text 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   729
    if( iBurstProcessingText )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   730
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   731
        delete iBurstProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   732
        iBurstProcessingText = NULL;  
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   733
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   734
    CDesCArrayFlat* values 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   735
    = new (ELeave) CDesCArrayFlat( 2 );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   736
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   737
    CleanupStack::PushL( values );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   738
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   739
    TBuf<KCamBurstCounterLength> handled;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   740
    TBuf<KCamBurstCounterLength> total;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   741
    handled.Format( KCamBurstCounterFormat, aHandled );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   742
    total.Format( KCamBurstCounterFormat, aTotal );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   743
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   744
    values->AppendL( handled );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   745
    values->AppendL( total );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   746
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   747
#ifndef __WINS__
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   748
    iBurstProcessingText = StringLoader::LoadL( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   749
            R_QTN_PROCESSING_BURST_IMAGE_TEXT, *values );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   750
#endif
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   751
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   752
    CleanupStack::PopAndDestroy( values );                           
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   753
    PRINT( _L("Camera <= CCamContainerBase::UpdateBurstProcessingTextL" ))		                           
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   754
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   755
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   756
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   757
// CCamContainerBase::DismissBurstProcessingText
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   758
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   759
//     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   760
void CCamContainerBase::DismissBurstProcessingText()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   761
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   762
    delete iBurstProcessingText;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   763
    iBurstProcessingText = NULL;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   764
    }    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   765
        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   766
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   767
// CCamContainerBase::CheckForFileName
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   768
// 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   769
// ----------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   770
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   771
void CCamContainerBase::CheckForFileName( TBool aDoCheck )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   772
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   773
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   774
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   775
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   776
// CCamContainerBase::CreateBackgroundContextL
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   777
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   778
//     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   779
void CCamContainerBase::CreateBackgroundContextL()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   780
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   781
    if( iCamOrientation == ECamOrientationCamcorder ||
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   782
        iCamOrientation == ECamOrientationCamcorderLeft )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   783
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   784
        iBgContext = CAknsBasicBackgroundControlContext::NewL( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   785
            KAknsIIDQsnBgScreen, Rect(), EFalse );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   786
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   787
    else
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   788
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   789
        iBgContext = CAknsBasicBackgroundControlContext::NewL( 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   790
            KAknsIIDQsnBgAreaMain, Rect(), EFalse );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   791
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   792
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   793
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   794
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   795
// CCamContainerBase::ViewFinderFrameRect
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   796
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   797
//     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   798
TRect
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   799
CCamContainerBase::ViewFinderFrameRect(TCamCameraMode aTargetMode) const   
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   800
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   801
    PRINT( _L("Camera => CCamContainerBase::ViewFinderFrameRect") );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   802
    const TCamAppViewIds viewId = static_cast<TCamAppViewIds>( iView.Id().iUid );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   803
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   804
    TCamCameraMode cameraMode = (aTargetMode != ECamControllerIdle)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   805
                                        ? aTargetMode
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   806
                                        : iController.CurrentMode();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   807
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   808
    // In post capture view both target and current mode can be in idle mode, which
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   809
    // would cause the use of invalid viewfinder layouts
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   810
    if ( viewId == ECamViewIdVideoPostCapture && cameraMode == ECamControllerIdle )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   811
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   812
        cameraMode = ECamControllerVideo;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   813
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   814
    else if ( viewId == ECamViewIdStillPostCapture && cameraMode == ECamControllerIdle  )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   815
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   816
        cameraMode = ECamControllerImage;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   817
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   818
    
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   819
    const TInt resolution = (cameraMode == ECamControllerVideo)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   820
                                ? iController.GetCurrentVideoResolution()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   821
                                : iController.GetCurrentImageResolution();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   822
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   823
    TRect rect = CamUtility::ViewfinderLayout( cameraMode, resolution );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   824
    PRINT( _L("Camera <= CCamContainerBase::ViewFinderFrameRect") );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   825
    return rect;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   826
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   827
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   828
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   829
// CCamContainerBase::IsPrimaryCameraCaptureKey
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   830
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   831
//     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   832
TBool CCamContainerBase::IsPrimaryCameraCaptureKey( const TKeyEvent& aKeyEvent ) const
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   833
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   834
    TBool isCapturekey( KErrNotFound != iPrimaryCameraCaptureKeys.Find( aKeyEvent.iScanCode ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   835
    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   836
    if ( appUi 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   837
         && ( !appUi->IsToolBarVisible() || !appUi->DrawPreCaptureCourtesyUI() )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   838
         && ( aKeyEvent.iScanCode == EStdKeyDevice3
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   839
              || aKeyEvent.iScanCode == EStdKeyEnter
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   840
              || aKeyEvent.iScanCode == EStdKeyNkpEnter ) )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   841
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   842
        isCapturekey = ETrue;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   843
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   844
    return isCapturekey;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   845
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   846
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   847
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   848
// CCamContainerBase::IsSecondaryCameraCaptureKey
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   849
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   850
//     
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   851
TBool CCamContainerBase::IsSecondaryCameraCaptureKey( const TKeyEvent& aKeyEvent ) const
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   852
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   853
    TBool isCapturekey( KErrNotFound != iSecondaryCameraCaptureKeys.Find( aKeyEvent.iScanCode ) );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   854
    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   855
    if ( appUi 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   856
         && !appUi->IsToolBarVisible()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   857
         && ( aKeyEvent.iScanCode == EStdKeyDevice3
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   858
              || aKeyEvent.iScanCode == EStdKeyEnter
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   859
              || aKeyEvent.iScanCode == EStdKeyNkpEnter ))
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   860
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   861
        isCapturekey = ETrue;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   862
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   863
    return isCapturekey;            
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   864
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   865
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   866
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   867
// CCamContainerBase::CountComponentControls
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   868
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   869
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   870
TInt CCamContainerBase::CountComponentControls() const
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   871
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   872
    TInt index = 0;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   873
    if(iBackupContainer)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   874
        index++;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   875
    return index;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   876
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   877
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   878
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   879
// CCamContainerBase::ComponentControl
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   880
// -----------------------------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   881
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   882
CCoeControl* CCamContainerBase::ComponentControl(TInt aIndex) const
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   883
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   884
    CCoeControl* control = NULL;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   885
     switch(aIndex)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   886
         {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   887
         case 0:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   888
             {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   889
             control = iBackupContainer;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   890
             }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   891
             break;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   892
         default:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   893
             break;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   894
         }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   895
    return control; 
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   896
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   897
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   898
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   899
// CCamCaptureSetupContainer::ReserveAndStartVF
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   900
// ---------------------------------------------------------
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   901
//
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   902
void CCamContainerBase::ReserveAndStartVF()
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   903
    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   904
    PRINT ( _L("Camera => CCamContainerBase::ReserveAndStartVF") );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   905
    TCamCameraMode mode = iController.CurrentMode();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   906
    if(iController.IsAppUiAvailable())
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   907
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   908
        TVwsViewId currentViewId;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   909
        CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   910
        appUi->GetActiveViewId( currentViewId );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   911
        switch ( currentViewId.iViewUid.iUid )
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   912
            {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   913
            case ECamViewIdPhotoUserSceneSetup:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   914
            case ECamViewIdStillPreCapture:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   915
                {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   916
                mode = ECamControllerImage;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   917
                }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   918
                break;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   919
            case ECamViewIdVideoPreCapture:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   920
                {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   921
                mode = ECamControllerVideo;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   922
                }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   923
                break;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   924
            default:
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   925
                {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   926
                //Assume imagemode if view cannot be determined.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   927
                if(mode==ECamControllerIdle)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   928
                    {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   929
                    mode = ECamControllerImage;                
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   930
                    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   931
                }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   932
                break;
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   933
            }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   934
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   935
    //Don't reserve camera and start viewfinder if shutting down.
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   936
    if(mode!=ECamControllerShutdown)
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   937
        {
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   938
        iController.EnterViewfinderMode( mode );
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   939
        iController.StartIdleTimer();
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   940
        }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   941
    PRINT ( _L("Camera <= CCamContainerBase::ReserveAndStartVF") );        
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   942
    }
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   943
bac7acad7cb3 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   944
// End of File