diff -r 890b5dd735f8 -r f15ac8e65a02 vtuis/videotelui/src/features/menu/cvtuimenuitemdimmeraction.cpp --- a/vtuis/videotelui/src/features/menu/cvtuimenuitemdimmeraction.cpp Thu Aug 19 09:57:36 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 2006 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: Menu item dimmer action class. -* -*/ - - -#include -#include - -#include "cvtuimenuitemdimmeraction.h" -#include "tvtuicmdvalidatorcallback.h" -#include "tvtuimenucommanditerator.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CVtUiMenuItemDimmerAction::NewL -// --------------------------------------------------------------------------- -// -CVtUiMenuItemDimmerAction* CVtUiMenuItemDimmerAction::NewL() - { - __VTPRINTENTER( "MenuDimAct.NewL" ) - CVtUiMenuItemDimmerAction* self = - new ( ELeave ) CVtUiMenuItemDimmerAction(); - __VTPRINTEXIT( "MenuDimAct.NewL" ) - return self; - } - -// --------------------------------------------------------------------------- -// CVtUiMenuItemDimmerAction::SetMenuPane -// --------------------------------------------------------------------------- -// -void CVtUiMenuItemDimmerAction::SetMenuPane( CEikMenuPane* aMenuPane ) - { - __VTPRINTENTER( "MenuDimAct.SetMenuPane" ) - iMenuPane = aMenuPane; - __VTPRINTEXIT( "MenuDimAct.SetMenuPane" ) - } - -// --------------------------------------------------------------------------- -// CVtUiMenuItemDimmerAction::ProcessL -// --------------------------------------------------------------------------- -// -void CVtUiMenuItemDimmerAction::ProcessL( - const MVtUiCmdValidatorCallBack& aCallBack ) - { - __VTPRINTENTER( "MenuDimAct.ProcessL" ) - - if ( iMenuPane ) - { - for ( TVtUiMenuCommandIterator i( *iMenuPane ); i.HasNext(); ) - { - TInt commandId( i.Next() ); - if ( !IsCommandHandled( commandId ) ) - { - if ( aCallBack.Call( commandId ) ) - { - CommandHandledL( commandId ); - SetItemDimmed( commandId ); - } - } - } - } - __VTPRINTEXIT( "MenuDimAct.ProcessL" ) - } - -// --------------------------------------------------------------------------- -// CVtUiMenuItemDimmerAction::EndProcess -// --------------------------------------------------------------------------- -// -void CVtUiMenuItemDimmerAction::EndProcess() - { - __VTPRINTENTER( "MenuDimAct.EndProcess" ) - iMenuPane = NULL; - __VTPRINTEXIT( "MenuDimAct.EndProcess" ) - } - -// --------------------------------------------------------------------------- -// CVtUiMenuItemDimmerAction::CVtUiMenuItemDimmerAction -// --------------------------------------------------------------------------- -// -CVtUiMenuItemDimmerAction::CVtUiMenuItemDimmerAction() - { - __VTPRINTENTER( "MenuDimAct.ctor" ) - __VTPRINTEXIT( "MenuDimAct.ctor" ) - } - -// --------------------------------------------------------------------------- -// CVtUiMenuItemDimmerAction::SetItemDimmed -// --------------------------------------------------------------------------- -// -void CVtUiMenuItemDimmerAction::SetItemDimmed( TInt aCommandId ) - { - __VTPRINTENTER( "MenuDimAct.SetItemDimmed" ) - iMenuPane->SetItemDimmed( aCommandId, ETrue ); - __VTPRINTEXIT( "MenuDimAct.SetItemDimmed" ) - } -