camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp
branchRCL_3
changeset 7 dbec5787fa68
parent 3 8b2d6d0384b0
child 11 792dfc98fb3b
equal deleted inserted replaced
3:8b2d6d0384b0 7:dbec5787fa68
    38 #include <barsread.h>
    38 #include <barsread.h>
    39 #include <cameraapp.rsg>
    39 #include <cameraapp.rsg>
    40 #include <vgacamsettings.rsg>
    40 #include <vgacamsettings.rsg>
    41 #include <aknlayoutscalable_apps.cdl.h>
    41 #include <aknlayoutscalable_apps.cdl.h>
    42 #include <layoutmetadata.cdl.h>
    42 #include <layoutmetadata.cdl.h>
       
    43 #include <touchfeedback.h>
    43 #include "OstTraceDefinitions.h"
    44 #include "OstTraceDefinitions.h"
    44 #ifdef OST_TRACE_COMPILER_IN_USE
    45 #ifdef OST_TRACE_COMPILER_IN_USE
    45 #include "CamVideoPreCaptureContainerTraces.h"
    46 #include "CamVideoPreCaptureContainerTraces.h"
    46 #endif
    47 #endif
    47 
    48 
    70 
    71 
    71 // Destructor
    72 // Destructor
    72 CCamVideoPreCaptureContainer::~CCamVideoPreCaptureContainer()
    73 CCamVideoPreCaptureContainer::~CCamVideoPreCaptureContainer()
    73   {
    74   {
    74   PRINT( _L("Camera => ~CCamVideoPreCaptureContainer") );
    75   PRINT( _L("Camera => ~CCamVideoPreCaptureContainer") );
       
    76   if ( iFeedback )
       
    77       {
       
    78       iFeedback->RemoveFeedbackForControl( this );
       
    79       }
    75   delete iFileTypeIndicator;
    80   delete iFileTypeIndicator;
    76   PRINT( _L("Camera <= ~CCamVideoPreCaptureContainer") );
    81   PRINT( _L("Camera <= ~CCamVideoPreCaptureContainer") );
    77   }
    82   }
    78 
    83 
    79 // ---------------------------------------------------------
    84 // ---------------------------------------------------------
   134     if ( !iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )
   139     if ( !iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )
   135         {
   140         {
   136         static_cast<CCamPreCaptureContainerBase*>( this )
   141         static_cast<CCamPreCaptureContainerBase*>( this )
   137             ->SetupActivePaletteL( static_cast<CCamViewBase*>(&iView) );
   142             ->SetupActivePaletteL( static_cast<CCamViewBase*>(&iView) );
   138         }
   143         }
       
   144     
       
   145     if ( iController.IsTouchScreenSupported() )
       
   146         {
       
   147         // Get pointer of touch feedback instance 
       
   148         iFeedback = MTouchFeedback::Instance();
       
   149         if ( !iFeedback )
       
   150             iFeedback = MTouchFeedback::CreateInstanceL();
       
   151         }
   139     }
   152     }
   140 
   153 
   141 // ---------------------------------------------------------------------------
   154 // ---------------------------------------------------------------------------
   142 // CCamVideoPreCaptureContainer::CCamVideoPreCaptureContainer
   155 // CCamVideoPreCaptureContainer::CCamVideoPreCaptureContainer
   143 // C++ constructor
   156 // C++ constructor
   169         TCamCaptureOperation operation = iController.CurrentOperation();
   182         TCamCaptureOperation operation = iController.CurrentOperation();
   170         switch( operation )
   183         switch( operation )
   171           {
   184           {
   172           case ECamCapturing:
   185           case ECamCapturing:
   173             {
   186             {
       
   187             if ( iController.IsTouchScreenSupported() && iFeedback )
       
   188                 {
       
   189                 iFeedback->EnableFeedbackForControl( this, EFalse );
       
   190                 }
   174             iRecordState = ECamRecording;
   191             iRecordState = ECamRecording;
   175             iResolutionIndicators[iCurrentIndicator]->SetRect(iResolutionIndicatorVidcapPosition);
   192             iResolutionIndicators[iCurrentIndicator]->SetRect(iResolutionIndicatorVidcapPosition);
   176             break;
   193             break;
   177             }
   194             }
   178           case ECamPaused:
   195           case ECamPaused:
   217       // ---------------------------------------------------
   234       // ---------------------------------------------------
   218       case ECamEventRecordComplete:    
   235       case ECamEventRecordComplete:    
   219         {
   236         {
   220         iResolutionIndicators[iCurrentIndicator]->SetRect( ResolutionIndicatorRect() );
   237         iResolutionIndicators[iCurrentIndicator]->SetRect( ResolutionIndicatorRect() );
   221         iFileTypeIndicator->SetRect( iFileTypeIndicatorPosition );
   238         iFileTypeIndicator->SetRect( iFileTypeIndicatorPosition );
       
   239         if ( iController.IsTouchScreenSupported() && iFeedback )
       
   240             {
       
   241             iFeedback->EnableFeedbackForControl( this, ETrue );
       
   242             }
   222         break;
   243         break;
   223         }
   244         }
   224     // ---------------------------------------------------
   245     // ---------------------------------------------------
   225     case ECamEventInitReady:
   246     case ECamEventInitReady:
   226         {
   247         {