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: Provides blid note class methods. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <StringLoader.h> |
|
21 #include <aknnotewrappers.h> |
|
22 #include <Blid.rsg> |
|
23 #include <aknstaticnotedialog.h> |
|
24 #include "BlidNotes.h" |
|
25 #include "blidcommonconsts.h" |
|
26 |
|
27 TBool BlidNotes::iNoteDisplayed = EFalse; |
|
28 TBool BlidNotes::iGPSUnavailableDisplayed = EFalse; |
|
29 CEikonEnv* BlidNotes::iEnv = CEikonEnv::Static(); |
|
30 |
|
31 // ================= MEMBER FUNCTIONS ======================= |
|
32 //----------------------------------------------------------------------- |
|
33 // BlidNotes::OverWriteWaypointNoteL |
|
34 // ---------------------------------------------------------------------------- |
|
35 // |
|
36 void BlidNotes::OverWriteWaypointNoteL() |
|
37 { |
|
38 HBufC* noteText = StringLoader::LoadL( R_BLID_ERROR_MAX_WAYPOINTS, |
|
39 KMaxNumberOfWaypoints, |
|
40 iEnv ); |
|
41 CleanupStack::PushL(noteText); |
|
42 CAknInformationNote* dialog = |
|
43 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
44 dialog->ExecuteLD( *noteText ); |
|
45 |
|
46 CleanupStack::PopAndDestroy(noteText); //noteText |
|
47 } |
|
48 |
|
49 //----------------------------------------------------------------------- |
|
50 // BlidNotes::OutOfMemoryNoteL |
|
51 // ---------------------------------------------------------------------------- |
|
52 // |
|
53 void BlidNotes::OutOfMemoryNoteL() |
|
54 { |
|
55 HBufC* noteText = StringLoader::LoadL( R_MEMLO_NOT_ENOUGH_MEMORY, iEnv ); |
|
56 CleanupStack::PushL(noteText); |
|
57 CAknErrorNote* dialog = |
|
58 new(ELeave)CAknErrorNote(ETrue); |
|
59 dialog->SetTone(CAknNoteDialog::EErrorTone); |
|
60 dialog->ExecuteLD( *noteText ); |
|
61 |
|
62 CleanupStack::PopAndDestroy(noteText); //noteText |
|
63 } |
|
64 |
|
65 //----------------------------------------------------------------------- |
|
66 // BlidNotes::EmptyLandmarkNoteL |
|
67 // ---------------------------------------------------------------------------- |
|
68 // |
|
69 void BlidNotes::EmptyLandmarkNoteL(const TDesC& landmarkName) |
|
70 { |
|
71 HBufC* noteText = StringLoader::LoadL( R_BLID_EMPTY_LANDMARK_DESTINATION, |
|
72 landmarkName, |
|
73 iEnv ); |
|
74 CleanupStack::PushL(noteText); |
|
75 CAknInformationNote* dialog = |
|
76 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
77 dialog->ExecuteLD( *noteText ); |
|
78 |
|
79 CleanupStack::PopAndDestroy(noteText); //noteText |
|
80 } |
|
81 |
|
82 //----------------------------------------------------------------------- |
|
83 // BlidNotes::PoorGPSDataNoteL |
|
84 //----------------------------------------------------------------------- |
|
85 // |
|
86 void BlidNotes::PoorGPSDataNoteL() |
|
87 { |
|
88 HBufC* noteText = StringLoader::LoadLC( R_BLID_GPS_TIMEOUT_NOTE, iEnv ); |
|
89 |
|
90 CAknInformationNote* dialog = |
|
91 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
92 dialog->ExecuteLD( *noteText ); |
|
93 |
|
94 CleanupStack::PopAndDestroy(noteText); //noteText |
|
95 } |
|
96 |
|
97 //----------------------------------------------------------------------- |
|
98 // BlidNotes::NoPsyConnectedNoteL |
|
99 //----------------------------------------------------------------------- |
|
100 // |
|
101 void BlidNotes::NoPsyConnectedNoteL() |
|
102 { |
|
103 HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_PSY, iEnv ); |
|
104 |
|
105 CAknInformationNote* dialog = |
|
106 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
107 dialog->ExecuteLD( *noteText ); |
|
108 |
|
109 CleanupStack::PopAndDestroy(noteText); //noteText |
|
110 } |
|
111 |
|
112 //----------------------------------------------------------------------- |
|
113 // BlidNotes::SearchingGPSDataNoteL |
|
114 //----------------------------------------------------------------------- |
|
115 // |
|
116 void BlidNotes::SearchingGPSDDataNoteL() |
|
117 { |
|
118 HBufC* noteText = StringLoader::LoadLC( R_BLID_WAITNOTE_SEARCHING_GPS_SATELLITES, iEnv ); |
|
119 |
|
120 CAknInformationNote* dialog = |
|
121 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
122 dialog->ExecuteLD( *noteText ); |
|
123 CleanupStack::PopAndDestroy(noteText); //noteText |
|
124 } |
|
125 |
|
126 //----------------------------------------------------------------------- |
|
127 // BlidNotes::GPDDataAvailableL |
|
128 //----------------------------------------------------------------------- |
|
129 // |
|
130 void BlidNotes::GPSDataAvailableL() |
|
131 { |
|
132 if(!iNoteDisplayed) |
|
133 { |
|
134 iNoteDisplayed = ETrue; |
|
135 iGPSUnavailableDisplayed = ETrue; |
|
136 HBufC* noteText = StringLoader::LoadLC( R_BLID_NOTE_GPS_DATA, iEnv ); |
|
137 CAknInformationNote* dialog = |
|
138 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
139 dialog->ExecuteLD( *noteText ); |
|
140 CleanupStack::PopAndDestroy(noteText); //noteText |
|
141 } |
|
142 } |
|
143 |
|
144 //----------------------------------------------------------------------- |
|
145 // BlidNotes::GPSDeviceUnavailableNoteL |
|
146 //----------------------------------------------------------------------- |
|
147 // |
|
148 void BlidNotes::GPSDeviceUnavailableNoteL() |
|
149 { |
|
150 if(!iGPSUnavailableDisplayed) |
|
151 { |
|
152 iGPSUnavailableDisplayed = ETrue; |
|
153 iNoteDisplayed = ETrue; |
|
154 HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_GPS_DEVICE, iEnv ); |
|
155 CAknInformationNote* dialog = |
|
156 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
157 dialog->ExecuteLD( *noteText ); |
|
158 CleanupStack::PopAndDestroy(noteText); //noteText |
|
159 } |
|
160 } |
|
161 |
|
162 //----------------------------------------------------------------------- |
|
163 // BlidNotes::NoGPSDeviceL |
|
164 //----------------------------------------------------------------------- |
|
165 // |
|
166 void BlidNotes::NoGPSDeviceL() |
|
167 { |
|
168 iNoteDisplayed = ETrue; |
|
169 HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_GPS_DEVICE, iEnv ); |
|
170 CAknInformationNote* dialog = |
|
171 new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT ); |
|
172 dialog->ExecuteLD( *noteText ); |
|
173 CleanupStack::PopAndDestroy(noteText); //noteText |
|
174 } |
|
175 |
|
176 // End of File |
|