13 * |
13 * |
14 * Description: Choice list. |
14 * Description: Choice list. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 // System includes |
19 #include <AknLayout2ScalableDef.h> |
19 #include <AknLayout2ScalableDef.h> |
20 #include <aipropertyextension.h> |
20 #include <aknstyluspopupmenu.h> |
21 |
21 #include <AknUtils.h> |
|
22 #include <aknnavide.h> |
|
23 #include <akntitle.h> |
|
24 #include <MProfileEngine.h> |
|
25 #include <viewcli.h> |
|
26 #include <aknlayoutscalable_avkon.cdl.h> |
|
27 #ifdef RD_TACTILE_FEEDBACK |
|
28 #include <touchfeedback.h> |
|
29 #endif |
|
30 |
|
31 // User includes |
|
32 #include <hscontentpublisher.h> |
|
33 #include <hspublisherinfo.h> |
22 #include "aistrcnv.h" |
34 #include "aistrcnv.h" |
23 #include "aistatuspanetouchui.h" |
35 #include "aistatuspanetouchui.h" |
24 #include "aistatuspanel.h" |
36 #include "aistatuspanel.h" |
25 #include "ainativeuiplugins.h" |
37 #include "ainativeuiplugins.h" |
26 #include "aifweventhandler.h" |
38 #include "aifweventhandler.h" |
27 #include "aiconsts.h" |
39 #include "aiconsts.h" |
28 #include "aidevicestatuscontentmodel.h" |
40 #include "aidevicestatuscontentmodel.h" |
29 #include <aknstyluspopupmenu.h> |
|
30 |
|
31 #include <AiNativeUi.rsg> |
41 #include <AiNativeUi.rsg> |
32 #include <AknUtils.h> |
|
33 #include <aknnavide.h> |
|
34 #include <akntitle.h> |
|
35 #include <MProfileEngine.h> |
|
36 #include <viewcli.h> |
|
37 #include <aknlayoutscalable_avkon.cdl.h> |
|
38 |
|
39 #ifdef RD_TACTILE_FEEDBACK |
|
40 #include <touchfeedback.h> |
|
41 #endif |
|
42 |
42 |
43 using namespace AiNativeUiController; |
43 using namespace AiNativeUiController; |
44 |
44 |
|
45 // Constants |
45 _LIT( KProfileSwitchByIndexEvent, "Profile/SwitchProfileByIndex" ); |
46 _LIT( KProfileSwitchByIndexEvent, "Profile/SwitchProfileByIndex" ); |
46 const TInt KProfileSwitchByIndexEventLength = 28; |
47 const TInt KProfileSwitchByIndexEventLength = 28; |
47 const TInt KRadix = 10; |
48 const TInt KRadix = 10; |
48 const TText16 KEventParameterTerminator = ')'; |
49 const TText16 KEventParameterTerminator = ')'; |
49 const TInt KExtraItems = 2; |
50 const TInt KExtraItems = 2; |
50 const TInt KStylusMenuMaxItemsDefault = 0; |
51 const TInt KStylusMenuMaxItemsDefault = 0; |
51 |
52 |
52 _LIT( KOpenAppProfiles, "Shortcut/LaunchByValue(localapp:0x100058F8)" ); |
53 _LIT( KOpenAppProfiles, "Shortcut/LaunchByValue(localapp:0x100058F8)" ); |
53 _LIT( KOpenAppCalendar, "Shortcut/LaunchByValue(localapp:0x10005901)" ); |
54 _LIT( KOpenAppCalendar, "Shortcut/LaunchByValue(localapp:0x10005901)" ); |
54 |
55 |
|
56 // ======== LOCAL FUNCTIONS ======== |
|
57 // ---------------------------------------------------------------------------- |
|
58 // IndexLength() |
|
59 // |
|
60 // ---------------------------------------------------------------------------- |
|
61 // |
55 static TInt IndexLength( TInt aIndex ) |
62 static TInt IndexLength( TInt aIndex ) |
56 { |
63 { |
57 TInt length = 0; |
64 TInt length = 0; |
58 |
65 |
59 if ( aIndex < 0 ) |
66 if ( aIndex < 0 ) |
70 return length; |
77 return length; |
71 } |
78 } |
72 |
79 |
73 // ======== MEMBER FUNCTIONS ======== |
80 // ======== MEMBER FUNCTIONS ======== |
74 |
81 |
75 |
82 // ---------------------------------------------------------------------------- |
|
83 // CAiStatusPaneTouchUi::NewL() |
|
84 // |
|
85 // ---------------------------------------------------------------------------- |
|
86 // |
76 CAiStatusPaneTouchUi* CAiStatusPaneTouchUi::NewL( CAiStatusPanel& aStatusPanel, |
87 CAiStatusPaneTouchUi* CAiStatusPaneTouchUi::NewL( CAiStatusPanel& aStatusPanel, |
77 MAiFwEventHandler& aEventHandler ) |
88 MAiFwEventHandler& aEventHandler ) |
78 { |
89 { |
79 CAiStatusPaneTouchUi* self = CAiStatusPaneTouchUi::NewLC( aStatusPanel, aEventHandler ); |
90 CAiStatusPaneTouchUi* self = |
|
91 CAiStatusPaneTouchUi::NewLC( aStatusPanel, aEventHandler ); |
80 CleanupStack::Pop( self ); |
92 CleanupStack::Pop( self ); |
81 |
93 |
82 return self; |
94 return self; |
83 } |
95 } |
84 |
96 |
|
97 // ---------------------------------------------------------------------------- |
|
98 // CAiStatusPaneTouchUi::NewLC() |
|
99 // |
|
100 // ---------------------------------------------------------------------------- |
|
101 // |
85 CAiStatusPaneTouchUi* CAiStatusPaneTouchUi::NewLC( CAiStatusPanel& aStatusPanel, |
102 CAiStatusPaneTouchUi* CAiStatusPaneTouchUi::NewLC( CAiStatusPanel& aStatusPanel, |
86 MAiFwEventHandler& aEventHandler ) |
103 MAiFwEventHandler& aEventHandler ) |
87 { |
104 { |
88 CAiStatusPaneTouchUi* self = new (ELeave) CAiStatusPaneTouchUi( aStatusPanel, aEventHandler ); |
105 CAiStatusPaneTouchUi* self = |
|
106 new ( ELeave ) CAiStatusPaneTouchUi( aStatusPanel, aEventHandler ); |
89 CleanupStack::PushL( self ); |
107 CleanupStack::PushL( self ); |
90 self->ConstructL(); |
108 self->ConstructL(); |
91 |
109 |
92 return self; |
110 return self; |
93 } |
111 } |
94 |
112 |
|
113 // ---------------------------------------------------------------------------- |
|
114 // CAiStatusPaneTouchUi::CAiStatusPaneTouchUi() |
|
115 // |
|
116 // ---------------------------------------------------------------------------- |
|
117 // |
95 CAiStatusPaneTouchUi::CAiStatusPaneTouchUi( CAiStatusPanel& aStatusPanel, |
118 CAiStatusPaneTouchUi::CAiStatusPaneTouchUi( CAiStatusPanel& aStatusPanel, |
96 MAiFwEventHandler& aEventHandler ) |
119 MAiFwEventHandler& aEventHandler ) |
97 : |
120 : iStatusPane( aStatusPanel ), iEventHandler( aEventHandler ) |
98 iStatusPane( aStatusPanel ), |
121 { |
99 iEventHandler( aEventHandler ) |
122 // no implementation required |
100 { |
123 } |
101 // no implementation required |
124 |
102 } |
125 // ---------------------------------------------------------------------------- |
103 |
126 // CAiStatusPaneTouchUi::~CAiStatusPaneTouchUi() |
|
127 // |
|
128 // ---------------------------------------------------------------------------- |
|
129 // |
104 CAiStatusPaneTouchUi::~CAiStatusPaneTouchUi() |
130 CAiStatusPaneTouchUi::~CAiStatusPaneTouchUi() |
105 { |
131 { |
106 delete iEventBuffer; |
132 delete iEventBuffer; |
107 delete iMenu; |
133 delete iMenu; |
108 iProfileNamePointerArray.ResetAndDestroy(); |
134 iProfileNamePointerArray.ResetAndDestroy(); |
109 } |
135 } |
110 |
136 |
|
137 // ---------------------------------------------------------------------------- |
|
138 // CAiStatusPaneTouchUi::ConstructL() |
|
139 // |
|
140 // ---------------------------------------------------------------------------- |
|
141 // |
111 void CAiStatusPaneTouchUi::ConstructL() |
142 void CAiStatusPaneTouchUi::ConstructL() |
112 { |
143 { |
113 if( AknLayoutUtils::PenEnabled() ) |
144 if( AknLayoutUtils::PenEnabled() ) |
114 { |
145 { |
115 iStatusPane.SetNaviDecoratorObserver( this ); |
146 iStatusPane.SetNaviDecoratorObserver( this ); |
116 } |
147 } |
117 } |
148 } |
118 |
149 |
|
150 // ---------------------------------------------------------------------------- |
|
151 // CAiStatusPaneTouchUi::LoadUIDefinitionL() |
|
152 // |
|
153 // ---------------------------------------------------------------------------- |
|
154 // |
119 void CAiStatusPaneTouchUi::LoadUIDefinitionL() |
155 void CAiStatusPaneTouchUi::LoadUIDefinitionL() |
120 { |
156 { |
121 // If profile popup exists, for example, when screendevicechange occurs, |
157 // If profile popup exists, for example, when screendevicechange occurs, |
122 // the popup is closed |
158 // the popup is closed |
123 if( iMenu ) |
159 if( iMenu ) |