videocollection/hgmyvideos/inc/vcxhgmyvideoscategorylistimpl.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     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 the License "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:      Implementation of UI functionality for category list.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXHGMYVIDEOSCATEGORYLISTIMPL_H
       
    21 #define VCXHGMYVIDEOSCATEGORYLISTIMPL_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <ganes/HgSelectionObserverIface.h> 
       
    25 #include "vcxhgmyvideoslistbase.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CVcxHgMyVideosCategoryModelHandler;
       
    29 class CVcxHgMyVideosModel;
       
    30 class CVcxHgMyVideosMainView;
       
    31 class CHgScroller;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  * Implementation of UI functionality for category list.
       
    37  * 
       
    38  * @lib vcxhgmyvideos.lib
       
    39  */
       
    40 NONSHARABLE_CLASS( CVcxHgMyVideosCategoryListImpl ) : public CVcxHgMyVideosListBase,
       
    41                                                       public MHgSelectionObserver
       
    42     {
       
    43     public:
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          *
       
    48          * @param aModel Component model
       
    49          * @param aView Component view
       
    50          * @param aScroller Hg list control
       
    51          * @return Pointer to newly created instance
       
    52          */
       
    53         static CVcxHgMyVideosCategoryListImpl* NewL(
       
    54             CVcxHgMyVideosModel& aModel,
       
    55             CVcxHgMyVideosMainView& aView,
       
    56             CHgScroller& aScroller );
       
    57 
       
    58         /**
       
    59          * Two-phased constructor.
       
    60          *
       
    61          * @param aModel Component model 
       
    62          * @param aView Component view
       
    63          * @param aScroller Hg list control
       
    64          * @return Pointer to newly created instance
       
    65          */
       
    66         static CVcxHgMyVideosCategoryListImpl* NewLC(
       
    67             CVcxHgMyVideosModel& aModel,
       
    68             CVcxHgMyVideosMainView& aView,
       
    69             CHgScroller& aScroller );
       
    70     
       
    71         /**
       
    72         * Destructor.
       
    73         */
       
    74         virtual ~CVcxHgMyVideosCategoryListImpl();
       
    75 
       
    76         /**
       
    77          * Activate
       
    78          * 
       
    79          * @param aIndex Index of video list to activate.
       
    80          */
       
    81         void DoListActivateL( TInt aIndex = KErrNotFound );
       
    82 
       
    83         /**
       
    84          * Deactivate
       
    85          */
       
    86         void DoListDeactivate();
       
    87 
       
    88         /**
       
    89          * Gets list highlight.
       
    90          * 
       
    91          * @return Highlight.
       
    92          */
       
    93         TInt Highlight();     
       
    94 
       
    95     public: // From MHgSelectionObserver
       
    96         
       
    97         /**
       
    98          * Handle selection.
       
    99          * 
       
   100          * @param aIndex Selected item index.
       
   101          */
       
   102         void HandleSelectL( TInt aIndex );
       
   103         
       
   104         /**
       
   105          * Handle opening.
       
   106          * 
       
   107          * @param aIndex Opened item index.
       
   108          */
       
   109         void HandleOpenL( TInt aIndex );
       
   110         
       
   111     protected:    
       
   112 
       
   113         /**
       
   114          * Default constructor
       
   115          *
       
   116          * @param aModel Component model
       
   117          * @param aView Component view
       
   118          * @param aScroller Hg list control
       
   119          */
       
   120         CVcxHgMyVideosCategoryListImpl( CVcxHgMyVideosModel& iModel,
       
   121                                         CVcxHgMyVideosMainView& aView,
       
   122                                         CHgScroller& aScroller );
       
   123     
       
   124         /**
       
   125          * 2nd phase constructor.
       
   126          */
       
   127         void ConstructL();
       
   128 
       
   129         /**
       
   130          * Set empty list text for list control. 
       
   131          */
       
   132         void SetEmptyListTextL();
       
   133 
       
   134         /**
       
   135          * Set title text for view.
       
   136          * 
       
   137          * @param aIndex Index of active video list.
       
   138          */
       
   139         void SetTitleTextL( TInt aIndex );
       
   140 
       
   141     protected:
       
   142 
       
   143         /**
       
   144          * Category model handler.
       
   145          * Own.
       
   146          */
       
   147         CVcxHgMyVideosCategoryModelHandler* iCategoryModel;
       
   148     };
       
   149 
       
   150 #endif // VCXHGMYVIDEOSCATEGORYLISTIMPL_H