diff -r 95243422089a -r 491b3ed49290 deviceencryption/DevEncUi/src/DevEncUiDecrView.cpp --- a/deviceencryption/DevEncUi/src/DevEncUiDecrView.cpp Thu Aug 19 09:42:45 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,203 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0"" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CDevEncUiDecrView. -* -*/ - -// INCLUDE FILES -// Class includes -#include "DevEncUiDecrView.h" - -// System includes -#include // CAknViewAppUi -#include - -// User includes -#include "DevEncLog.h" -#include "DevEnc.hrh" -#include "DevEncUiDecrViewContainer.h" -#include "DevEncUiMemoryEntity.h" - -// ================= MEMBER FUNCTIONS ======================= - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::CDevEncUiDecrView -// -// ----------------------------------------------------------------------------- -// -CDevEncUiDecrView::~CDevEncUiDecrView() - { - delete iContainer; - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::NewL -// -// ----------------------------------------------------------------------------- -// -CDevEncUiDecrView* CDevEncUiDecrView::NewL( RArray& aMemEntities ) - { - CDevEncUiDecrView* self = CDevEncUiDecrView::NewLC( aMemEntities ); - CleanupStack::Pop( self ); - return self; - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::NewLC -// -// ----------------------------------------------------------------------------- -// -CDevEncUiDecrView* CDevEncUiDecrView::NewLC( RArray& aMemEntities ) - { - CDevEncUiDecrView* self = new ( ELeave ) CDevEncUiDecrView( aMemEntities ); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::CDevEncUiDecrView -// -// ----------------------------------------------------------------------------- -// -CDevEncUiDecrView::CDevEncUiDecrView( RArray& aMemEntities ) - : iMemEntities( aMemEntities ) - { - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::Container -// -// ----------------------------------------------------------------------------- -// -CDevEncUiDecrViewContainer* CDevEncUiDecrView::Container() - { - return iContainer; - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::GetAppUi -// -// ----------------------------------------------------------------------------- -// -CDevEncUiAppUi& CDevEncUiDecrView::GetAppUi() - { - CAknViewAppUi* aknViewAppUi = AppUi(); - CDevEncUiAppUi* appUi = reinterpret_cast( aknViewAppUi ); - return ( *appUi ); - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::ConstructL -// -// ----------------------------------------------------------------------------- -// -void CDevEncUiDecrView::ConstructL() - { - BaseConstructL( R_DEVENCUI_DECRVIEW ); - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::Id -// -// ----------------------------------------------------------------------------- -// -TUid CDevEncUiDecrView::Id() const - { - return TUid::Uid( EDevEncUiDecrViewId ); - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::DoActivateL -// -// ----------------------------------------------------------------------------- -// -void CDevEncUiDecrView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - if ( !iContainer ) - { - iContainer = CDevEncUiDecrViewContainer::NewL( AppUi()->ClientRect(), - *this ); - iContainer->SetMopParent( this ); - AppUi()->AddToStackL( *this, iContainer ); - } - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::DoDeactivate -// -// ----------------------------------------------------------------------------- -// -void CDevEncUiDecrView::DoDeactivate() - { - if (iContainer) - { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; - } - } - -// ----------------------------------------------------------------------------- -// CDevEncUiDecrView::HandleCommandL -// -// ----------------------------------------------------------------------------- -// -void CDevEncUiDecrView::HandleCommandL( TInt aCommand ) - { - - switch ( aCommand ) - { - - case EAknSoftkeyBack: - { - AppUi()->HandleCommandL( EAknSoftkeyBack ); - break; - } - default: - { - AppUi()->HandleCommandL( aCommand ); - } - } - } - -// -------------------------------------------------------------------------- -// Called by the framework when the application status pane -// size is changed. Passes the new client rectangle to the container. -// -------------------------------------------------------------------------- -void CDevEncUiDecrView::HandleStatusPaneSizeChange() - { - if ( iContainer ) - { - iContainer->SetRect( ClientRect() ); - } - } - -void CDevEncUiDecrView::HandleResourceChangeL( TInt aType ) - { - if ( aType == KEikDynamicLayoutVariantSwitch ) - { - // do re-layout - if ( iContainer ) - { - iContainer->SetRect( ClientRect() ); - iContainer->HandleResourceChange( aType ); - } - } - } - - -// End of File