meetingrequest/mrgui/src/tnavipaneclearer.cpp
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2009 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:  ESMR UI Container class
       
    15 *
       
    16 */
       
    17 #include "tnavipaneclearer.h"
       
    18 
       
    19 #include <eikenv.h> // CEikonEnv
       
    20 #include <aknnavi.h> // CAknNavigationControlContainer
       
    21 #include <avkon.hrh> // EEikStatusPaneUidNavi
       
    22 #include <eikspane.h> // CEikStatusPane
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // TNavipaneClearer::TNavipaneClearer()
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 TNavipaneClearer::TNavipaneClearer()
       
    29 : iNaviContainer( NULL ), iFullyInitialized( EFalse )
       
    30     {
       
    31     CEikStatusPane* sp = 
       
    32             CEikonEnv::Static()->AppUiFactory()->StatusPane();// codescanner::eikonenvstatic
       
    33     // If this leaves we have to stick with the navi we have.
       
    34     TRAP_IGNORE( 
       
    35         {
       
    36         // Put default, empty Status Pane.
       
    37         // Otherwise view's status pane with dates would be shown.
       
    38         iNaviContainer = static_cast<CAknNavigationControlContainer *>
       
    39                         ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
       
    40         iNaviContainer->PushDefaultL();
       
    41         // If PushDefaultL leaves we know that then we can Pop the container 
       
    42         iFullyInitialized = ETrue;
       
    43         } );
       
    44     }
       
    45 
       
    46 // ---------------------------------------------------------------------------
       
    47 // TNavipaneClearer::~TNavipaneClearer()
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 TNavipaneClearer::~TNavipaneClearer()
       
    51     {
       
    52     // Remove default status pane
       
    53     if ( iNaviContainer && iFullyInitialized )
       
    54         {
       
    55         iNaviContainer->Pop();
       
    56         }    
       
    57     iNaviContainer = NULL; // not owned
       
    58     }
       
    59 
       
    60 // End of file
       
    61