equal
deleted
inserted
replaced
90 // end of CAknRadioButtonSettingPageExtension class definition |
90 // end of CAknRadioButtonSettingPageExtension class definition |
91 |
91 |
92 |
92 |
93 CAknRadioButtonSettingPageExtension::CAknRadioButtonSettingPageExtension( |
93 CAknRadioButtonSettingPageExtension::CAknRadioButtonSettingPageExtension( |
94 CCoeControl& aOwner ) : |
94 CCoeControl& aOwner ) : |
95 iOldFocusedItemIndex( -1 ), |
95 iOldFocusedItemIndex(-1), iIsDragged( EFalse ), |
96 iIsDragged( EFalse ), |
96 iIsValidSelection( ETrue ), |
97 iPenDownOnItem ( KErrNotFound ), |
97 iPenDownOnItem ( KErrNotFound ) |
98 iIsValidSelection( ETrue ) |
|
99 { |
98 { |
100 if ( static_cast<CAknAppUi*>( |
99 if ( static_cast<CAknAppUi*>( |
101 aOwner.ControlEnv()->AppUi() )->IsSingleClickCompatible() ) |
100 aOwner.ControlEnv()->AppUi() )->IsSingleClickCompatible() ) |
102 { |
101 { |
103 iFlags.Set( ESingleClickEnabled ); |
102 iFlags.Set( ESingleClickEnabled ); |
179 |
178 |
180 if (!iExtension) |
179 if (!iExtension) |
181 { |
180 { |
182 iExtension = new (ELeave) CAknRadioButtonSettingPageExtension( *this ); |
181 iExtension = new (ELeave) CAknRadioButtonSettingPageExtension( *this ); |
183 } |
182 } |
184 iExtension->iIsValidSelection = ( iCurrentSelectionIndex != -1 ); |
183 |
185 // Range should be within the valid indices, or -1: |
184 // Range should be within the valid indices, or -1: |
186 // So valid range is >= -1 and also < Count. |
185 // So valid range is >= -1 and also < Count. |
187 __ASSERT_ALWAYS( iCurrentSelectionIndex >= -1, Panic( EAknPanicRadioButtonSettingPageIndexOutOfRange) ); |
186 __ASSERT_ALWAYS( iCurrentSelectionIndex >= -1, Panic( EAknPanicRadioButtonSettingPageIndexOutOfRange) ); |
188 __ASSERT_ALWAYS( iCurrentSelectionIndex < iExtension->iInternalItemArray->Count(), Panic( EAknPanicRadioButtonSettingPageIndexOutOfRange) ); |
187 __ASSERT_ALWAYS( iCurrentSelectionIndex < iExtension->iInternalItemArray->Count(), Panic( EAknPanicRadioButtonSettingPageIndexOutOfRange) ); |
189 |
188 |
313 if ( ListBoxControl()->IsHighlightEnabled() || |
312 if ( ListBoxControl()->IsHighlightEnabled() || |
314 ( iExtension && iExtension->iIsValidSelection ) ) |
313 ( iExtension && iExtension->iIsValidSelection ) ) |
315 { |
314 { |
316 iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex(); |
315 iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex(); |
317 } |
316 } |
318 else if( iCurrentSelectionIndex >= 0 && |
317 else |
319 iCurrentSelectionIndex < ListBoxControl()->Model()->NumberOfItems() ) |
|
320 { |
318 { |
321 ListBoxControl()->SetCurrentItemIndex ( iCurrentSelectionIndex ); |
319 ListBoxControl()->SetCurrentItemIndex ( iCurrentSelectionIndex ); |
322 } |
320 } |
323 |
321 |
324 SetRadioButtonSelectionL( iCurrentSelectionIndex ); |
322 SetRadioButtonSelectionL( iCurrentSelectionIndex ); |
524 * Setting Page reserved methods |
522 * Setting Page reserved methods |
525 */ |
523 */ |
526 EXPORT_C void CAknRadioButtonSettingPage::HandleResourceChange(TInt aType) |
524 EXPORT_C void CAknRadioButtonSettingPage::HandleResourceChange(TInt aType) |
527 { |
525 { |
528 if( aType == KAknsMessageSkinChange ) |
526 if( aType == KAknsMessageSkinChange ) |
529 { |
527 { |
530 TRAP_IGNORE( InitialiseRadioButtonBitmapsL() ); |
528 TRAP_IGNORE( InitialiseRadioButtonBitmapsL() ); |
531 } |
529 } |
532 else if( aType == KEikMessageFadeAllWindows ) |
530 |
533 { |
|
534 if ( iExtension ) |
|
535 { |
|
536 iExtension->iIsValidSelection = EFalse; |
|
537 } |
|
538 } |
|
539 CAknListBoxSettingPage::HandleResourceChange(aType); |
531 CAknListBoxSettingPage::HandleResourceChange(aType); |
540 } |
532 } |
541 |
533 |
542 EXPORT_C void CAknRadioButtonSettingPage::CAknSettingPage_Reserved_1() |
534 EXPORT_C void CAknRadioButtonSettingPage::CAknSettingPage_Reserved_1() |
543 { |
535 { |