iaupdate/IAD/ui/inc/iaupdatehistorycontainer.h
branchRCL_3
changeset 25 7333d7932ef7
parent 24 5cc91383ab1e
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
     1 /*
       
     2 * Copyright (c) 2008 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:   This file contains the header file of the CIAUpdateHistoryContainer
       
    15 *                class 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef IA_UPDATE_HISTORY_CONTAINER_H
       
    22 #define IA_UPDATE_HISTORY_CONTAINER_H
       
    23 
       
    24 #include <coecntrl.h>
       
    25 
       
    26 class CAknDoubleGraphicStyleListBox;
       
    27 class MIAUpdateHistory;
       
    28 class MIAUpdateHistoryItem;
       
    29 
       
    30 
       
    31 /*! 
       
    32   @class CIAUpdateHistoryContainer
       
    33   
       
    34   @discussion 
       
    35   */
       
    36 class CIAUpdateHistoryContainer : public CCoeControl
       
    37     {
       
    38     
       
    39 public:
       
    40 
       
    41     /*!
       
    42       @function NewL
       
    43        
       
    44       @discussion Create a CIAUpdateHistoryContainer object, which will draw itself to aRect
       
    45       @param aRect the rectangle this view will be drawn to
       
    46       @result a pointer to the created instance of CIAUpdateHistoryContainer
       
    47       */
       
    48     static CIAUpdateHistoryContainer* NewL( const TRect& aRect );
       
    49 
       
    50     /*!
       
    51       @function NewLC
       
    52        
       
    53       @discussion Create a CIAUpdateHistoryContainer object, which will draw itself to aRect
       
    54       @param aRect the rectangle this view will be drawn to
       
    55       @result a pointer to the created instance of CIAUpdateHistoryContainer
       
    56       */
       
    57     static CIAUpdateHistoryContainer* NewLC( const TRect& aRect );
       
    58 
       
    59 
       
    60     /*!
       
    61       @function ~CIAUpdateHistoryContainer
       
    62       
       
    63       @discussion Destroy the object and release all memory objects
       
    64       */
       
    65      virtual ~CIAUpdateHistoryContainer();
       
    66 
       
    67 
       
    68     /*!
       
    69      * @function RefreshL
       
    70      *
       
    71      * @discussion Populate list box with the given nodes.
       
    72      * @param aHistory
       
    73      */
       
    74     void RefreshL( MIAUpdateHistory& aHistory );       
       
    75 
       
    76 
       
    77 private:  // from CCoeControl
       
    78 
       
    79     /*!
       
    80      * @function OfferKeyEventL
       
    81      *
       
    82      * @discussion Handle key events by forwarding them to the list box.
       
    83      * @param aKeyEvent The key event.
       
    84      * @param aType The event type.
       
    85      * @result Indicates whether or not the key event was used by this control. 
       
    86      */
       
    87     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    88 
       
    89      /*!
       
    90       * @see CCoeControl::SizeChanged
       
    91       */
       
    92      void SizeChanged();
       
    93 
       
    94      /*!
       
    95       * @see CCoeControl::CountComponentControls
       
    96       */
       
    97      TInt CountComponentControls() const;
       
    98 
       
    99      /*!
       
   100       *  @see CCoeControl::ComponentControl
       
   101       */
       
   102      CCoeControl* ComponentControl( TInt aIndex ) const;
       
   103      
       
   104      /**
       
   105      * Handles a resource relative event
       
   106      *
       
   107      * @param aType Event type
       
   108      */
       
   109      void HandleResourceChange( TInt aType );
       
   110   
       
   111 
       
   112 private:
       
   113 
       
   114     /*!
       
   115       @function ConstructL
       
   116       
       
   117       @discussion  Perform the second phase construction of a CIAUpdateHistoryContainer object
       
   118       @param aRect the rectangle this view will be drawn to
       
   119       */
       
   120     void ConstructL(const TRect& aRect);
       
   121 
       
   122     /*!
       
   123       @function CIAUpdateHistoryContainer
       
   124       
       
   125       @discussion Perform the first phase of two phase construction 
       
   126       */
       
   127     CIAUpdateHistoryContainer();
       
   128 
       
   129 
       
   130     // Creates the state description string.
       
   131     HBufC* NodeStateDescriptionLC( const MIAUpdateHistoryItem& aItem );
       
   132     
       
   133 
       
   134 private: // Data
       
   135 
       
   136     CDesCArray* iItemTextArray;
       
   137     CAknDoubleGraphicStyleListBox* iListBox;
       
   138 
       
   139     };
       
   140 
       
   141 
       
   142 #endif // IA_UPDATE_HISTORY_CONTAINER_H