os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/src/MVSVideoSettingDialog.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// Part of the MVS Application for TechView
sl@0
    15
//
sl@0
    16
sl@0
    17
#include <e32math.h>
sl@0
    18
#include <techview/eikfpne.h>
sl@0
    19
sl@0
    20
#include "MVSVideoSettingDialog.h"
sl@0
    21
#include "MVSApp.hrh"
sl@0
    22
sl@0
    23
void CMVSVideoSettingDialog::SetupDialogLD(TVideoRotation aRotation, 
sl@0
    24
                                           CMVSAppUi* aAppUi,
sl@0
    25
                                           const TRect& aVideoSize,
sl@0
    26
                                           const TRect& aWindowRect,
sl@0
    27
                                           TBool aSupportVideoPlayerUtility2,
sl@0
    28
                                           TBool aPip,
sl@0
    29
										   TBool aCrp)
sl@0
    30
	{
sl@0
    31
    CMVSVideoSettingDialog* dialog = new (ELeave) CMVSVideoSettingDialog(aRotation,
sl@0
    32
                                                                         aAppUi,
sl@0
    33
                                                                         aVideoSize,
sl@0
    34
                                                                         aWindowRect,
sl@0
    35
                                                                         aSupportVideoPlayerUtility2,
sl@0
    36
                                                                         aPip, 
sl@0
    37
																		 aCrp);
sl@0
    38
    dialog->ExecuteLD(R_MVS_VIDEO_DIALOG_VIDEOSETTING);
sl@0
    39
    }
sl@0
    40
sl@0
    41
sl@0
    42
