201 // |
201 // |
202 void CCalenTodoListBox::SizeChangedL() |
202 void CCalenTodoListBox::SizeChangedL() |
203 { |
203 { |
204 //Pass to base class |
204 //Pass to base class |
205 CAknSingleGraphicHeadingStyleListBox::SizeChanged(); |
205 CAknSingleGraphicHeadingStyleListBox::SizeChanged(); |
206 |
|
207 //Reposition the listbox column items |
|
208 TAknWindowComponentLayout itemGraphic1 = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_g1( 0 ); |
|
209 TAknWindowLineLayout windowLineLayout1 = itemGraphic1.LayoutLine(); |
|
210 windowLineLayout1.il += 30; |
|
211 itemGraphic1 = windowLineLayout1; |
|
212 |
|
213 ItemDrawer()->ColumnData()->SetStretchableGraphicSubCellL(0,itemGraphic1, |
|
214 AknLayoutScalable_Avkon::list_single_graphic_heading_pane_vc_g1( 0 )); |
|
215 |
|
216 |
|
217 TAknTextComponentLayout itemText1 = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_t2( 0 ); |
|
218 TAknTextLineLayout textLineLayout1 = itemText1.LayoutLine(); |
|
219 textLineLayout1.il += 30; |
|
220 itemText1 = textLineLayout1; |
|
221 |
|
222 ItemDrawer()->ColumnData()->SetStretchableTextSubCellL(1,itemText1, |
|
223 AknLayoutScalable_Avkon::list_single_graphic_heading_pane_vc_t2( 0 )); |
|
224 |
|
225 //further reposition if required for other columns |
|
226 |
|
227 //TAknTextComponentLayout itemText2 = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_t1( 0 ); |
|
228 //TAknTextComponentLayout itemText2Stretch = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_vc_t1( 0 ); |
|
229 } |
206 } |
230 |
207 |
231 // ---------------------------------------------------------------------------- |
208 // ---------------------------------------------------------------------------- |
232 // CCalenTodoListBox::SizeChanged |
209 // CCalenTodoListBox::SizeChanged |
233 // ---------------------------------------------------------------------------- |
210 // ---------------------------------------------------------------------------- |
390 // Transfer iconlist ownership to the listbox |
367 // Transfer iconlist ownership to the listbox |
391 iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList ); |
368 iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList ); |
392 |
369 |
393 /*// Save empty text and set null for list box. |
370 /*// Save empty text and set null for list box. |
394 // It is made not to display "No data". |
371 // It is made not to display "No data". |
395 iEmptyListText = iListBox->View()->EmptyListText()->AllocL(); |
372 iEmptyListText = iListBox->View()->EmptyListText()->AllocL();*/ |
396 //iListBox->View()->SetListEmptyTextL( KNullDesC );*/ |
373 |
397 |
374 //set NULL string so that "no entries" is not shown |
398 // Set text for empty listbox |
375 //until the list is populated |
399 HBufC* emptyText = StringLoader::LoadLC(R_CALEN_QTN_CALE_NO_EVENTS, |
376 iListBox->View()->SetListEmptyTextL( KNullDesC ); |
400 iEikonEnv); |
377 |
401 iListBox->View()->SetListEmptyTextL( *emptyText ); //Whenever listbox is empty, it will set with this empty text. |
|
402 CleanupStack::PopAndDestroy(emptyText); |
|
403 |
|
404 TRACE_EXIT_POINT; |
378 TRACE_EXIT_POINT; |
405 } |
379 } |
406 |
380 |
407 // ---------------------------------------------------------------------------- |
381 // ---------------------------------------------------------------------------- |
408 // CCalenTodoContainer::SetCurrentItemIndex |
382 // CCalenTodoContainer::SetCurrentItemIndex |
597 } |
571 } |
598 |
572 |
599 CleanupStack::PopAndDestroy( listDes ); |
573 CleanupStack::PopAndDestroy( listDes ); |
600 CleanupStack::PopAndDestroy( &calendarInfoList ); |
574 CleanupStack::PopAndDestroy( &calendarInfoList ); |
601 iListBox->HandleItemAdditionL(); |
575 iListBox->HandleItemAdditionL(); |
602 //iListBox->View()->SetListEmptyTextL( *iEmptyListText ); |
576 |
|
577 //Whenever listbox is empty, it will set with this empty text. |
|
578 HBufC* emptyText = StringLoader::LoadLC(R_CALEN_QTN_CALE_NO_EVENTS, |
|
579 iEikonEnv); |
|
580 iListBox->View()->SetListEmptyTextL( *emptyText ); |
|
581 CleanupStack::PopAndDestroy(emptyText); |
|
582 |
603 |
583 |
604 TRACE_EXIT_POINT; |
584 TRACE_EXIT_POINT; |
605 } |
585 } |
606 |
586 |
607 // ---------------------------------------------------------------------------- |
587 // ---------------------------------------------------------------------------- |
1190 { |
1170 { |
1191 TRACE_ENTRY_POINT; |
1171 TRACE_ENTRY_POINT; |
1192 |
1172 |
1193 if(AknLayoutUtils::PenEnabled()) |
1173 if(AknLayoutUtils::PenEnabled()) |
1194 { |
1174 { |
|
1175 if(iView->IsEventViewLaunchedFromAlarm()) |
|
1176 { |
|
1177 return; |
|
1178 } |
1195 TInt pointerIndex(-1); |
1179 TInt pointerIndex(-1); |
1196 TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); |
1180 TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); |
1197 |
1181 |
1198 if(aPointerEvent.iType == TPointerEvent::EButton1Down) |
1182 if(aPointerEvent.iType == TPointerEvent::EButton1Down) |
1199 { |
1183 { |
1265 |
1249 |
1266 AddToStackAndMakeVisibleL(); |
1250 AddToStackAndMakeVisibleL(); |
1267 // Now we know if the view is empty or not we can update the CBA buttons. |
1251 // Now we know if the view is empty or not we can update the CBA buttons. |
1268 static_cast<CCalenTodoView*>( iView )->UpdateCBAButtonsL(); |
1252 static_cast<CCalenTodoView*>( iView )->UpdateCBAButtonsL(); |
1269 UpdateStatusPaneAndExtensionsL(); |
1253 UpdateStatusPaneAndExtensionsL(); |
|
1254 UpdateTodayToolbarItemL(); |
1270 |
1255 |
1271 TRACE_EXIT_POINT; |
1256 TRACE_EXIT_POINT; |
1272 } |
1257 } |
1273 |
1258 |
1274 // ---------------------------------------------------------------------------- |
1259 // ---------------------------------------------------------------------------- |