|
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. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2CONTACTVIEWDOUBLELISTBOX_H |
|
20 #define CPBK2CONTACTVIEWDOUBLELISTBOX_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "CPbk2ContactViewListBox.h" |
|
24 |
|
25 #include "CPbk2ThumbnailManager.h" |
|
26 #include "CPbk2ContactViewListBoxModel.h" // params |
|
27 //FORWARD |
|
28 class MVPbkContactViewBase; |
|
29 class CCoeControl; |
|
30 |
|
31 |
|
32 |
|
33 /** |
|
34 * Phonebook 2 contact view double list box. |
|
35 */ |
|
36 NONSHARABLE_CLASS(CPbk2ContactViewDoubleListBox) : public CPbk2ContactViewListBox, |
|
37 public MPbk2ThumbnailManagerObserver |
|
38 { |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Creates a new instance of this class. |
|
44 * |
|
45 * @param aContainer The control container for this control. |
|
46 * @param aResourceReader Resource reader used to construct |
|
47 * this object. |
|
48 * @param aManager Reference to contact manager. |
|
49 * @param aView Reference to contact view. |
|
50 * @param aNameFormatter Reference to the name formatter. |
|
51 * @param aStoreProperties Store property array. |
|
52 * @param aUiExtension UI extension. |
|
53 * @param aSearchFilter PBk2 Search Filter |
|
54 * @param aThumbManager Thumbnail manager for the listbox |
|
55 * @return A new instance of this class. |
|
56 */ |
|
57 static CPbk2ContactViewDoubleListBox* NewL( |
|
58 CCoeControl& aContainer, |
|
59 TResourceReader& aResourceReader, |
|
60 const CVPbkContactManager& aManager, |
|
61 MVPbkContactViewBase& aView, |
|
62 MPbk2ContactNameFormatter& aNameFormatter, |
|
63 CPbk2StorePropertyArray& aStoreProperties, |
|
64 MPbk2ContactUiControlExtension* aUiExtension, |
|
65 CPbk2PredictiveSearchFilter& aSearchFilter, |
|
66 CPbk2ThumbnailManager& aThumbManager ); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 ~CPbk2ContactViewDoubleListBox(); |
|
72 |
|
73 private: // from MPbk2ThumbnailManagerObserver |
|
74 void LoadingFinished(); |
|
75 |
|
76 void ThumbnailLoadingComplete( TInt aError, TInt aIndex ); |
|
77 |
|
78 void ThumbnailRemoved( const MVPbkContactLink& aLink, TInt aIndex ); |
|
79 |
|
80 public: // From CEikListBox |
|
81 |
|
82 void SizeChanged(); |
|
83 |
|
84 |
|
85 protected: // Implementation |
|
86 |
|
87 /** |
|
88 * Constructor |
|
89 */ |
|
90 CPbk2ContactViewDoubleListBox( |
|
91 CCoeControl& aContainer, |
|
92 MPbk2ContactUiControlExtension* aUiExtension, |
|
93 CPbk2PredictiveSearchFilter& aSearchFilter, |
|
94 MVPbkContactViewBase& aView, |
|
95 CPbk2ThumbnailManager& aThumbManager ); //TODO |
|
96 |
|
97 /* |
|
98 * Constructor |
|
99 */ |
|
100 void ConstructL( |
|
101 CCoeControl& aContainer, |
|
102 TResourceReader& aResourceReader, |
|
103 const CVPbkContactManager& aManager, |
|
104 MVPbkContactViewBase& aView, |
|
105 MPbk2ContactNameFormatter& aNameFormatter, |
|
106 CPbk2StorePropertyArray& aStoreProperties ); |
|
107 |
|
108 CPbk2ContactViewListBoxModel* DoCreateModelL( |
|
109 CPbk2ContactViewListBoxModel::TParams params ); |
|
110 |
|
111 CPbk2ListboxModelCmdDecorator* DoCreateDecoratorL( |
|
112 const CPbk2IconArray& aIconArray, |
|
113 TPbk2IconId aEmptyIconId, |
|
114 TPbk2IconId aDefaultIconId ); |
|
115 |
|
116 /** |
|
117 * TODO: write description |
|
118 */ |
|
119 void SizeChangedL(); |
|
120 |
|
121 |
|
122 private: //data |
|
123 //REF: View TODO |
|
124 MVPbkContactViewBase& iView; |
|
125 //REF: thumbnail manager |
|
126 CPbk2ThumbnailManager& iThumbManager; |
|
127 }; |
|
128 |
|
129 #endif // CPBK2CONTACTVIEWDOUBLELISTBOX_H |
|
130 |
|
131 // End of File |