void CMVSVideoSettingDialog::PreLayoutDynInitL()
sl@0
    43
    {
sl@0
    44
    // Get a downcasted pointer to the controls
sl@0
    45
    CEikChoiceList* rotation = static_cast<CEikChoiceList*>(Control(EMVSVideoRotationSettings));    
sl@0
    46
    if(rotation)
sl@0
    47
	    {
sl@0
    48
	    rotation->SetCurrentItem(iRotation);
sl@0
    49
	    }
sl@0
    50
	        
sl@0
    51
    // default the scaling factor to the current scaling factor as used by the video playback
sl@0
    52
    // utility    	
sl@0
    53
    iAppUi->GetScaleFactorL(iScaleWidth, iScaleHeight, iAntiAliasFiltering);
sl@0
    54
    
sl@0
    55
    CEikCheckBox* antiAliasFiltering = static_cast<CEikCheckBox*>(Control(EMVSAntiAliasFiltering));
sl@0
    56
    if(antiAliasFiltering)
sl@0
    57
    	{
sl@0
    58
    	iAntiAliasFilteringCtl = antiAliasFiltering;
sl@0
    59
    	antiAliasFiltering->SetObserver(this);
sl@0
    60
    	antiAliasFiltering->SetState(
sl@0
    61
    	    iAntiAliasFiltering ? CEikButtonBase::ESet : CEikButtonBase::EClear);            
sl@0
    62
    	}
sl@0
    63
        
sl@0
    64
    CEikFloatingPointEditor* editor = static_cast<CEikFloatingPointEditor*> (Control(EMVSCmdScaleWidth));
sl@0
    65
    TReal temp(iScaleWidth);
sl@0
    66
    editor->SetValueL(&temp);
sl@0
    67
    
sl@0
    68
    temp = iScaleHeight;
sl@0
    69
    editor = static_cast<CEikFloatingPointEditor*> (Control(EMVSCmdScaleHeight));
sl@0
    70
    editor->SetValueL(&temp);
sl@0
    71
    	
sl@0
    72
    // default the crop region to the current crop region values as used by the video playback
sl@0
    73
    // utility
sl@0
    74
    iAppUi->GetCropRegionL(iCropRegion);
sl@0
    75
    
sl@0
    76
    static_cast<CEikNumberEditor*>
sl@0
    77
        (Control(EMVSCmdSetTopLeftx))->SetNumber(iCropRegion.iTl.iX);
sl@0
    78
    static_cast<CEikNumberEditor*>
sl@0
    79
        (Control(EMVSCmdSetTopLefty))->SetNumber(iCropRegion.iTl.iY);
sl@0
    80
    static_cast<CEikNumberEditor*>
sl@0
    81
        (Control(EMVSCmdSetBottomRightx))->SetNumber(iCropRegion.iBr.iX);
sl@0
    82
    static_cast<CEikNumberEditor*>
sl@0
    83
        (Control(EMVSCmdSetBottomRighty))->SetNumber(iCropRegion.iBr.iY);    	
sl@0
    84
        
sl@0
    85
    if (!iSupportVideoPlayerUtility2)
sl@0
    86
        {
sl@0
    87
        // hide the video extent & window clipping rect UI elements if CVideoPlayerUtility2 
sl@0
    88
        // is not in effect
sl@0
    89
        for (TInt i = EMVSCmdSetVideoExtentTopLeftx; i <= EMVSCmdSetOverlayText; i++)
sl@0
    90
            {
sl@0
    91
            SetLineDimmedNow(i, ETrue);
sl@0
    92
            SetLineNonFocusing(i);
sl@0
    93
            }
sl@0
    94
        }
sl@0
    95
    else
sl@0
    96
        {
sl@0
    97
        // default the video extent to values currently set in the application
sl@0
    98
        static_cast<CEikNumberEditor*>
sl@0
    99
            (Control(EMVSCmdSetVideoExtentTopLeftx))->SetNumber(iVideoExtent.iTl.iX);
sl@0
   100
        static_cast<CEikNumberEditor*>
sl@0
   101
            (Control(EMVSCmdSetVideoExtentTopLefty))->SetNumber(iVideoExtent.iTl.iY);
sl@0
   102
        static_cast<CEikNumberEditor*>
sl@0
   103
            (Control(EMVSCmdSetVideoExtentBottomRightx))->SetNumber(iVideoExtent.iBr.iX);
sl@0
   104
        static_cast<CEikNumberEditor*>
sl@0
   105
            (Control(EMVSCmdSetVideoExtentBottomRighty))->SetNumber(iVideoExtent.iBr.iY);
sl@0
   106
sl@0
   107
        // default the window clipping rect to values currently set in the application
sl@0
   108
        static_cast<CEikNumberEditor*>
sl@0
   109
            (Control(EMVSCmdSetWindowClipTopLeftx))->SetNumber(iWindowClip.iTl.iX);
sl@0
   110
        static_cast<CEikNumberEditor*>
sl@0
   111
            (Control(EMVSCmdSetWindowClipTopLefty))->SetNumber(iWindowClip.iTl.iY);
sl@0
   112
        static_cast<CEikNumberEditor*>
sl@0
   113
            (Control(EMVSCmdSetWindowClipBottomRightx))->SetNumber(iWindowClip.iBr.iX);
sl@0
   114
        static_cast<CEikNumberEditor*>
sl@0
   115
            (Control(EMVSCmdSetWindowClipBottomRighty))->SetNumber(iWindowClip.iBr.iY);
sl@0
   116
            
sl@0
   117
        if (iAppUi->OverlayText().Length() > 0)
sl@0
   118
            {
sl@0
   119
            static_cast<CEikCheckBox*>
sl@0
   120
                (Control(EMVSCmdSetDisplayOverlayText))->SetState(CEikButtonBase::ESet);            
sl@0
   121
            static_cast<CEikEdwin*>
sl@0
   122
                (Control(EMVSCmdSetOverlayText))->SetTextL(&iAppUi->OverlayText());                
sl@0
   123
            }
sl@0
   124
        else
sl@0
   125
            {
sl@0
   126
            static_cast<CEikCheckBox*>
sl@0
   127
                (Control(EMVSCmdSetDisplayOverlayText))->SetState(CEikButtonBase::EClear);            
sl@0
   128
            static_cast<CEikEdwin*>
sl@0
   129
                (Control(EMVSCmdSetOverlayText))->SetTextL(NULL);                                
sl@0
   130
            SetLineDimmedNow(EMVSCmdSetOverlayText, ETrue);                            
sl@0
   131
            }
sl@0
   132
        }
sl@0
   133
sl@0
   134
#ifdef SYMBIAN_BUILD_GCE    
sl@0
   135
    TAutoScaleType autoScaleType;
sl@0
   136
    TInt autoScaleHorizPos;
sl@0
   137
    TInt autoScaleVertPos;
sl@0
   138
    iAppUi->GetAutoScale(autoScaleType, autoScaleHorizPos, autoScaleVertPos);
sl@0
   139
    
sl@0
   140
	CEikChoiceList* autoScaleTypeList = static_cast<CEikChoiceList*>(Control(EMVSAutoScaleType));    
sl@0
   141
    switch (autoScaleType)
sl@0
   142
    	{
sl@0
   143
        case EAutoScaleNone:
sl@0
   144
        	autoScaleTypeList->SetCurrentItem(0);
sl@0
   145
          	break;
sl@0
   146
        case EAutoScaleBestFit:
sl@0
   147
        	autoScaleTypeList->SetCurrentItem(1);
sl@0
   148
          	break;
sl@0
   149
        case EAutoScaleClip:
sl@0
   150
        	autoScaleTypeList->SetCurrentItem(2);
sl@0
   151
         	break;
sl@0
   152
    	case EAutoScaleStretch:
sl@0
   153
    		autoScaleTypeList->SetCurrentItem(3);
sl@0
   154
    		break;
sl@0
   155
        }	
sl@0
   156
	    
sl@0
   157
	CEikChoiceList* autoScaleHoriz = static_cast<CEikChoiceList*>(Control(EMVSAutoScaleHoriz));
sl@0
   158
	switch (autoScaleHorizPos)
sl@0
   159
		{
sl@0
   160
		case EHorizontalAlignLeft:
sl@0
   161
			autoScaleHoriz->SetCurrentItem(0);
sl@0
   162
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleHorizPos))->SetNumber(0);
sl@0
   163
			break;
