equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
42 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
42 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
43 #include <aknlistloadertfx.h> |
43 #include <aknlistloadertfx.h> |
44 #include <aknlistboxtfxinternal.h> |
44 #include <aknlistboxtfxinternal.h> |
45 #endif //RD_UI_TRANSITION_EFFECTS_LIST |
45 #endif //RD_UI_TRANSITION_EFFECTS_LIST |
46 |
46 |
47 #include <AknPriv.hrh> |
47 |
48 |
48 |
49 // ---------------------------------------------------------------------------- |
49 // ---------------------------------------------------------------------------- |
50 // Extension class definition |
50 // Extension class definition |
51 // ---------------------------------------------------------------------------- |
51 // ---------------------------------------------------------------------------- |
52 // |
52 // |
315 case MEikListBoxObserver::EEventFlickStopped: |
315 case MEikListBoxObserver::EEventFlickStopped: |
316 // Change list's current item index to the selected item. This |
316 // Change list's current item index to the selected item. This |
317 // ensures that correct item gets selected if setting page is |
317 // ensures that correct item gets selected if setting page is |
318 // accepted by clicking the left softkey. |
318 // accepted by clicking the left softkey. |
319 if ( iExtension && iExtension->iFlags.IsSet( |
319 if ( iExtension && iExtension->iFlags.IsSet( |
320 CAknPopupSettingListExtension::ESingleClickEnabled ) && |
320 CAknPopupSettingListExtension::ESingleClickEnabled ) ) |
321 ItemExists( iCurrentSelection ) ) |
|
322 { |
321 { |
323 View()->SetCurrentItemIndex( iCurrentSelection ); |
322 View()->SetCurrentItemIndex( iCurrentSelection ); |
324 } |
323 } |
325 break; |
324 break; |
326 |
325 |
675 // Construct an appropriate control context for the contained editor areas. |
674 // Construct an appropriate control context for the contained editor areas. |
676 // Context produced is owned by CAknSettingPage. |
675 // Context produced is owned by CAknSettingPage. |
677 SetEditedItemFrameIID( KAknsIIDQsnFrSetOpt, KAknsIIDQsnFrSetOptCenter ); |
676 SetEditedItemFrameIID( KAknsIIDQsnFrSetOpt, KAknsIIDQsnFrSetOptCenter ); |
678 |
677 |
679 iQueryValue.SetQueryMode( MAknQueryValue::ESettingPageMode ); |
678 iQueryValue.SetQueryMode( MAknQueryValue::ESettingPageMode ); |
680 // |
|
681 // SetQueryValue make the view item drawn by default, SetDisableRedraw can remove flick |
|
682 // |
|
683 TBool bRedrawDisabled = PopupSettingListBox()->View()->RedrawDisabled(); |
|
684 PopupSettingListBox()->View()->SetDisableRedraw( ETrue ); |
|
685 PopupSettingListBox()->SetQueryValueL( &iQueryValue ); |
679 PopupSettingListBox()->SetQueryValueL( &iQueryValue ); |
686 PopupSettingListBox()->View()->SetDisableRedraw( bRedrawDisabled); |
|
687 |
|
688 CheckAndSetDataValidity(); |
680 CheckAndSetDataValidity(); |
689 UpdateCbaL(); |
681 UpdateCbaL(); |
690 |
682 |
691 PopupSettingListBox()->SetPopupSettingListObserver( this ); |
683 PopupSettingListBox()->SetPopupSettingListObserver( this ); |
692 // Set the scroller indication to appear when needed |
684 // Set the scroller indication to appear when needed |
741 return &iQueryValue; |
733 return &iQueryValue; |
742 } |
734 } |
743 |
735 |
744 EXPORT_C void CAknPopupSettingPage::SelectCurrentItemL() |
736 EXPORT_C void CAknPopupSettingPage::SelectCurrentItemL() |
745 { |
737 { |
|
738 #ifdef RD_TOUCH2 |
746 CAknPopupSettingList* list = PopupSettingListBox(); |
739 CAknPopupSettingList* list = PopupSettingListBox(); |
747 |
740 |
748 if ( ( list->ItemDrawer()->Flags() & |
741 if ( ( list->ItemDrawer()->Flags() & |
749 CListItemDrawer::ESingleClickDisabledHighlight ) |
742 CListItemDrawer::ESingleClickDisabledHighlight ) |
750 && list->CurrentItemIndex() != list->CurrentSelection() ) |
743 && list->CurrentItemIndex() != list->CurrentSelection() ) |
751 { |
744 { |
752 list->View()->SetCurrentItemIndex( list->CurrentSelection() ); |
745 list->View()->SetCurrentItemIndex( list->CurrentSelection() ); |
753 } |
746 } |
|
747 #endif // RD_TOUCH2 |
754 |
748 |
755 PopupSettingListBox()->SelectCurrentItemL(); |
749 PopupSettingListBox()->SelectCurrentItemL(); |
756 } |
750 } |
757 |
751 |
758 EXPORT_C void CAknPopupSettingPage::UpdateQueryValueL( MAknQueryValue* aQueryValue ) |
752 EXPORT_C void CAknPopupSettingPage::UpdateQueryValueL( MAknQueryValue* aQueryValue ) |
787 #endif |
781 #endif |
788 |
782 |
789 EXPORT_C void CAknPopupSettingPage::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
783 EXPORT_C void CAknPopupSettingPage::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
790 { |
784 { |
791 CAknListBoxSettingPage::HandlePointerEventL(aPointerEvent); |
785 CAknListBoxSettingPage::HandlePointerEventL(aPointerEvent); |
792 if ( TPointerEvent::EDrag == aPointerEvent.iType ) |
|
793 { |
|
794 if ( !( Rect().Contains( aPointerEvent.iPosition ) ) ) |
|
795 { |
|
796 // Clear focus if dragged outside popup |
|
797 PopupSettingListBox()->HandleResourceChange( KAknMessageFocusLost ); |
|
798 } |
|
799 } |
|
800 } |
786 } |
801 |
787 |
802 EXPORT_C void* CAknPopupSettingPage::ExtensionInterface( TUid /*aInterface*/ ) |
788 EXPORT_C void* CAknPopupSettingPage::ExtensionInterface( TUid /*aInterface*/ ) |
803 { |
789 { |
804 return NULL; |
790 return NULL; |
825 */ |
811 */ |
826 EXPORT_C void CAknPopupSettingPage::CAknListBoxSettingPage_Reserved_1() |
812 EXPORT_C void CAknPopupSettingPage::CAknListBoxSettingPage_Reserved_1() |
827 { |
813 { |
828 } |
814 } |
829 |
815 |
830 //--------------------------------------------------------------------------------------- |
|
831 // CAknPopupSettingPage::ProcessCommandL() |
|
832 // Processes events from the softkeys. (Or translated from key events) |
|
833 //--------------------------------------------------------------------------------------- |
|
834 // |
|
835 EXPORT_C void CAknPopupSettingPage::ProcessCommandL( TInt aCommandId ) |
|
836 { |
|
837 if ( !EnableSingleClickHighlight( aCommandId ) ) |
|
838 { |
|
839 // no single click mode was enabled, just call the base class method |
|
840 CAknSettingPage::ProcessCommandL( aCommandId ); |
|
841 } |
|
842 } |
|
843 |
|
844 // End of File |
816 // End of File |