equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include "cvimpstuilistboxmodel.h" |
19 #include "cvimpstuilistboxmodel.h" |
20 #include "mvimpstprocessarray.h" |
20 #include "mvimpstprocessarray.h" |
|
21 #include "uiservicetabtracer.h" |
21 |
22 |
22 // ======== MEMBER FUNCTIONS ======== |
23 // ======== MEMBER FUNCTIONS ======== |
23 |
24 |
24 // --------------------------------------------------------------------------- |
25 // --------------------------------------------------------------------------- |
25 // CVIMPSTUiListBoxModel::CVIMPSTUiListBoxModel |
26 // CVIMPSTUiListBoxModel::CVIMPSTUiListBoxModel |
41 // CVIMPSTUiListBoxModel::NumberOfItems |
42 // CVIMPSTUiListBoxModel::NumberOfItems |
42 // --------------------------------------------------------------------------- |
43 // --------------------------------------------------------------------------- |
43 // |
44 // |
44 TInt CVIMPSTUiListBoxModel::NumberOfItems() const |
45 TInt CVIMPSTUiListBoxModel::NumberOfItems() const |
45 { |
46 { |
|
47 TRACER_AUTO; |
46 if( IsFilterActive() ) |
48 if( IsFilterActive() ) |
47 { |
49 { |
48 // Something is filtered |
50 // Something is filtered |
49 return CountItems(); |
51 return CountItems(); |
50 } |
52 } |
77 // CVIMPSTUiListBoxModel::FilteredItemIndex |
79 // CVIMPSTUiListBoxModel::FilteredItemIndex |
78 // --------------------------------------------------------------------------- |
80 // --------------------------------------------------------------------------- |
79 // |
81 // |
80 TInt CVIMPSTUiListBoxModel::FilteredItemIndex( TInt aVisibleItemIndex ) const |
82 TInt CVIMPSTUiListBoxModel::FilteredItemIndex( TInt aVisibleItemIndex ) const |
81 { |
83 { |
|
84 TRACER_AUTO; |
82 if( !IsFilterActive() ) |
85 if( !IsFilterActive() ) |
83 { |
86 { |
84 // Nothing is filtered |
87 // Nothing is filtered |
85 return aVisibleItemIndex; |
88 return aVisibleItemIndex; |
86 } |
89 } |
118 // CVIMPSTUiListBoxModel::VisibleItemIndex |
121 // CVIMPSTUiListBoxModel::VisibleItemIndex |
119 // --------------------------------------------------------------------------- |
122 // --------------------------------------------------------------------------- |
120 // |
123 // |
121 TInt CVIMPSTUiListBoxModel::VisibleItemIndex( TInt aOriginalIndex ) const |
124 TInt CVIMPSTUiListBoxModel::VisibleItemIndex( TInt aOriginalIndex ) const |
122 { |
125 { |
|
126 TRACER_AUTO; |
123 if( !IsFilterActive() ) |
127 if( !IsFilterActive() ) |
124 { |
128 { |
125 // Nothing is filtered |
129 // Nothing is filtered |
126 return aOriginalIndex; |
130 return aOriginalIndex; |
127 } |
131 } |
160 // CVIMPSTUiListBoxModel::CountItems |
164 // CVIMPSTUiListBoxModel::CountItems |
161 // --------------------------------------------------------------------------- |
165 // --------------------------------------------------------------------------- |
162 // |
166 // |
163 TInt CVIMPSTUiListBoxModel::CountItems() const |
167 TInt CVIMPSTUiListBoxModel::CountItems() const |
164 { |
168 { |
|
169 TRACER_AUTO; |
165 TInt itemcount = 0; |
170 TInt itemcount = 0; |
166 if( Filter() ) |
171 if( Filter() ) |
167 { |
172 { |
168 // Count of visible items by filter |
173 // Count of visible items by filter |
169 itemcount = Filter()->FilteredNumberOfItems(); |
174 itemcount = Filter()->FilteredNumberOfItems(); |
197 // CVIMPSTUiListBoxModel::ItemAt |
202 // CVIMPSTUiListBoxModel::ItemAt |
198 // --------------------------------------------------------------------------- |
203 // --------------------------------------------------------------------------- |
199 // |
204 // |
200 TPtrC CVIMPSTUiListBoxModel::ItemAt( TInt aIndex ) const |
205 TPtrC CVIMPSTUiListBoxModel::ItemAt( TInt aIndex ) const |
201 { |
206 { |
|
207 TRACER_AUTO; |
202 TInt itemcount = -1; |
208 TInt itemcount = -1; |
203 if( Filter() ) |
209 if( Filter() ) |
204 { |
210 { |
205 // Get positions of contact lists |
211 // Get positions of contact lists |
206 RArray<TInt> pos; |
212 RArray<TInt> pos; |
233 // CVIMPSTUiListBoxModel::IsContactList |
239 // CVIMPSTUiListBoxModel::IsContactList |
234 // --------------------------------------------------------------------------- |
240 // --------------------------------------------------------------------------- |
235 // |
241 // |
236 TBool CVIMPSTUiListBoxModel::IsContactList( TInt aIndex, RArray<TInt>& aPosArray ) const |
242 TBool CVIMPSTUiListBoxModel::IsContactList( TInt aIndex, RArray<TInt>& aPosArray ) const |
237 { |
243 { |
|
244 TRACER_AUTO; |
238 TInt startInd = aPosArray.Find( aIndex ); |
245 TInt startInd = aPosArray.Find( aIndex ); |
239 if( KErrNotFound == startInd ) |
246 if( KErrNotFound == startInd ) |
240 { |
247 { |
241 // aIndex not found in array -> not even list |
248 // aIndex not found in array -> not even list |
242 return EFalse; |
249 return EFalse; |