phonebookui/Phonebook2/UIControls/inc/pbk2contactviewdoublelistboxdataelement.h
branchRCL_3
changeset 17 2666d9724c76
parent 11 2828b4d142c0
equal deleted inserted replaced
15:34879f5cfc63 17:2666d9724c76
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <pbk2contactuicontroldoublelistboxextension.h>
    24 #include <pbk2contactuicontroldoublelistboxextension.h>
    25 #include <TPbk2IconId.h>
    25 #include <TPbk2IconId.h>
    26 
    26 
    27 //FORWARD
    27 //FORWARD
    28 class MVPbkContactLink;
       
    29 
    28 
    30 // CLASS DECLARATION
    29 // CLASS DECLARATION
    31 
    30 
    32 /**
    31 /**
    33  * Double listbox data element
    32  * Double listbox data element
    36 NONSHARABLE_CLASS( CPbk2ContactViewDoubleListboxDataElement ) :
    35 NONSHARABLE_CLASS( CPbk2ContactViewDoubleListboxDataElement ) :
    37         public CBase,
    36         public CBase,
    38         public MPbk2DoubleListboxDataElement
    37         public MPbk2DoubleListboxDataElement
    39     {
    38     {
    40 public: // constructor and destructor
    39 public: // constructor and destructor
    41     static CPbk2ContactViewDoubleListboxDataElement* NewL(
    40     static CPbk2ContactViewDoubleListboxDataElement* NewLC();
    42             MVPbkContactLink* aLink = NULL,
       
    43             TInt aListIndex = KErrNotFound );
       
    44     ~CPbk2ContactViewDoubleListboxDataElement();
    41     ~CPbk2ContactViewDoubleListboxDataElement();
    45 
    42 
    46     TPtr TextPtr(
    43     TPtr TextPtr(
    47             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex) const;
    44             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex) const;
    48     inline const MVPbkContactLink* ContactLink();
       
    49     inline TInt ListIndex();
       
    50     
    45     
    51 public: // from MPbk2DoubleListboxDataElement
    46 public: // from MPbk2DoubleListboxDataElement
    52     const TPbk2IconId& IconId( 
    47     const TPbk2IconId& IconId( 
    53             MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex ) const;
    48             MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex ) const;
    54     const TDesC& Text( 
    49     const TDesC& Text( 
    62     void SetText( 
    57     void SetText( 
    63             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex, 
    58             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex, 
    64             HBufC* aBuffer,
    59             HBufC* aBuffer,
    65             MPbk2DoubleListboxDataElement::TTextDataType aType );
    60             MPbk2DoubleListboxDataElement::TTextDataType aType );
    66 private:
    61 private:
    67     inline CPbk2ContactViewDoubleListboxDataElement(TInt aListIndex);
    62     inline CPbk2ContactViewDoubleListboxDataElement();
    68     inline void ConstructL();
    63     inline void ConstructL();
    69 
    64 
    70 private:
    65 private:
    71     TFixedArray<TPbk2IconId, 3> iIcons;
    66     TFixedArray<TPbk2IconId, 3> iIcons;
    72     TFixedArray<HBufC*, 2> iTexts;
    67     TFixedArray<HBufC*, 2> iTexts;
    73     TFixedArray<TTextDataType, 2 > iTextType;
    68     TFixedArray<TTextDataType, 2 > iTextType;
    74     /// Own
    69     /// Own
    75     HBufC* iEmptyBuffer;
    70     HBufC* iEmptyBuffer;
    76     /// Own: for data cache
       
    77     MVPbkContactLink* iLink;
       
    78     /// for data cache
       
    79     TInt iListIndex;
       
    80     };
    71     };
    81 
       
    82 inline const MVPbkContactLink* 
       
    83 CPbk2ContactViewDoubleListboxDataElement::ContactLink()
       
    84     {
       
    85     return iLink;
       
    86     }
       
    87 
       
    88 inline TInt CPbk2ContactViewDoubleListboxDataElement::ListIndex()
       
    89     {
       
    90     return iListIndex;
       
    91     }
       
    92 
       
    93 
    72 
    94 #endif // PBK2CONTACTVIEWDOUBLELISTBOXDATAELEMENT_H
    73 #endif // PBK2CONTACTVIEWDOUBLELISTBOXDATAELEMENT_H
    95 
    74 
    96 // End of File
    75 // End of File