uifw/AvKon/src/AknSettingPage.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 23 3d340a0166ff
equal deleted inserted replaced
16:71dd06cfe933 18:0aa5fbdfbc30
  1355  *
  1355  *
  1356  * @param	aAccept ETrue if the user accepted. EFalse if the user cancelled.
  1356  * @param	aAccept ETrue if the user accepted. EFalse if the user cancelled.
  1357  */
  1357  */
  1358 EXPORT_C void CAknSettingPage::AttemptExitL(TBool aAccept)
  1358 EXPORT_C void CAknSettingPage::AttemptExitL(TBool aAccept)
  1359 	{
  1359 	{
       
  1360 	if ( OkToExitL( aAccept ) )
       
  1361 		{
       
  1362 		DismissL( aAccept );
       
  1363 		if(iReturn)
       
  1364 			{
       
  1365 		    *iReturn = aAccept;
       
  1366 			}
       
  1367 		StopActiveScheduler();
       
  1368 		}
       
  1369 	else 
       
  1370 	    {
       
  1371 	    DrawDeferred();
       
  1372 	    }
       
  1373 	}
       
  1374 
       
  1375 /**
       
  1376  * Checks if it OK to exit. Derived classes may check for valid data before allowing the dialog to 
       
  1377  * leave, possibly putting up notes.
       
  1378  *
       
  1379  * Returns ETrue if the dialog is ready to exit. Returns ETrue by default.
       
  1380  */
       
  1381 EXPORT_C TBool CAknSettingPage::OkToExitL(TBool /*aAccept*/ )
       
  1382 	{
       
  1383 	return(ETrue);
       
  1384 	}
       
  1385 
       
  1386 
       
  1387 /**
       
  1388  * Called to remove the setting page 
       
  1389  *
       
  1390  * @param	aAccept ETrue to accept the current value; EFalse otherwise
       
  1391  */
       
  1392 EXPORT_C void CAknSettingPage::DismissL(TBool aAccept)
       
  1393 	{
  1360     if ( AknLayoutUtils::PenEnabled() )
  1394     if ( AknLayoutUtils::PenEnabled() )
  1361         {
  1395         {
  1362         MTouchFeedback* feedback = MTouchFeedback::Instance();
  1396         MTouchFeedback* feedback = MTouchFeedback::Instance();
  1363         if ( feedback )
  1397         if ( feedback )
  1364             {
  1398             {
  1373                                    fbLogicalType,
  1407                                    fbLogicalType,
  1374                                    ETouchFeedbackVibra,
  1408                                    ETouchFeedbackVibra,
  1375                                    TPointerEvent() );
  1409                                    TPointerEvent() );
  1376             }
  1410             }
  1377         }
  1411         }
  1378 	if ( OkToExitL( aAccept ) )
  1412     
  1379 		{
       
  1380 		DismissL( aAccept );
       
  1381 		if(iReturn)
       
  1382 			{
       
  1383 		    *iReturn = aAccept;
       
  1384 			}
       
  1385 		StopActiveScheduler();
       
  1386 		}
       
  1387 	else 
       
  1388 	    {
       
  1389 	    DrawDeferred();
       
  1390 	    }
       
  1391 	}
       
  1392 
       
  1393 /**
       
  1394  * Checks if it OK to exit. Derived classes may check for valid data before allowing the dialog to 
       
  1395  * leave, possibly putting up notes.
       
  1396  *
       
  1397  * Returns ETrue if the dialog is ready to exit. Returns ETrue by default.
       
  1398  */
       
  1399 EXPORT_C TBool CAknSettingPage::OkToExitL(TBool /*aAccept*/ )
       
  1400 	{
       
  1401 	return(ETrue);
       
  1402 	}
       
  1403 
       
  1404 
       
  1405 /**
       
  1406  * Called to remove the setting page 
       
  1407  *
       
  1408  * @param	aAccept ETrue to accept the current value; EFalse otherwise
       
  1409  */
       
  1410 EXPORT_C void CAknSettingPage::DismissL(TBool aAccept)
       
  1411 	{
       
  1412     AknItemActionMenuRegister::SetOverridingMenuBarOwnerL( NULL );
  1413     AknItemActionMenuRegister::SetOverridingMenuBarOwnerL( NULL );
  1413 
  1414 
  1414 	if ( aAccept )
  1415 	if ( aAccept )
  1415 		{
  1416 		{
  1416 		AcceptSettingL();
  1417 		AcceptSettingL();