phonebookui/Phonebook2/UIControls/inc/cpbk2contactviewdoublelistboxmodel.h
changeset 0 e686773b3f54
child 32 2828b4d142c0
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2009-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:  Phonebook 2 contact view double list box model.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2CONTACTVIEWDOUBLELISTBOXMODEL_H
       
    20 #define CPBK2CONTACTVIEWDOUBLELISTBOXMODEL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "CPbk2ContactViewListBoxModel.h"
       
    24 
       
    25 //FORWARD
       
    26 class CPbk2ThumbnailManager;
       
    27 class MPbk2ContactUiControlDoubleListboxExtension;
       
    28 class CPbk2ContactViewDoubleListboxDataElement;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Phonebook 2 contact view double list box model.
       
    34  */
       
    35 NONSHARABLE_CLASS(CPbk2ContactViewDoubleListBoxModel) :
       
    36     public CPbk2ContactViewListBoxModel
       
    37     {
       
    38 public:  // Constructors and destructor
       
    39 
       
    40     /**
       
    41      * Creates a new instance of this class.
       
    42      *
       
    43      * @param aParams   Parameters for the model.
       
    44      * @return  A new instance of this class.
       
    45      */
       
    46      static CPbk2ContactViewDoubleListBoxModel* NewL(
       
    47             CPbk2ContactViewListBoxModel::TParams& aParams,
       
    48             CPbk2ThumbnailManager& aThumbManager );
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     ~CPbk2ContactViewDoubleListBoxModel();
       
    54 
       
    55     
       
    56     
       
    57 protected:
       
    58     
       
    59     /**
       
    60      * Constructor
       
    61      */
       
    62     CPbk2ContactViewDoubleListBoxModel(
       
    63         CPbk2ContactViewListBoxModel::TParams& aParams,
       
    64         CPbk2ThumbnailManager& aThumbManager );
       
    65 
       
    66 protected: // new 
       
    67     
       
    68     /**
       
    69      * Format whole line buffer based on aElement's content.
       
    70      * 
       
    71      * @param aElement data element which stores the line content 
       
    72      */
       
    73     void FormatBufferFromElement(
       
    74         const CPbk2ContactViewDoubleListboxDataElement& aElement ) const;
       
    75     
       
    76     /**
       
    77      * Append text into line buffer with trailing tab character. Removes 
       
    78      * illegal characters from the aText before appending. aText is subject to
       
    79      * modifications during this call.
       
    80      * 
       
    81      * @param aText text to append into line buffer 
       
    82      */
       
    83     void AppendText( TDes& aText ) const;
       
    84     
       
    85     /*
       
    86      * Appends icon index with trailing tab character if it's found from the icon array
       
    87      * 
       
    88      * @param aIconId 	Id of the icon in icon array
       
    89      */
       
    90     void AppendIconIndexIfFound(  const TPbk2IconId& aIconId ) const;
       
    91         
       
    92 public: // From CPbk2ContactViewListBoxModel
       
    93     
       
    94     /// See CPbk2ContactViewListBoxModel
       
    95     void FormatBufferForContactL(
       
    96         const MVPbkViewContact& aViewContact, 
       
    97         TInt aIndex ) const;
       
    98     
       
    99 private:	//data
       
   100 	
       
   101 	//REF:	thumbnail manager
       
   102 	CPbk2ThumbnailManager& iThumbManager;
       
   103     
       
   104 	/// Ref
       
   105 	MPbk2ContactUiControlDoubleListboxExtension* iDoubleListExtensionPoint;
       
   106 	
       
   107     };
       
   108 
       
   109 #endif // CPBK2CONTACTVIEWDOUBLELISTBOXMODEL_H
       
   110 
       
   111 // End of File