securitydialogs/lockapp/src/lockapplockednote.cpp
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Sleeping note with timeout and a reference flag that informs
       
    15  *                the parent when the note is visible
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 #include "lockapplockednote.h"
       
    21 
       
    22 // ---------------------------------------------------------------------------
       
    23 // Construction passes the parent implementing command observer interface
       
    24 // and a reference to variable that is true if note with timeout is shown,
       
    25 // false if not
       
    26 // ---------------------------------------------------------------------------
       
    27 CLockAppLockedNote::CLockAppLockedNote( MEikCommandObserver* aCommandObserver ) :
       
    28 	CLockAppSleepingNote(aCommandObserver)
       
    29 	{
       
    30 	// no implementation required
       
    31 	}
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 // In destruction set reference value (is note shown) to not true.
       
    35 // ---------------------------------------------------------------------------
       
    36 CLockAppLockedNote::~CLockAppLockedNote( )
       
    37 	{
       
    38 	}
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // Method to cancel note from screen.
       
    42 // ---------------------------------------------------------------------------
       
    43 void CLockAppLockedNote::CancelNote( )
       
    44 	{
       
    45 	ExitSleepingDialog( );
       
    46 	}
       
    47 
       
    48 // ---------------------------------------------------------------------------
       
    49 // Inform the command observer (parent) about the focus lost event.
       
    50 // ---------------------------------------------------------------------------
       
    51 void CLockAppLockedNote::FocusChanged( TDrawNow /*aDrawNow*/)
       
    52 	{
       
    53 	if ( !IsFocused( ) && iCommandObserver )
       
    54 		{
       
    55 		TRAP_IGNORE(iCommandObserver->ProcessCommandL(KNoteCmdFocusLost))
       
    56 		}
       
    57 	}