20 #include <QGraphicsSceneEvent> |
20 #include <QGraphicsSceneEvent> |
21 #include <hbstyleloader.h> |
21 #include <hbstyleloader.h> |
22 #include <afactivitystorage.h> |
22 #include <afactivitystorage.h> |
23 #include <afactivation.h> |
23 #include <afactivation.h> |
24 #include <hbaction.h> |
24 #include <hbaction.h> |
25 #include <xqserviceutil.h> |
|
26 |
25 |
27 #include "cxuiapplication.h" |
26 #include "cxuiapplication.h" |
28 #include "cxuiapplicationstate.h" |
27 #include "cxuiapplicationstate.h" |
29 #include "cxuiviewmanager.h" |
28 #include "cxuiviewmanager.h" |
30 #include "cxuivideoprecaptureview.h" |
29 #include "cxuivideoprecaptureview.h" |
277 { |
276 { |
278 CX_DEBUG_ENTER_FUNCTION(); |
277 CX_DEBUG_ENTER_FUNCTION(); |
279 |
278 |
280 AfActivation activation; |
279 AfActivation activation; |
281 AfActivityStorage activityStorage; |
280 AfActivityStorage activityStorage; |
282 if (activation.reason() == Hb::ActivationReasonService || |
281 if (activation.reason() == Af::ActivationReasonService) { |
283 // @todo: There's a bug in orbit and we never get Hb::ActivationReasonService as |
|
284 // activation reason. Use XQServiceUtil to determine if starting service as |
|
285 // a workaround for now |
|
286 XQServiceUtil::isService()) { |
|
287 |
|
288 // For embedded mode: don't create view yet, create when engine inits to correct mode. |
282 // For embedded mode: don't create view yet, create when engine inits to correct mode. |
289 // Connect signals to set up the view after image/video prepare |
283 // Connect signals to set up the view after image/video prepare |
290 connect(&mEngine.stillCaptureControl(), SIGNAL(imagePrepareComplete(CxeError::Id)), |
284 connect(&mEngine.stillCaptureControl(), SIGNAL(imagePrepareComplete(CxeError::Id)), |
291 this, SLOT(changeToPrecaptureView())); |
285 this, SLOT(changeToPrecaptureView())); |
292 connect(&mEngine.videoCaptureControl(), SIGNAL(videoPrepareComplete(CxeError::Id)), |
286 connect(&mEngine.videoCaptureControl(), SIGNAL(videoPrepareComplete(CxeError::Id)), |
293 this, SLOT(changeToPrecaptureView())); |
287 this, SLOT(changeToPrecaptureView())); |
294 |
288 |
295 } else if (activation.reason() == Hb::ActivationReasonActivity) { |
289 } else if (activation.reason() == Af::ActivationReasonActivity) { |
296 // restoring activity, read startup view from stored activity |
290 // restoring activity, read startup view from stored activity |
297 |
291 |
298 // view to start in |
292 // view to start in |
299 QString viewName = STILL_PRE_CAPTURE_VIEW; |
293 QString viewName = STILL_PRE_CAPTURE_VIEW; |
300 |
294 |