uiservicetab/vimpstui/src/cvimpstuisinglelistboxarray.cpp
branchRCL_3
changeset 9 9fdee5e1da30
parent 0 5e5d6b214f4f
equal deleted inserted replaced
8:796276a1bdcc 9:9fdee5e1da30
    30 #include    <StringLoader.h>
    30 #include    <StringLoader.h>
    31 #include    <AknIconUtils.h>
    31 #include    <AknIconUtils.h>
    32 #include    <AknIconArray.h>
    32 #include    <AknIconArray.h>
    33 #include    <eikclbd.h>
    33 #include    <eikclbd.h>
    34 #include    <AknsConstants.h>
    34 #include    <AknsConstants.h>
       
    35 #include "uiservicetabtracer.h"
    35 
    36 
    36 #include    <vimpstui.mbg>
    37 #include    <vimpstui.mbg>
    37 
    38 
    38 // ================= MEMBER FUNCTIONS =======================
    39 // ================= MEMBER FUNCTIONS =======================
    39 
    40 
    41 CVIMPSTUiSingleListboxArray* CVIMPSTUiSingleListboxArray::NewL(MVIMPSTProcessArray& aItemModel,
    42 CVIMPSTUiSingleListboxArray* CVIMPSTUiSingleListboxArray::NewL(MVIMPSTProcessArray& aItemModel,
    42 							            CColumnListBoxData* aListboxData,
    43 							            CColumnListBoxData* aListboxData,
    43 							            CVIMPSTUiSingleStyleListBox& aListBox
    44 							            CVIMPSTUiSingleStyleListBox& aListBox
    44 							            )
    45 							            )
    45     {
    46     {
       
    47 	TRACER_AUTO;
    46     CVIMPSTUiSingleListboxArray* self = new (ELeave) CVIMPSTUiSingleListboxArray( aItemModel, 
    48     CVIMPSTUiSingleListboxArray* self = new (ELeave) CVIMPSTUiSingleListboxArray( aItemModel, 
    47     								aListboxData, aListBox);
    49     								aListboxData, aListBox);
    48     								
    50     								
    49     CleanupStack::PushL( self );
    51     CleanupStack::PushL( self );
    50     self->ConstructL();
    52     self->ConstructL();
    71     }
    73     }
    72 
    74 
    73 // Symbian OS default constructor can leave.
    75 // Symbian OS default constructor can leave.
    74 void CVIMPSTUiSingleListboxArray::ConstructL()
    76 void CVIMPSTUiSingleListboxArray::ConstructL()
    75 	{
    77 	{
    76 	
    78 	TRACER_AUTO;
    77 	 // maximum length of icons appended to identification
    79 	 // maximum length of icons appended to identification
    78     // There can be four icons (A+B and two on D-column)
    80     // There can be four icons (A+B and two on D-column)
    79     iMaxLengthOfIcons =
    81     iMaxLengthOfIcons =
    80         KContactOnlineIconA().Length()+  // longest A-Column icon
    82         KContactOnlineIconA().Length()+  // longest A-Column icon
    81         KEmptyIconC().Length() + // longest C-column icon
    83         KEmptyIconC().Length() + // longest C-column icon
   105 // (other items were commented in a header).
   107 // (other items were commented in a header).
   106 // ---------------------------------------------------------
   108 // ---------------------------------------------------------
   107 //
   109 //
   108 TPtrC16 CVIMPSTUiSingleListboxArray::MdcaPoint( TInt aIndex ) const
   110 TPtrC16 CVIMPSTUiSingleListboxArray::MdcaPoint( TInt aIndex ) const
   109 	{
   111 	{
       
   112 	TRACER_AUTO;
   110 	// Although this is a const method, we do change the member data.
   113 	// Although this is a const method, we do change the member data.
   111 	// This is done because of performance
   114 	// This is done because of performance
   112 	// -> no need to create new buffer every time.
   115 	// -> no need to create new buffer every time.
   113     TPtr dataPtr( iData->Des() );
   116     TPtr dataPtr( iData->Des() );
   114     dataPtr.Zero();
   117     dataPtr.Zero();
   144 //
   147 //
   145 void CVIMPSTUiSingleListboxArray::AppendContactL( TPtr& aBuffer,
   148 void CVIMPSTUiSingleListboxArray::AppendContactL( TPtr& aBuffer,
   146                                       TInt aIndex
   149                                       TInt aIndex
   147                                       ) const
   150                                       ) const
   148     {
   151     {
       
   152 	TRACER_AUTO;
   149     // A-column
   153     // A-column
   150      aBuffer.Append( KEmptyIconA );
   154      aBuffer.Append( KEmptyIconA );
   151     // B-column
   155     // B-column
   152      TPtrC identification(iItemArray.GetItemNameText(aIndex) );
   156      TPtrC identification(iItemArray.GetItemNameText(aIndex) );
   153      aBuffer.Append( identification.Left(KFriendsListMaxIdentificationLength) );
   157      aBuffer.Append( identification.Left(KFriendsListMaxIdentificationLength) );