|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PBK2CONTACTVIEWDOUBLELISTBOXDATAELEMENT_H |
|
20 #define PBK2CONTACTVIEWDOUBLELISTBOXDATAELEMENT_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <pbk2contactuicontroldoublelistboxextension.h> |
|
25 #include <TPbk2IconId.h> |
|
26 |
|
27 //FORWARD |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Double listbox data element |
|
33 * this helper class implements MPbk2DoubleListboxDataElement interface |
|
34 */ |
|
35 NONSHARABLE_CLASS( CPbk2ContactViewDoubleListboxDataElement ) : |
|
36 public CBase, |
|
37 public MPbk2DoubleListboxDataElement |
|
38 { |
|
39 public: // constructor and destructor |
|
40 static CPbk2ContactViewDoubleListboxDataElement* NewLC(); |
|
41 ~CPbk2ContactViewDoubleListboxDataElement(); |
|
42 |
|
43 TPtr TextPtr( |
|
44 MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex) const; |
|
45 |
|
46 public: // from MPbk2DoubleListboxDataElement |
|
47 const TPbk2IconId& IconId( |
|
48 MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex ) const; |
|
49 const TDesC& Text( |
|
50 MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex ) const; |
|
51 TTextDataType TextType( |
|
52 MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex ) const; |
|
53 |
|
54 void SetIconId( |
|
55 MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex, |
|
56 const TPbk2IconId& aIconId ); |
|
57 void SetText( |
|
58 MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex, |
|
59 HBufC* aBuffer, |
|
60 MPbk2DoubleListboxDataElement::TTextDataType aType ); |
|
61 private: |
|
62 inline CPbk2ContactViewDoubleListboxDataElement(); |
|
63 inline void ConstructL(); |
|
64 |
|
65 private: |
|
66 TFixedArray<TPbk2IconId, 3> iIcons; |
|
67 TFixedArray<HBufC*, 2> iTexts; |
|
68 TFixedArray<TTextDataType, 2 > iTextType; |
|
69 /// Own |
|
70 HBufC* iEmptyBuffer; |
|
71 }; |
|
72 |
|
73 #endif // PBK2CONTACTVIEWDOUBLELISTBOXDATAELEMENT_H |
|
74 |
|
75 // End of File |