diff -r e686773b3f54 -r 04ab22b956c2 phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercustomlistbox.cpp --- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercustomlistbox.cpp Tue Feb 02 10:12:17 2010 +0200 +++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercustomlistbox.cpp Fri Feb 19 22:40:27 2010 +0200 @@ -23,7 +23,8 @@ // System includes #include -#include +#include + #include "ccappcommlaunchercustomlistbox.h" #include "ccappcommlaunchercustomlistboxitemdrawer.h" @@ -77,8 +78,68 @@ //Ownership has been transferred to iItemDrawer iColumnData = columnData; } +// -------------------------------------------------------------------------- +// CCCAppCommLauncherCustomListBox::SizeChanged +// -------------------------------------------------------------------------- +// void CCCAppCommLauncherCustomListBox::SizeChanged() { CAknDoubleLargeStyleListBox::SizeChanged(); + TRAP_IGNORE( SizeChangedL() ); } +// -------------------------------------------------------------------------- +// CCCAppCommLauncherCustomListBox::SizeChangedL +// -------------------------------------------------------------------------- +// +void CCCAppCommLauncherCustomListBox::SizeChangedL() + { + // Text format: "0\tCommunicationName\tContent\t1\t2" + // Icons: + // 0: Communication method icon + // 1: Presence icon + // 2: Multi indication icon + // + // Layout: list_double_large_graphic_phob2_cc_pane + // ------------------------------------------------ + // | | | + // | | Communication method name [1] | + // | [0] | | + // | | Content [2] | + // | | | + // ------------------------------------------------ + // + + + iColumnData->ResetSLSubCellArray(); + + // Comm method icon + TAknWindowLineLayout gl( AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_g1( 0 ) ); + iColumnData->SetGraphicSubCellL( 0, gl ); + + // Line 1 text + TAknTextComponentLayout textLayout = AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_t1( 0 ); + iColumnData->SetTextSubCellL( 1, textLayout ); + + // Line 2 text + TAknTextComponentLayout textLayout2 = AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_t2( 0 ); + iColumnData->SetTextSubCellL( 2, textLayout2 ); + + // Presence icon + TAknWindowLineLayout g2( AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_g2( 0 ) ); + iColumnData->SetGraphicSubCellL( 3, g2 ); + + // Multi indication icon + TAknWindowLineLayout g3( AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_g3( 0 ) ); + iColumnData->SetGraphicSubCellL( 4, g3 ); + + // Conditional subcells must be added in priority order! + // Line 1 text variation for 1 post icon + TAknTextComponentLayout textLayout3 = AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_t1( 2 ); + iColumnData->SetConditionalSubCellL( 3, textLayout3, 1 ); + + // Line 2 text variation for 2 post icon + TAknTextComponentLayout textLayout4 = AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_t2( 2 ); + iColumnData->SetConditionalSubCellL( 4, textLayout4, 2 ); + + }