uifw/AvKon/src/akncolourselectiongrid.cpp
branchRCL_3
changeset 16 71dd06cfe933
parent 15 08e69e956a8c
child 55 aecbbf00d063
equal deleted inserted replaced
15:08e69e956a8c 16:71dd06cfe933
  1721     {
  1721     {
  1722 	_AKNTRACE_FUNC_ENTER;
  1722 	_AKNTRACE_FUNC_ENTER;
  1723     // close the color grid: 
  1723     // close the color grid: 
  1724     // if the NGA effects are off, use “pop-up”.
  1724     // if the NGA effects are off, use “pop-up”.
  1725     // If NGA effects are on, use “pop-up closed”.
  1725     // If NGA effects are on, use “pop-up closed”.
  1726     MTouchFeedback* feedback = MTouchFeedback::Instance();
  1726     if( AknLayoutUtils::PenEnabled() )
  1727 
  1727         {
       
  1728         MTouchFeedback* feedback = MTouchFeedback::Instance();
       
  1729         if ( feedback )
       
  1730             {
       
  1731             if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
       
  1732                 {
       
  1733                 feedback->InstantFeedback( this,
       
  1734                                             ETouchFeedbackIncreasingPopUp,
       
  1735                                             ETouchFeedbackVibra,
       
  1736                                             TPointerEvent() );
       
  1737                 }
       
  1738             else
       
  1739                 {
       
  1740                 feedback->InstantFeedback( this,
       
  1741                                             ETouchFeedbackPopUp,
       
  1742                                             ETouchFeedbackVibra,
       
  1743                                             TPointerEvent() );
       
  1744                 }
       
  1745             }
       
  1746         }
  1728     switch (aButton)
  1747     switch (aButton)
  1729         {
  1748         {
  1730         case EAknSoftkeyInsert:
  1749         case EAknSoftkeyInsert:
  1731         case EEikBidOk:
  1750         case EEikBidOk:
  1732             {
  1751             {
  1733             if ( feedback )
       
  1734                 {
       
  1735                 feedback->InstantFeedback( ETouchFeedbackBasic );
       
  1736                 }
       
  1737             TInt index = iGrid->CurrentItemIndex();
  1752             TInt index = iGrid->CurrentItemIndex();
  1738 
  1753 
  1739             if (iNoneBox)
  1754             if (iNoneBox)
  1740                 {
  1755                 {
  1741                 *iNoneChosen = iNoneBox->IsFocused();
  1756                 *iNoneChosen = iNoneBox->IsFocused();
  1747             *iColourChosen = iColours->At(index);
  1762             *iColourChosen = iColours->At(index);
  1748             break;
  1763             break;
  1749             }
  1764             }
  1750         default:
  1765         default:
  1751             {
  1766             {
  1752             if ( feedback )
  1767 
  1753                 {
       
  1754                 if( AknLayoutUtils::PenEnabled() )
       
  1755                     {
       
  1756                     if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
       
  1757                         {
       
  1758                         feedback->InstantFeedback( ETouchFeedbackDecreasingPopUp );
       
  1759                         }
       
  1760                     else
       
  1761                         {
       
  1762                         feedback->InstantFeedback( ETouchFeedbackPopUp );
       
  1763                         }
       
  1764                     }
       
  1765                 }
       
  1766             break;
  1768             break;
  1767             }
  1769             }
  1768         }
  1770         }
  1769     _AKNTRACE_FUNC_EXIT;
  1771     _AKNTRACE_FUNC_EXIT;
  1770     return ETrue;
  1772     return ETrue;
  1825     {
  1827     {
  1826 	_AKNTRACE_FUNC_ENTER;
  1828 	_AKNTRACE_FUNC_ENTER;
  1827     // open the color grid: 
  1829     // open the color grid: 
  1828     // if the NGA effects are off, use “pop-up”.
  1830     // if the NGA effects are off, use “pop-up”.
  1829     // If NGA effects are on, use “increasing long touch”.
  1831     // If NGA effects are on, use “increasing long touch”.
       
  1832     if( AknLayoutUtils::PenEnabled() )
       
  1833         {
  1830     MTouchFeedback* feedback = MTouchFeedback::Instance();
  1834     MTouchFeedback* feedback = MTouchFeedback::Instance();
  1831     if ( feedback )
  1835     if ( feedback )
  1832         {
       
  1833         if( AknLayoutUtils::PenEnabled() )
       
  1834             {
  1836             {
  1835             if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
  1837             if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
  1836                 {
  1838                 {
  1837                 feedback->InstantFeedback( ETouchFeedbackIncreasingPopUp );
  1839                 feedback->InstantFeedback( this,
       
  1840                                             ETouchFeedbackIncreasingPopUp,
       
  1841                                             ETouchFeedbackVibra,
       
  1842                                             TPointerEvent() );
  1838                 }
  1843                 }
  1839             else
  1844             else
  1840                 {
  1845                 {
  1841                 feedback->InstantFeedback( ETouchFeedbackPopUp );
  1846                 feedback->InstantFeedback( this,
       
  1847                                             ETouchFeedbackPopUp,
       
  1848                                             ETouchFeedbackVibra,
       
  1849                                             TPointerEvent() );
  1842                 }
  1850                 }
  1843             }
  1851             }
  1844         }
  1852         }
  1845 
  1853 
  1846     // Create the grid control. CAknDialog will CreateFromResourceL() it
  1854     // Create the grid control. CAknDialog will CreateFromResourceL() it