98 bubbleManager->addAction( bubbleId, &action1 ); |
100 bubbleManager->addAction( bubbleId, &action1 ); |
99 HbAction action2("Reject", this); |
101 HbAction action2("Reject", this); |
100 action2.setSoftKeyRole(QAction::NegativeSoftKey); |
102 action2.setSoftKeyRole(QAction::NegativeSoftKey); |
101 bubbleManager->addAction( bubbleId, &action2 ); |
103 bubbleManager->addAction( bubbleId, &action2 ); |
102 bubbleManager->setCallObjectFromTheme(bubbleId); |
104 bubbleManager->setCallObjectFromTheme(bubbleId); |
|
105 bubbleManager->setCallFlag(bubbleId,BubbleManagerIF::NoCiphering,true); |
103 bubbleManager->endChanges(); |
106 bubbleManager->endChanges(); |
104 |
107 |
105 QTest::qWait( WAIT_TIME ); |
108 QTest::qWait( WAIT_TIME ); |
106 |
109 |
107 // measure label texts |
110 // measure label texts |
|
111 |
|
112 // First line texts with ciphering indicator |
|
113 bubbleManager->startChanges(); |
|
114 bubbleManager->setState( bubbleId, BubbleManager::Outgoing ); |
|
115 bubbleManager->endChanges(); |
|
116 |
108 testLabel(bubbleId,"txt_phone_other_calling"); |
117 testLabel(bubbleId,"txt_phone_other_calling"); |
109 |
118 |
|
119 testLabel(bubbleId,"txt_phone_other_attempting"); |
|
120 |
|
121 // Second line texts, no indicators -> full width |
|
122 bubbleManager->startChanges(); |
|
123 bubbleManager->setState( bubbleId, BubbleManager::Incoming ); |
|
124 bubbleManager->endChanges(); |
|
125 |
110 testLabel(bubbleId,"txt_phone_other_incoming_call"); |
126 testLabel(bubbleId,"txt_phone_other_incoming_call"); |
111 |
127 |
112 testLabel(bubbleId,"txt_phone_other_waiting"); |
128 testLabel(bubbleId,"txt_phone_other_waiting"); |
113 |
129 |
114 testLabel(bubbleId,"txt_phone_other_on_hold"); |
130 testLabel(bubbleId,"txt_phone_other_on_hold"); |
115 |
131 |
116 testLabel(bubbleId,"txt_phone_other_disconnected"); |
132 testLabel(bubbleId,"txt_phone_other_disconnected"); |
117 |
133 |
118 testLabel(bubbleId,"txt_phone_other_attempting"); |
134 testLabel(bubbleId,"txt_phone_other_incoming_video_call"); |
119 |
135 |
120 // measure cli texts |
136 testLabel(bubbleId,"txt_phone_other_incoming_l1_call"); |
|
137 |
|
138 // First line CLI texts with ciphering indicator |
121 testCli(bubbleId,"txt_phone_other_conference_call"); |
139 testCli(bubbleId,"txt_phone_other_conference_call"); |
122 |
140 |
|
141 testCli(bubbleId,"txt_phone_other_remote_sim"); |
|
142 |
|
143 testCli(bubbleId,"txt_phone_other_emergency_call"); |
|
144 |
|
145 // First line CLI texts with ciphering and divert indicators |
|
146 bubbleManager->startChanges(); |
|
147 bubbleManager->setCallFlag( bubbleId, BubbleManager::Diverted, true ); |
|
148 bubbleManager->endChanges(); |
|
149 |
123 testCli(bubbleId,"txt_phone_other_unknown_number"); |
150 testCli(bubbleId,"txt_phone_other_unknown_number"); |
124 |
151 |
125 testCli(bubbleId,"txt_phone_other_remote_sim"); |
|
126 |
|
127 testCli(bubbleId,"txt_phone_other_private_number"); |
152 testCli(bubbleId,"txt_phone_other_private_number"); |
128 |
153 |
129 testCli(bubbleId,"txt_phone_other_emergency_call"); |
154 testCli(bubbleId,"txt_phone_other_payphone"); |
|
155 |
|
156 bubbleManager->startChanges(); |
|
157 bubbleManager->setCallFlag( bubbleId, BubbleManager::Diverted, false ); |
|
158 bubbleManager->endChanges(); |
130 |
159 |
131 // write results |
160 // write results |
132 QTest::qWait( WAIT_TIME ); |
161 QTest::qWait( WAIT_TIME ); |
133 HbDeviceProfile profile = HbDeviceProfile::profile(mainWindow); |
162 HbDeviceProfile profile = HbDeviceProfile::profile(mainWindow); |
134 QFileInfo info(QCoreApplication::applicationFilePath()); |
163 QFileInfo info(QCoreApplication::applicationFilePath()); |
144 } |
173 } |
145 |
174 |
146 void LocTest::changeOrientation() |
175 void LocTest::changeOrientation() |
147 { |
176 { |
148 view->setTitle( "Changing orientation" ); |
177 view->setTitle( "Changing orientation" ); |
|
178 mainWindow->resize(640,360); |
149 mainWindow->setOrientation(Qt::Horizontal); |
179 mainWindow->setOrientation(Qt::Horizontal); |
150 mainWindow->resize(640,360); |
|
151 QTest::qWait(3000); |
180 QTest::qWait(3000); |
152 } |
181 } |
153 |
182 |
154 void LocTest::testLandscapeStrings() |
183 void LocTest::testLandscapeStrings() |
155 { |
184 { |
156 view->setTitle( "Measuring landscape" ); |
185 view->setTitle( "Measuring landscape" ); |
157 |
186 |
158 // In landscape text field width depends on call situation, |
187 // texts fields are measured according to most narrow situation |
159 // measure according to most narrow case. |
|
160 |
188 |
161 // create test bubble |
189 // create test bubble |
162 bubbleManager->startChanges(); |
190 bubbleManager->startChanges(); |
163 int bubbleId = bubbleManager->createCallHeader(); |
191 int bubbleId = bubbleManager->createCallHeader(); |
164 bubbleManager->setState( bubbleId, BubbleManager::OnHold ); |
192 bubbleManager->setState( bubbleId, BubbleManager::Incoming ); |
165 HbAction action1("End call", this); |
193 HbAction action1("End call", this); |
166 action1.setSoftKeyRole(QAction::PositiveSoftKey); |
194 action1.setSoftKeyRole(QAction::PositiveSoftKey); |
167 bubbleManager->addAction( bubbleId, &action1 ); |
195 bubbleManager->addAction( bubbleId, &action1 ); |
168 bubbleManager->setCallObjectFromTheme(bubbleId); |
196 bubbleManager->setCallObjectFromTheme(bubbleId); |
169 bubbleManager->endChanges(); |
197 bubbleManager->setCallFlag( bubbleId, BubbleManager::NoCiphering, true ); |
170 |
198 bubbleManager->endChanges(); |
171 |
199 |
172 // only in single call texts |
200 // Single call "only" texts |
|
201 |
|
202 // Second line texts, no indicators -> full width |
173 testLabel(bubbleId,"txt_phone_other_incoming_call"); |
203 testLabel(bubbleId,"txt_phone_other_incoming_call"); |
174 |
204 |
|
205 testLabel(bubbleId,"txt_phone_other_incoming_video_call"); |
|
206 |
|
207 testLabel(bubbleId,"txt_phone_other_incoming_l1_call"); |
|
208 |
|
209 bubbleManager->startChanges(); |
|
210 bubbleManager->setState( bubbleId, BubbleManager::Outgoing ); |
|
211 bubbleManager->endChanges(); |
|
212 |
|
213 // First line texts, with ciphering indicator |
175 testLabel(bubbleId,"txt_phone_other_attempting"); |
214 testLabel(bubbleId,"txt_phone_other_attempting"); |
176 |
215 |
|
216 testLabel(bubbleId,"txt_phone_other_calling"); |
|
217 |
|
218 bubbleManager->startChanges(); |
|
219 bubbleManager->setState( bubbleId, BubbleManager::Active ); |
|
220 bubbleManager->endChanges(); |
|
221 |
177 testCli(bubbleId,"txt_phone_other_emergency_call"); |
222 testCli(bubbleId,"txt_phone_other_emergency_call"); |
178 |
223 |
179 // multicall |
224 // Add another call |
180 bubbleManager->startChanges(); |
225 bubbleManager->startChanges(); |
181 int bubbleId2 = bubbleManager->createCallHeader(); |
226 int bubbleId2 = bubbleManager->createCallHeader(); |
182 bubbleManager->setState( bubbleId2, BubbleManager::OnHold ); |
227 bubbleManager->setState( bubbleId, BubbleManager::OnHold ); |
183 int bubbleId3 = bubbleManager->createCallHeader(); |
228 bubbleManager->setState( bubbleId2, BubbleManager::Active ); |
184 bubbleManager->setState( bubbleId3, BubbleManager::Waiting ); |
229 bubbleManager->setCallObjectFromTheme(bubbleId2); |
185 HbAction action2("Replace", this); |
230 bubbleManager->endChanges(); |
186 action2.setSoftKeyRole(QAction::PositiveSoftKey); |
231 |
187 bubbleManager->addAction( bubbleId3, &action1 ); |
232 testLabel(bubbleId,"txt_phone_other_on_hold"); |
188 bubbleManager->setCallObjectFromTheme(bubbleId3); |
233 |
189 bubbleManager->endChanges(); |
234 testLabel(bubbleId,"txt_phone_other_disconnected"); |
190 |
235 |
191 // measure label texts |
236 testCli(bubbleId,"txt_phone_other_conference_call"); |
192 testLabel(bubbleId2,"txt_phone_other_calling"); |
237 |
193 |
238 testCli(bubbleId,"txt_phone_other_remote_sim"); |
194 testLabel(bubbleId2,"txt_phone_other_waiting"); |
239 |
195 |
240 // Add ciphering indicator |
196 testLabel(bubbleId2,"txt_phone_other_on_hold"); |
241 bubbleManager->startChanges(); |
197 |
242 bubbleManager->setState( bubbleId, BubbleManager::Waiting ); |
198 testLabel(bubbleId2,"txt_phone_other_disconnected"); |
243 bubbleManager->setCallFlag( bubbleId, BubbleManager::Diverted, true ); |
199 |
244 bubbleManager->endChanges(); |
200 // measure cli texts |
245 |
201 testCli(bubbleId2,"txt_phone_other_conference_call"); |
246 testCli(bubbleId,"txt_phone_other_unknown_number"); |
202 |
247 |
203 testCli(bubbleId3,"txt_phone_other_unknown_number"); |
248 testCli(bubbleId,"txt_phone_other_private_number"); |
204 |
249 |
205 testCli(bubbleId3,"txt_phone_other_remote_sim"); |
250 testCli(bubbleId,"txt_phone_other_payphone"); |
206 |
251 |
207 testCli(bubbleId3,"txt_phone_other_private_number"); |
252 testLabel(bubbleId,"txt_phone_other_waiting"); |
208 |
253 |
209 // write results |
254 // write results |
210 QTest::qWait( WAIT_TIME ); |
255 QTest::qWait( WAIT_TIME ); |
211 HbDeviceProfile profile = HbDeviceProfile::profile(mainWindow); |
256 HbDeviceProfile profile = HbDeviceProfile::profile(mainWindow); |
212 QFileInfo info(QCoreApplication::applicationFilePath()); |
257 QFileInfo info(QCoreApplication::applicationFilePath()); |