securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp
changeset 26 aad866c37519
parent 14 b75757c81051
child 66 67b3e3c1fc87
--- a/securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp	Thu May 27 13:44:17 2010 +0300
+++ b/securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp	Fri Jun 11 14:28:40 2010 +0300
@@ -23,23 +23,8 @@
 #include "SecUiAutoLockSettingPage.h"
 #include "secui.hrh"
 #include <featmgr.h>
-/**
-*CAutolockQuery used in autolock period query
-*/
-class CAutolockQuery
-	: public CAknNumberQueryDialog
-	{
-	public: // Constructors and destructors
-		/**
-		* C++ constructor.
-		*/
-		CAutolockQuery(TInt& aNumber,const TTone aTone = ENoTone);
-	protected: // From base classes
-		/**
-		* From CCAknNumberQueryDialog 
-		*/
-		void PreLayoutDynInitL();
-	};
+
+
 //
 // ----------------------------------------------------------
 // CAutoLockSettingPage::CAutoLockSettingPage()
@@ -47,10 +32,9 @@
 // ----------------------------------------------------------
 // 
 CAutoLockSettingPage::CAutoLockSettingPage(TInt aResourceId, TInt& aCurrentSelectionItem, CDesCArrayFlat* aItemArray, TInt& aAutoLockValue) : 
-					CAknRadioButtonSettingPage(aResourceId, aCurrentSelectionItem, aItemArray),iAutoLockValue(aAutoLockValue)
+					CBase(),iAutoLockValue(aAutoLockValue)
 
 	{
-        iOriginalIndex = aCurrentSelectionItem;
 	}
 
 //
@@ -61,11 +45,6 @@
 // 
 void CAutoLockSettingPage::ConstructL()
 	{
-	CAknRadioButtonSettingPage::ConstructL();
-	const TSize screenSize = iCoeEnv->ScreenDevice()->SizeInPixels();
-	iPopoutCba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba, CEikButtonGroupContainer::EHorizontal, this, R_AVKON_SOFTKEYS_OK_CANCEL__OK);
-	iPopoutCba->SetBoundingRect(TRect(screenSize));
-	FeatureManager::InitializeLibL();
 	}
 
 //
@@ -76,8 +55,6 @@
 // 
 CAutoLockSettingPage::~CAutoLockSettingPage()
 	{
-	delete iPopoutCba;
-	FeatureManager::UnInitializeLib();
 	}
 
 //
@@ -88,54 +65,7 @@
 // 
 void CAutoLockSettingPage::ProcessCommandL(TInt aCommandId)
 	{
-	TInt cur = ListBoxControl()->CurrentItemIndex();
-	// Respond to softkey events
-
-	switch (aCommandId)
-		{
-		case EAknSoftkeySelect:
-		case EAknSoftkeyOk:
-			// autolock off
-			if (cur == 0)
-				{
-				iAutoLockValue = 0;
-				if(iOriginalIndex == 0)
-				    { //User re-selected "Autolock off"; no use in changing lock setting
-				        AttemptExitL(EFalse);
-				    }
-				else
-				    {
-				        AttemptExitL(ETrue);
-				    }
-				
-				}
-			// user defined
-			if (cur == 1)
-				{
-				CAutolockQuery* dlg = new (ELeave) CAutolockQuery(iAutoLockValue);
-				dlg->PrepareLC(R_AUTOLOCK_TIME_QUERY);
-				if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ))
-				{
-				//set min and max values from SCP server to the dialog.
-				TInt minimum = 0;
-				if(iMaximum <= 0) //maximum value has not been defined; default value used instead.
-				    iMaximum = 1440;
-				dlg->SetMinimumAndMaximum(minimum, iMaximum);
-			}
-				if(dlg->RunLD())
-					{
-					AttemptExitL(ETrue);
-					}
-				else
-					AttemptExitL(EFalse);
-				}
-			break;
-
-		default:
-			CAknSettingPage::ProcessCommandL(aCommandId);
-			break;
-		}
-
+	
 	}
 //
 // ----------------------------------------------------------
@@ -145,10 +75,6 @@
 // 
 void CAutoLockSettingPage::SetPeriodMaximumValue(TInt aMaximumValue)
 	{
-	if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ))
-	{
-		iMaximum = aMaximumValue;
-}
 	}
 	
 //---------------------------------------------------------------------------------------
@@ -160,80 +86,6 @@
 
 void CAutoLockSettingPage::HandlePointerEventL(const TPointerEvent& aPointerEvent)
     {
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-        	TInt cur = ListBoxControl()->CurrentItemIndex();
-         	CAknRadioButtonSettingPage::HandlePointerEventL(aPointerEvent);
-         	//only take into account the "Up" event. Otherwise we'll end up having 2 dialogs.
-         	if(aPointerEvent.iType == TPointerEvent::EButton1Up)
-         	{
-
-         	    //only react to the event if the pen is actually inside the dialog.
-         	    if(ListBoxControl()->Rect().Contains(aPointerEvent.iPosition))
-         	        {
-         	            // autolock off
-        				if (cur == 0)
-        					{
-        					    iAutoLockValue = 0;
-        						if(iOriginalIndex == 0)
-                				    { //User re-selected "Autolock off"; no use in changing lock setting
-                				        AttemptExitL(EFalse);
-                				    }
-                				else
-                				    {
-                				        AttemptExitL(ETrue);
-                				    }
-        					}
-        				// user defined
-        				if (cur == 1)
-        					{
-        					CAutolockQuery* dlg = new (ELeave) CAutolockQuery(iAutoLockValue);
-						dlg->PrepareLC(R_AUTOLOCK_TIME_QUERY);
-					if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ))
-					{
-        					//set min and max values from SCP server to the dialog.
-        					TInt minimum = 0;			
-				          if(iMaximum <= 0) //maximum value has not been defined; default value used instead.
-				            iMaximum = 1440;        						
-        					dlg->SetMinimumAndMaximum(minimum, iMaximum);
-				}
-        					if(dlg->RunLD())
-        						{
-        						AttemptExitL(ETrue);
-        						}
-        					else
-        						AttemptExitL(EFalse);
-         	        }
-         		
-				}
-         	}
-        }
     }
-//
-// ---------------------------------------------------------
-// CAutolockQuery::CAutolockQuery()
-// 
-// ---------------------------------------------------------
-//
-CAutolockQuery::CAutolockQuery(TInt& aNumber,const TTone aTone)
-	: CAknNumberQueryDialog( aNumber, aTone)
-	{
-	}
-	
-//
-// ---------------------------------------------------------
-// CAutolockQuery::PreLayoutDynInitL()
-// 
-// ---------------------------------------------------------
-//
-void CAutolockQuery::PreLayoutDynInitL()
-	{
-	CAknNumberQueryDialog::PreLayoutDynInitL();
-	if (iNumber == 0)
-		{
-		MakeLeftSoftkeyVisible(EFalse);
-		}
-	}
-    
 // End of file