--- a/securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp Thu Aug 19 10:45:23 2010 +0300
+++ b/securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp Tue Aug 31 16:04: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,9 +45,6 @@
//
void CAutoLockSettingPage::ConstructL()
{
- CAknRadioButtonSettingPage::ConstructL();
- const TSize screenSize = iCoeEnv->ScreenDevice()->SizeInPixels();
- FeatureManager::InitializeLibL();
}
//
@@ -74,7 +55,6 @@
//
CAutoLockSettingPage::~CAutoLockSettingPage()
{
- FeatureManager::UnInitializeLib();
}
//
@@ -85,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;
- }
-
+
}
//
// ----------------------------------------------------------
@@ -142,10 +75,6 @@
//
void CAutoLockSettingPage::SetPeriodMaximumValue(TInt aMaximumValue)
{
- if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ))
- {
- iMaximum = aMaximumValue;
-}
}
//---------------------------------------------------------------------------------------
@@ -157,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