sl@0
   164
		case EHorizontalAlignCenter:
sl@0
   165
			autoScaleHoriz->SetCurrentItem(1);
sl@0
   166
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleHorizPos))->SetNumber(0);
sl@0
   167
			break;
sl@0
   168
		case EHorizontalAlignRight:
sl@0
   169
			autoScaleHoriz->SetCurrentItem(2);
sl@0
   170
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleHorizPos))->SetNumber(0);
sl@0
   171
			break;
sl@0
   172
		default: 
sl@0
   173
			autoScaleHoriz->SetCurrentItem(3);
sl@0
   174
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleHorizPos))->SetNumber(autoScaleHorizPos);
sl@0
   175
			break;
sl@0
   176
		}
sl@0
   177
	
sl@0
   178
	CEikChoiceList* autoScaleVert = static_cast<CEikChoiceList*>(Control(EMVSAutoScaleVert));
sl@0
   179
	switch (autoScaleVertPos)
sl@0
   180
		{
sl@0
   181
		case EVerticalAlignTop:
sl@0
   182
			autoScaleVert->SetCurrentItem(0);
sl@0
   183
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleVertPos))->SetNumber(0);
sl@0
   184
			break;
sl@0
   185
		case EVerticalAlignCenter:
sl@0
   186
			autoScaleVert->SetCurrentItem(1);
sl@0
   187
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleVertPos))->SetNumber(0);
sl@0
   188
			break;
sl@0
   189
		case EVerticalAlignBottom:
sl@0
   190
			autoScaleVert->SetCurrentItem(2);
sl@0
   191
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleVertPos))->SetNumber(0);
sl@0
   192
			break;
