16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include <aknlists.h> |
20 #include <aknlists.h> |
21 #include <csxhelp/cp.hlp.hrh> |
21 #include <cshelp/conset.hlp.hrh> |
22 #include <gsfwviewuids.h> |
22 #include <gsfwviewuids.h> |
23 #include <gssipsettingspluginrsc.rsg> |
23 #include <gssipsettingspluginrsc.rsg> |
24 #include <gssipsettingsplugin.mbg> |
24 #include <gssipsettingsplugin.mbg> |
25 #include <AknIconArray.h> |
25 #include <AknIconArray.h> |
26 #include <aknsutils.h> //for loading icons |
26 #include <AknsUtils.h> //for loading icons |
27 #include <akntitle.h> |
27 #include <akntitle.h> |
28 #include <eikspane.h> |
28 #include <eikspane.h> |
29 #include <aknnavi.h> |
29 #include <aknnavi.h> |
30 #include <stringloader.h> |
30 #include <StringLoader.h> |
31 #include "sipsettingscontainer.h" |
31 #include "sipsettingscontainer.h" |
32 #include "sipsettingsmodel.h" |
32 #include "sipsettingsmodel.h" |
33 #include "sipsettingsplugin.h" |
33 #include "sipsettingsplugin.h" |
34 #include "gssippluginlogger.h" |
34 #include "gssippluginlogger.h" |
35 |
35 |
530 aContext.iMajor = KUidGS; |
507 aContext.iMajor = KUidGS; |
531 aContext.iContext = KSIP_HLP_MAIN; |
508 aContext.iContext = KSIP_HLP_MAIN; |
532 } |
509 } |
533 |
510 |
534 // ----------------------------------------------------------------------------- |
511 // ----------------------------------------------------------------------------- |
535 // CSIPSettingsContainer::HandleLongTapEventL() |
|
536 // Responds to Long Tap Event |
|
537 // ----------------------------------------------------------------------------- |
|
538 // |
|
539 void CSIPSettingsContainer::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /*aPenEventScreenLocation*/ ) |
|
540 { |
|
541 __GSLOGSTRING("CSIPSettingsContainer::HandleLongTapEventL" ) |
|
542 |
|
543 iPoint = aPenEventLocation; |
|
544 |
|
545 delete iStylusPopupMenu; |
|
546 iStylusPopupMenu = NULL; |
|
547 |
|
548 iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , PenEventLocation() ); |
|
549 TResourceReader reader; |
|
550 iCoeEnv->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU ); |
|
551 iStylusPopupMenu->ConstructFromResourceL( reader ); |
|
552 CleanupStack::PopAndDestroy(); |
|
553 |
|
554 iStylusPopupMenu->ShowMenu(); |
|
555 iStylusPopupMenu->SetPosition( PenEventLocation() ); |
|
556 SetLongPress( ETrue ); |
|
557 } |
|
558 |
|
559 // ----------------------------------------------------------------------------- |
|
560 // CSIPSettingsContainer::HandleLongTapEventL() |
|
561 // Responds to Long Tap Event |
|
562 // ----------------------------------------------------------------------------- |
|
563 // |
|
564 TPoint CSIPSettingsContainer::PenEventLocation() |
|
565 { |
|
566 return iPoint; |
|
567 } |
|
568 |
|
569 // ----------------------------------------------------------------------------- |
|
570 // CSIPSettingsContainer::ProcessCommandL() |
512 // CSIPSettingsContainer::ProcessCommandL() |
571 // Handle ProcessCommandL |
513 // Handle ProcessCommandL |
572 // ----------------------------------------------------------------------------- |
514 // ----------------------------------------------------------------------------- |
573 // |
515 // |
574 void CSIPSettingsContainer::ProcessCommandL( TInt aCommand ) |
516 void CSIPSettingsContainer::ProcessCommandL( TInt aCommand ) |
575 { |
517 { |
576 __GSLOGSTRING1("CSIPSettingsContainer::ProcessCommandL aCommand: %d", aCommand) |
518 __GSLOGSTRING1("CSIPSettingsContainer::ProcessCommandL aCommand: %d", aCommand) |
577 switch( aCommand ) |
519 switch( aCommand ) |
578 { |
520 { |
579 case EGSCmdAppEdit: |
|
580 iObs->EditProfileL(); |
|
581 break; |
|
582 |
|
583 case EGSCmdAppDelete: |
521 case EGSCmdAppDelete: |
584 iObs->DeleteProfileL(); |
522 iObs->DeleteProfileL(); |
585 break; |
523 break; |
586 |
524 |
587 case EGSCmdAppDefault: |
525 case EGSCmdAppDefault: |
588 iObs->ChangeDefaultProfileL(); |
526 iObs->ChangeDefaultProfileL(); |
589 default: |
527 default: |
590 break; |
528 break; |
591 } |
529 } |
592 } |
530 } |
593 |
|
594 // ----------------------------------------------------------------------------- |
|
595 // CSIPSettingsContainer::HandlePointerEventL() |
|
596 // Responds to a Pointer Event. |
|
597 // ----------------------------------------------------------------------------- |
|
598 // |
|
599 void CSIPSettingsContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
|
600 { |
|
601 __GSLOGSTRING("CSIPSettingsContainer::HandlePointerEventL" ) |
|
602 iListBox->View()->ItemDrawer()->ClearFlags( CTextListItemDrawer::EDisableHighlight ); |
|
603 DrawNow(); |
|
604 iPointerEvent = aPointerEvent; |
|
605 CCoeControl::HandlePointerEventL( aPointerEvent ); |
|
606 } |
|
607 |
|
608 // ----------------------------------------------------------------------------- |
|
609 // CSIPSettingsContainer::IfPointerEvent() |
|
610 // Check if it is Pointer Event. |
|
611 // ----------------------------------------------------------------------------- |
|
612 // |
|
613 TBool CSIPSettingsContainer::IfPointerEvent() |
|
614 { |
|
615 __GSLOGSTRING("CSIPSettingsContainer::IfPointerEvent" ) |
|
616 return !( iTimer->IsStarted() ); |
|
617 } |
|
618 |
|
619 void CSIPSettingsContainer::SetEmphasis( CCoeControl* /*aMenuControl*/, TBool /*aEmphasis*/ ) |
531 void CSIPSettingsContainer::SetEmphasis( CCoeControl* /*aMenuControl*/, TBool /*aEmphasis*/ ) |
620 { |
532 { |
621 |
533 |
622 } |
534 } |
623 |
535 |
624 |
|
625 // ----------------------------------------------------------------------------- |
|
626 // CSIPSettingsContainer::LongPressStatus() |
|
627 // Check if Long Press happen. |
|
628 // ----------------------------------------------------------------------------- |
|
629 // |
|
630 TBool CSIPSettingsContainer::LongPressStatus() |
|
631 { |
|
632 return iLongPress; |
|
633 } |
|
634 |
|
635 // ----------------------------------------------------------------------------- |
|
636 // CSIPSettingsContainer::SetLongPress() |
|
637 // Set Long Press. |
|
638 // ----------------------------------------------------------------------------- |
|
639 // |
|
640 void CSIPSettingsContainer::SetLongPress(TBool aLongPress ) |
|
641 { |
|
642 __GSLOGSTRING("CSIPSettingsContainer::SetLongPress" ) |
|
643 this->iLongPress = aLongPress; |
|
644 } |
|
645 |
|
646 |
|
647 CAknLongTapDetector* CSIPSettingsContainer::LongTapDetector() |
|
648 { |
|
649 return iLongTapDetector; |
|
650 } |
|
651 |
|
652 |
|
653 TPointerEvent CSIPSettingsContainer::PointerEvent() |
|
654 { |
|
655 return iPointerEvent; |
|
656 } |
|
657 |
|
658 |
|
659 // End of File |
536 // End of File |