logsui/AppSrc/CLogsDetailView.h
changeset 0 e686773b3f54
child 68 9da50d567e3c
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 *     Logs application "Detail" view
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef     __Logs_App_CLogsDetailView_H__
       
    21 #define     __Logs_App_CLogsDetailView_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CLogsBaseView.h"
       
    25 #include "MLogsObserver.h"
       
    26 #include "LogsEng.hrh"
       
    27 
       
    28 #include <aknnavide.h>
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // MACROS
       
    33 
       
    34 // DATA TYPES
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CLogsDetailControlContainer;
       
    40 class CEikListBox;
       
    41 class TListBoxEvent;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46  * Logs application "Detail" view class implementation.
       
    47  * This view show the details of the selected event.
       
    48  */
       
    49 class   CLogsDetailView :   public CLogsBaseView,
       
    50                             public MAknNaviDecoratorObserver
       
    51     {
       
    52     public:  // interface
       
    53         /**
       
    54          *  Standard creation function. Creates and returns a new object
       
    55          *  of this class.
       
    56          *
       
    57          *  @return The new view object.
       
    58          */
       
    59         static CLogsDetailView* NewL();
       
    60         /**
       
    61          *  Destructor.
       
    62          */
       
    63         ~CLogsDetailView();
       
    64     
       
    65     public:  // from CAknView
       
    66         /**
       
    67          *  Framework calls to init menu items.
       
    68          *
       
    69          *  @param aResourceId   resource read
       
    70          *  @param aMenuPane     menu pane
       
    71          */ 
       
    72         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    73         
       
    74         /**
       
    75          *  If touch support is on, we handle the touch related events here.
       
    76          *  
       
    77          *  @param aListBox    the listbox reference
       
    78          *  @param aEventType  the listbox event 
       
    79          */
       
    80         void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);     
       
    81 
       
    82     private:  // from CAknView
       
    83         /**
       
    84          * Returns the ID of the view.
       
    85          * @return view id
       
    86          */
       
    87         TUid Id() const;
       
    88 
       
    89         /**
       
    90          *  HandleClientRectChange. Called by the framework the view rectangle
       
    91          *  changes
       
    92          */
       
    93         void HandleClientRectChange();
       
    94 
       
    95         /**
       
    96          *  Called by the framework when this view is activated.
       
    97          *
       
    98          *  @param aPrevViewId      This is ID for previous view.
       
    99          *  @param aCustomMessageId ID of the custom message. Not used.
       
   100          *  @param aCustomMessage   custom message. Not used.
       
   101          */
       
   102         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   103                           TUid aCustomMessageId,
       
   104                           const TDesC8& aCustomMessage );
       
   105 
       
   106         /**
       
   107          *  Called by the framework when this view is deactivated.
       
   108          */
       
   109         void DoDeactivate();
       
   110 
       
   111        /**
       
   112         * Early detection of view activation.
       
   113         * Overrides the baseclass implementation calls CAknView::ViewActivatedL().
       
   114         * 
       
   115         * @param aPrevViewId Specifies the view previously active.
       
   116         * @param aCustomMessageId Specifies the message type.
       
   117         * @param aCustomMessage Activation message.
       
   118         */ 
       
   119         void ViewActivatedL(const TVwsViewId& aPrevViewId,
       
   120                                    TUid aCustomMessageId,
       
   121                                    const TDesC8& aCustomMessage);
       
   122                
       
   123        /**
       
   124         * Early detection of view activation.
       
   125         * Overrides the baseclass implementation calls CAknView::ViewDeactivated().
       
   126         */
       
   127         void ViewDeactivated();
       
   128 
       
   129 
       
   130     public: // from MEikCommandObserver
       
   131         /**
       
   132          *  View specific command handler.
       
   133          *
       
   134          *  @param aCommandId This is an id for command.
       
   135          *                    Most of the commands are forwarded to LogAppUI.
       
   136          */
       
   137         void HandleCommandL( TInt aCommand );
       
   138 
       
   139 
       
   140     public: // from MLogsKeyProcessor
       
   141         TBool ProcessKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
   142 	
       
   143  		/**
       
   144          * Overrides the baseclass handler
       
   145          * 
       
   146          * @param aIndex	The index of the item tapped
       
   147          */ 
       
   148         void ProcessPointerEventL(TInt aIndex);
       
   149         
       
   150     public: // from MAknNaviDecoratorObserver     
       
   151         /**
       
   152          * Handler for pointer events, when the Navi Pane arrows have been tapped
       
   153          *
       
   154          * @param aEventID  The enum indicating wether right or left arrow was tapped
       
   155          */
       
   156         void HandleNaviDecoratorEventL( TInt aEventID ); 
       
   157 
       
   158     public: // from MLogsModelObserver
       
   159         void StateChangedL( MLogsStateHolder* aHolder ); 
       
   160 
       
   161     
       
   162     public: // Command handlers (use "Cmd" prefix)
       
   163 
       
   164         /**
       
   165          *  Command handler: Open the context sensive menu.
       
   166          */
       
   167         void CmdContextMenuL();
       
   168 
       
   169         /**
       
   170          * Show the next event's details.
       
   171          */
       
   172         void CmdNextEventL();
       
   173 
       
   174         /**
       
   175          * Show the previous event's details.
       
   176          */
       
   177         void CmdPreviousEventL();
       
   178         
       
   179         /**
       
   180          * Restore original Logs title pane text according to current view.
       
   181          */
       
   182         void ChangeTitlePaneTextToDefaultL();
       
   183 
       
   184 
       
   185     private:  // operations
       
   186         /**
       
   187          *  Constructor, second phase. 
       
   188          */
       
   189         void ConstructL();
       
   190 
       
   191         /**
       
   192          *  Show 1.5 second long confirmation note to the user.
       
   193          */
       
   194         void PopUpNoteL();
       
   195         
       
   196        /**
       
   197         * Draws the listbox.
       
   198         */
       
   199         void DrawComponents();
       
   200 
       
   201         /**
       
   202          * Sets all menu items item specific property.
       
   203          * 
       
   204          * @param aMenuPane Pointer to menu pane.
       
   205          * @param aItemSpecific ETrue if command should be item specific.
       
   206          * EFalse otherwise.
       
   207          */
       
   208         void SetMenuItemsItemSpecificProperty(
       
   209                 CEikMenuPane* aMenuPane, TBool aItemSpecific );
       
   210 
       
   211     private:  // data
       
   212 
       
   213         /// Own: This view's control container.
       
   214         CLogsDetailControlContainer* iContainer;
       
   215 
       
   216         /// Own:
       
   217         TLogsState iState;   
       
   218     };
       
   219 
       
   220 
       
   221 #endif  // __Logs_App_CLogsDetailView_H__
       
   222 
       
   223 
       
   224 // End of File
       
   225