sl@0
   193
		default: 
sl@0
   194
			autoScaleVert->SetCurrentItem(3);
sl@0
   195
			static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleVertPos))->SetNumber(autoScaleVertPos);
sl@0
   196
			break;
sl@0
   197
		}
sl@0
   198
	
sl@0
   199
	CEikCheckBox* pip = static_cast<CEikCheckBox*>(Control(EMVSPIP));
sl@0
   200
	
sl@0
   201
	if(pip)
sl@0
   202
    	{
sl@0
   203
    	pip->SetObserver(this);
sl@0
   204
    	pip->SetState(iPip ? CEikButtonBase::ESet : CEikButtonBase::EClear);            
sl@0
   205
    	}
sl@0
   206
sl@0
   207
	CEikCheckBox* crp = static_cast<CEikCheckBox*>(Control(EMVSCRP));
sl@0
   208
sl@0
   209
	if(crp)
sl@0
   210
		{
sl@0
   211
		crp->SetObserver(this);
sl@0
   212
		crp->SetState(iCrp ? CEikButtonBase::ESet : CEikButtonBase::EClear);
sl@0
   213
		}
sl@0
   214
	
sl@0
   215
#endif // SYMBIAN_BUILD_GCE
sl@0
   216
    }
sl@0
   217
sl@0
   218
sl@0
   219
CMVSVideoSettingDialog::CMVSVideoSettingDialog(TVideoRotation aRotation,
sl@0
   220
                                               CMVSAppUi* aAppUi,
sl@0
   221
                                               const TRect& aVideoSize,
sl@0
   222
                                               const TRect& aWindowRect,
sl@0
   223
                                               TBool aSupportVideoPlayerUtility2,
sl@0
   224
                                               TBool aPip,
sl@0
   225
											   TBool aCrp)
sl@0
   226
    : iRotation(aRotation),
sl@0
   227
      iAppUi(aAppUi),
sl@0
   228
      iVideoExtent(aVideoSize),
sl@0
   229
      iWindowClip(aWindowRect),
sl@0
   230
      iSupportVideoPlayerUtility2(aSupportVideoPlayerUtility2),
sl@0
   231
      iPip(aPip),
sl@0
   232
	  iCrp(aCrp)
sl@0
   233
    {
sl@0
   234
    //Nothing to do here - all done in initialisation list
sl@0
   235
    }
sl@0
   236
sl@0
   237
sl@0
   238
TBool CMVSVideoSettingDialog::OkToExitL(TInt aButtonId)
sl@0
   239
    {
sl@0
   240
    switch(aButtonId)
sl@0
   241
    	{
sl@0
   242
        case EMVSButtonUpdate:
sl@0
   243
            {          
sl@0
   244
            HandleUpdateL();
sl@0
   245
            break;
sl@0
   246
            }
sl@0
   247
            
sl@0
   248
        case EMVSButtonCancel:
sl@0
   249
        default: //cancel
sl@0
   250
            break;
sl@0
   251
        }
sl@0
   252
        
sl@0
   253
    return ETrue;                    
sl@0
   254
    }                        
sl@0
   255
sl@0
   256
