|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Blid application UI class definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BLIDAPPUI_H |
|
21 #define BLIDAPPUI_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <aknViewAppUi.h> |
|
25 #include <akntabgrp.h> |
|
26 #include <aknnavide.h> |
|
27 #include <AknTabObserver.h> |
|
28 // included for Huitk impl |
|
29 #include <alf/alfenv.h> |
|
30 |
|
31 // USER INCLUDE |
|
32 #include "MKeyProcessor.h" |
|
33 #include "BlidNotes.h" |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CBlidMainContainer; |
|
37 class CBlidDocument; |
|
38 class CSatelliteInfoUI; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * Application UI class. |
|
44 */ |
|
45 class CBlidAppUi : public CAknViewAppUi, public MAknTabObserver, |
|
46 public MKeyProcessor |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 /** |
|
50 * Second phase constructor |
|
51 */ |
|
52 void ConstructL(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 * Frees reserved resources |
|
57 */ |
|
58 ~CBlidAppUi(); |
|
59 |
|
60 public: // New functions |
|
61 /** |
|
62 * Returns the Blid document object. |
|
63 * @return CBlidDocument |
|
64 */ |
|
65 CBlidDocument* BlidDocument() const; |
|
66 |
|
67 /** |
|
68 * Show BLID application's dialogs |
|
69 * @param aNoteId Id of Note |
|
70 */ |
|
71 void ShowDialogL( const BlidNotes::TBlidNotes aNoteId ); |
|
72 |
|
73 /** |
|
74 * Skin changed |
|
75 * |
|
76 */ |
|
77 void SkinChange(); |
|
78 |
|
79 /** |
|
80 * Checks if App is in foreground |
|
81 */ |
|
82 TBool IsForeground(); |
|
83 |
|
84 /** |
|
85 * Set satellite view active or inactive |
|
86 * @param aActive To set active or inactive |
|
87 */ |
|
88 void SetSatelliteViewActive( TBool aActive ); |
|
89 |
|
90 /** |
|
91 * Check if Satellite view is active |
|
92 * |
|
93 */ |
|
94 TBool IsSatelliteViewActive( ); |
|
95 |
|
96 /** |
|
97 * Resets the odometer value |
|
98 * |
|
99 */ |
|
100 void ResetOdoMeterValueL(); |
|
101 |
|
102 /** |
|
103 * Launches Satellite info dialog |
|
104 * |
|
105 */ |
|
106 void LaunchSatelliteInfoDlgL(); |
|
107 |
|
108 public: // From MAknTabObserver |
|
109 /** |
|
110 * Called when Tab is changed, activates appropriate view |
|
111 * @param aIndex |
|
112 */ |
|
113 void TabChangedL(TInt aIndex); |
|
114 |
|
115 public: // From MKeyProcessor |
|
116 /** |
|
117 * Process key event |
|
118 * @param aKeyEvent |
|
119 * @param aType |
|
120 */ |
|
121 TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType ); |
|
122 |
|
123 /** |
|
124 * Retruns CBlidAppUi pointer, which is Tab observer |
|
125 * |
|
126 */ |
|
127 MAknTabObserver* TabObserver(); |
|
128 |
|
129 public: // from MBlidEngObserver |
|
130 void NotifyL( const TBool aOnlineMode ); |
|
131 void NotifyErrorL( TInt aErrorCode ); |
|
132 |
|
133 protected: // from CCoeAppUi |
|
134 /** |
|
135 * Called whenever app goes to background or comes to foreground |
|
136 * @param aForeground |
|
137 */ |
|
138 void HandleForegroundEventL(TBool aForeground); |
|
139 |
|
140 /** |
|
141 * Handles a change to the resources |
|
142 * @param aType |
|
143 */ |
|
144 void HandleResourceChangeL( TInt aType ); |
|
145 |
|
146 public: // From CEikAppUi |
|
147 /** |
|
148 * From CEikAppUi, takes care of command handling. |
|
149 * @param aCommand command to be handled |
|
150 */ |
|
151 void HandleCommandL(TInt aCommand); |
|
152 |
|
153 private: // new functions |
|
154 /** |
|
155 * Launch Landmarks |
|
156 */ |
|
157 void LaunchLandmarksDialogL(); |
|
158 |
|
159 private: //Data |
|
160 /// Ref: A pointer to CSatelliteInfoUI |
|
161 CSatelliteInfoUI* iSatelliteInfo; |
|
162 |
|
163 /// Own: TBool variable |
|
164 TBool iContextPane; |
|
165 |
|
166 /// Own: State to hole app state (foreground/background) |
|
167 TBool iForeground; |
|
168 |
|
169 /*! @var HUIToolkit environment. */ |
|
170 CAlfEnv* iAlfEnv; |
|
171 |
|
172 TBool iIsSatViewActive; |
|
173 }; |
|
174 |
|
175 #endif // BLIDAPPUI_H |
|
176 |
|
177 // End of File |