locationlandmarksrefappfors60/Inc/LandmarksAppUi.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2004-2005 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:  
       
    15 *     See class description below
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __LANDMARKS_APPUI_H__
       
    21 #define __LANDMARKS_APPUI_H__
       
    22 
       
    23 
       
    24 #include "LandmarksOperationObserver.h"
       
    25 #include <aknViewAppUi.h>
       
    26 #include <AknProgressDialog.h>
       
    27 #include <AknTabObserver.h> 
       
    28 
       
    29 
       
    30 class CLandmarksApplicationEngine;
       
    31 class CLandmarksCategoriesView;
       
    32 class CAknNavigationDecorator;
       
    33 class CLandmarksListView;
       
    34 class CAknProgressDialog;
       
    35 
       
    36 class CLandmarksAppUi : 
       
    37     public CAknViewAppUi, 
       
    38     public MLandmarksOperationObserver, 
       
    39     public MAknTabObserver,
       
    40     public MProgressDialogCallback
       
    41     {
       
    42     public:
       
    43         CLandmarksAppUi();
       
    44         void ConstructL();
       
    45         ~CLandmarksAppUi();
       
    46         
       
    47     public: // from CAknViewAppUi
       
    48 
       
    49         void HandleCommandL(TInt aCommand);
       
    50 
       
    51         TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
       
    52         
       
    53         void HandleResourceChangeL( TInt aType );
       
    54 
       
    55     public: // from MLandmarksOperationObserver
       
    56 
       
    57         /**
       
    58         * NotifyOperationProgressL notifies the progress and status of an
       
    59         * asynchronous operation.
       
    60         *  
       
    61         * @param aOperation the type of operation that is reported.
       
    62         * @param aProgress the progress of the operation.
       
    63         * @param aErrorCode the status of the operation.
       
    64         */
       
    65         void NotifyOperationProgressL(
       
    66             TOperation aOperation, 
       
    67             TInt aProgress, 
       
    68             TInt aErrorCode);
       
    69 
       
    70     public: // from MAknTabObserver
       
    71         
       
    72         /** Called by NaviDecorator when tab is changed
       
    73         * @param aIndex new tab seleected
       
    74         */
       
    75         void TabChangedL(TInt aIndex);
       
    76 
       
    77     public: // from MProgressDialogCallback
       
    78 
       
    79         /**
       
    80         * Called when the dialog has been dismissed.
       
    81         * 
       
    82         * @param aButtonId the button that was pressed to dismiss the dialog.
       
    83         */
       
    84         void DialogDismissedL(TInt aButtonId);
       
    85 
       
    86     private:
       
    87 
       
    88         /**
       
    89         * Performs the construction phase of this object that is dependent 
       
    90         * that the application engine is initialized.
       
    91         */
       
    92         void PostConstructL();
       
    93 
       
    94         /**
       
    95         * Launches a progress dialog displayed when the default landmark 
       
    96         * database is initialized.
       
    97         */
       
    98         void LaunchProgressDialogL();
       
    99 
       
   100     private: // Data
       
   101 
       
   102         //! decorates the navi pane (with navigation arrows etc)
       
   103         CAknNavigationDecorator* iNaviDecorator;
       
   104 
       
   105         //! the application engine
       
   106         CLandmarksApplicationEngine* iEngine;
       
   107 
       
   108         /** displays a progress bar when initializing the 
       
   109             default landmark database. */
       
   110         CAknProgressDialog* iProgressDialog;
       
   111 
       
   112         /** indicates if exit has been pressed before the 
       
   113             progressDialog is fully deleted */
       
   114         TBool iDelayedExit;
       
   115         
       
   116     };
       
   117 
       
   118 #endif // __LANDMARKS_APPUI_H__
       
   119