void CMVSVideoSettingDialog::HandleUpdateL()
sl@0
   257
    {
sl@0
   258
    // retrieve crop region value
sl@0
   259
    iAx = static_cast<CEikNumberEditor*>
sl@0
   260
                        (Control(EMVSCmdSetTopLeftx))->Number();
sl@0
   261
    
sl@0
   262
    iAy = static_cast<CEikNumberEditor*>
sl@0
   263
                        (Control(EMVSCmdSetTopLefty))->Number();
sl@0
   264
    
sl@0
   265
    iBx = static_cast<CEikNumberEditor*>
sl@0
   266
                        (Control(EMVSCmdSetBottomRightx))->Number();
sl@0
   267
    
sl@0
   268
    iBy = static_cast<CEikNumberEditor*>
sl@0
   269
                        (Control(EMVSCmdSetBottomRighty))->Number();    
sl@0
   270
    TRect newCrop(iAx, iAy, iBx, iBy);   
sl@0
   271
    if (newCrop != iCropRegion)
sl@0
   272
        {
sl@0
   273
        iAppUi->SetCropRegionL(newCrop);
sl@0
   274
        }
sl@0
   275
    
sl@0
   276
    // retrieve scale factor
sl@0
   277
    TReal32 scaleWidth = TReal32(static_cast<CEikFloatingPointEditor*>
sl@0
   278
                        (Control(EMVSCmdScaleWidth))->Value());    
sl@0
   279
    TReal32 scaleHeight = TReal32(static_cast<CEikFloatingPointEditor*>
sl@0
   280
                        (Control(EMVSCmdScaleHeight))->Value());                        
sl@0
   281
    TBool antiAlias = (iAntiAliasFilteringCtl->State() == CEikButtonBase::ESet);
sl@0
   282
sl@0
   283
    if (iScaleWidth != scaleWidth || iScaleHeight != scaleHeight || antiAlias != iAntiAliasFiltering)
sl@0
   284
        {            
sl@0
   285
        iAppUi->SetScaleFactorL(scaleWidth, scaleHeight, antiAlias);
sl@0
   286
        }
sl@0
   287
            
sl@0
   288
    // retrieve rotation value
sl@0
   289
    TVideoRotation newRotation(EVideoRotationNone);
sl@0
   290
    CEikChoiceList* rotation = static_cast<CEikChoiceList*>(Control(EMVSVideoRotationSettings));    
sl@0
   291
    if(rotation)
sl@0
   292
	    {
sl@0
   293
	    switch (rotation->CurrentItem())
sl@0
   294
	    	{
sl@0
   295
	        case 0:
sl@0
   296
	        	newRotation = EVideoRotationNone;
sl@0
   297
	          	break;
sl@0
   298
sl@0
   299
	        case 1:
sl@0
   300
	        	newRotation = EVideoRotationClockwise90;
sl@0
   301
	          	break;
sl@0
   302
sl@0
   303
	        case 2:
sl@0
   304
	        	newRotation = EVideoRotationClockwise180;
sl@0
   305
	         	break;
sl@0
   306
	         	
sl@0
   307
	        case 3:
sl@0
   308
	        	newRotation = EVideoRotationClockwise270;
sl@0
   309
	         	break;
sl@0
   310
sl@0
   311
	        default:
sl@0
   312
	        	newRotation = EVideoRotationNone;
sl@0
   313
	         	break;
sl@0
   314
	        }	
sl@0
   315
	    }
sl@0
   316
    if (iRotation != newRotation)
sl@0
   317
        {            
sl@0
   318
        iAppUi->SetRotationL(newRotation);
sl@0
   319
        iRotation = newRotation;
sl@0
   320
        }
sl@0
   321
            
sl@0
   322
#ifdef SYMBIAN_BUILD_GCE
sl@0
   323
    // retrieves window clipping rect
sl@0
   324
    TRect newWinClipRect;
sl@0
   325
    RetrieveWindowClipRectFieldValues(newWinClipRect);
sl@0
   326
    
sl@0
   327
    if (newWinClipRect != iWindowClip)
sl@0
   328
        {
sl@0
   329
        iAppUi->SetWindowClippingRect(newWinClipRect);
sl@0
   330
        }
sl@0
   331
sl@0
   332
sl@0
   333
    // retrieves video extent properties
sl@0
   334
    TRect newVideoExtent;
sl@0
   335
    RetrieveVideoExtentFieldValues(newVideoExtent);
sl@0
   336
sl@0
   337
    if (newVideoExtent != iVideoExtent)
sl@0
   338
        {
sl@0
   339
        iAppUi->SetVideoExtent(newVideoExtent);
sl@0
   340
        }
sl@0
   341
sl@0
   342
    // retrieve overlay text
sl@0
   343
    HBufC* overlayText = NULL;                  
sl@0
   344
    if (static_cast<CEikCheckBox*>(Control(EMVSCmdSetDisplayOverlayText))->State() 
sl@0
   345
        == CEikButtonBase::ESet)
sl@0
   346
        {
sl@0
   347
        overlayText 
sl@0
   348
            = static_cast<CEikEdwin*>(Control(EMVSCmdSetOverlayText))->GetTextInHBufL();
sl@0
   349
        }
sl@0
   350
     
sl@0
   351
    if (overlayText)
sl@0
   352
        {
sl@0
   353
        iAppUi->SetOverlayTextL(*overlayText);
sl@0
   354
        delete overlayText;                                
sl@0
   355
        }
sl@0
   356
    else
sl@0
   357
        {
sl@0
   358
        iAppUi->SetOverlayTextL(KNullDesC);
sl@0
   359
        }
sl@0
   360
sl@0
   361
	// retrieve autoscale values
sl@0
   362
    TAutoScaleType newAutoScaleType = EAutoScaleNone;
sl@0
   363
    TInt newAutoScaleHorizPos = 0;
sl@0
   364
    TInt newAutoScaleVertPos = 0;
sl@0
   365
    
sl@0
   366
    CEikChoiceList* autoScaleType = static_cast<CEikChoiceList*>(Control(EMVSAutoScaleType));
sl@0
   367
    
sl@0
   368
    if (autoScaleType)
sl@0
   369
	    {
sl@0
   370
	    switch (autoScaleType->CurrentItem())
sl@0
   371
	    	{
sl@0
   372
	        case 0:
sl@0
   373
	        	newAutoScaleType = EAutoScaleNone;
sl@0
   374
	          	break;
sl@0
   375
	        case 1:
sl@0
   376
	        	newAutoScaleType = EAutoScaleBestFit;
sl@0
   377
	          	break;
sl@0
   378
	        case 2:
sl@0
   379
	        	newAutoScaleType = EAutoScaleClip;
sl@0
   380
	         	break;
sl@0
   381
	    	case 3:
sl@0
   382
	    		newAutoScaleType = EAutoScaleStretch;
sl@0
   383
	    		break;
sl@0
   384
	    	default:
sl@0
   385
	    		newAutoScaleType = EAutoScaleNone;
sl@0
   386
	    		break;
sl@0
   387
	        }	
sl@0
   388
	    }
sl@0
   389
	
sl@0
   390
	CEikChoiceList* autoScaleHoriz = static_cast<CEikChoiceList*>(Control(EMVSAutoScaleHoriz));
sl@0
   391
	switch (autoScaleHoriz->CurrentItem())
sl@0
   392
		{
sl@0
   393
		case 0:
sl@0
   394
			newAutoScaleHorizPos = EHorizontalAlignLeft;
sl@0
   395
			break;
sl@0
   396
		case 1:
sl@0
   397
			newAutoScaleHorizPos = EHorizontalAlignCenter;
sl@0
   398
			break;
sl@0
   399
		case 2:
sl@0
   400
			newAutoScaleHorizPos = EHorizontalAlignRight;
sl@0
   401
			break;
sl@0
   402
		default:
sl@0
   403
			newAutoScaleHorizPos = static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleHorizPos))->Number();
sl@0
   404
			break;
sl@0
   405
		}
sl@0
   406
	
sl@0
   407
	CEikChoiceList* autoScaleVert = static_cast<CEikChoiceList*>(Control(EMVSAutoScaleVert));
sl@0
   408
	switch (autoScaleVert->CurrentItem())
sl@0
   409
		{
sl@0
   410
		case 0:
sl@0
   411
			newAutoScaleVertPos = EVerticalAlignTop;
sl@0
   412
			break;
sl@0
   413
		case 1:
sl@0
   414
			newAutoScaleVertPos = EVerticalAlignCenter;
sl@0
   415
			break;
sl@0
   416
		case 2:
sl@0
   417
			newAutoScaleVertPos = EVerticalAlignBottom;
sl@0
   418
			break;
sl@0
   419
		default:
sl@0
   420
			newAutoScaleVertPos = static_cast<CEikNumberEditor*>(Control(EMVSAutoScaleVertPos))->Number();
sl@0
   421
			break;
sl@0
   422
		}
sl@0
   423
sl@0
   424
	iAppUi->SetAutoScaleL(newAutoScaleType, newAutoScaleHorizPos, newAutoScaleVertPos);
sl@0
   425
	
sl@0
   426
	CEikButtonBase::TState state = static_cast<CEikCheckBox*>(Control(EMVSPIP))->State();
sl@0
   427
	iAppUi->SetPip(CEikButtonBase::ESet == state);
sl@0
   428
sl@0
   429
	state = static_cast<CEikCheckBox*>(Control(EMVSCRP))->State();
sl@0
   430
	iAppUi->SetCrp(CEikButtonBase::ESet == state);	
sl@0
   431
#endif  // SYMBIAN_BUILD_GCE
sl@0
   432
    }
sl@0
   433
            
sl@0
   434
sl@0
   435
void CMVSVideoSettingDialog::RetrieveVideoExtentFieldValues(TRect& aVideoExtentValues) const
sl@0
   436
    {
sl@0
   437
    aVideoExtentValues.iTl.iX 
sl@0
   438
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetVideoExtentTopLeftx))->Number();        
sl@0
   439
sl@0
   440
    aVideoExtentValues.iTl.iY 
sl@0
   441
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetVideoExtentTopLefty))->Number();        
sl@0
   442
sl@0
   443
    aVideoExtentValues.iBr.iX 
sl@0
   444
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetVideoExtentBottomRightx))->Number();        
sl@0
   445
sl@0
   446
    aVideoExtentValues.iBr.iY 
sl@0
   447
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetVideoExtentBottomRighty))->Number();                
sl@0
   448
    }
sl@0
   449
sl@0
   450
void CMVSVideoSettingDialog::RetrieveWindowClipRectFieldValues(TRect& aNewVideoExtent) const
sl@0
   451
    {
sl@0
   452
    aNewVideoExtent.iTl.iX 
sl@0
   453
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetWindowClipTopLeftx))->Number();        
sl@0
   454
sl@0
   455
    aNewVideoExtent.iTl.iY 
sl@0
   456
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetWindowClipTopLefty))->Number();        
sl@0
   457
sl@0
   458
    aNewVideoExtent.iBr.iX 
sl@0
   459
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetWindowClipBottomRightx))->Number();        
sl@0
   460
sl@0
   461
    aNewVideoExtent.iBr.iY 
sl@0
   462
        = static_cast<CEikNumberEditor*>(Control(EMVSCmdSetWindowClipBottomRighty))->Number();                
sl@0
   463
    }
sl@0
   464
sl@0
   465
void CMVSVideoSettingDialog::HandleControlEventL(CCoeControl *aControl, TCoeEvent aEventType)
sl@0
   466
	{
sl@0
   467
	CEikDialog::HandleControlEventL(aControl,aEventType);
sl@0
   468
    if (aControl == Control(EMVSCmdSetDisplayOverlayText) && aEventType == EEventStateChanged)
sl@0
   469
        {
sl@0
   470
        CEikCheckBox* overlayCheckBox 
sl@0
   471
            = static_cast<CEikCheckBox*>(Control(EMVSCmdSetDisplayOverlayText));
sl@0
   472
            
sl@0
   473
        TBool disableOverlayText = (overlayCheckBox->State() != CEikButtonBase::ESet);                    
sl@0
   474
        SetLineDimmedNow(EMVSCmdSetOverlayText, disableOverlayText);                                    
sl@0
   475
        }
sl@0
   476
	}