44 #include "cxenamespace.h" // CxeSettingIds |
46 #include "cxenamespace.h" // CxeSettingIds |
45 #include "cxuienums.h" |
47 #include "cxuienums.h" |
46 #include "cxesettings.h" |
48 #include "cxesettings.h" |
47 #include "cxefeaturemanager.h" // mEngine->featureManager() |
49 #include "cxefeaturemanager.h" // mEngine->featureManager() |
48 #include "cxuidocumentloader.h" |
50 #include "cxuidocumentloader.h" |
|
51 |
|
52 #ifdef Q_OS_SYMBIAN |
49 #include "OstTraceDefinitions.h" |
53 #include "OstTraceDefinitions.h" |
|
54 |
50 #ifdef OST_TRACE_COMPILER_IN_USE |
55 #ifdef OST_TRACE_COMPILER_IN_USE |
51 #include "cxuistillprecaptureviewTraces.h" |
56 #include "cxuistillprecaptureviewTraces.h" |
52 #endif |
57 #endif |
|
58 |
|
59 #endif //Q_OS_SYMBIAN |
|
60 |
53 #include "cxuistillprecaptureview.h" |
61 #include "cxuistillprecaptureview.h" |
54 #include "cxuiserviceprovider.h" |
62 #include "cxuiserviceprovider.h" |
55 #include "cxuisettingdialog.h" |
63 #include "cxuisettingdialog.h" |
56 #include "cxuisettingradiobuttonlist.h" |
64 #include "cxuisettingradiobuttonlist.h" |
57 #include "cxuizoomslider.h" |
65 #include "cxuizoomslider.h" |
108 this, SLOT(handleSnapshot(CxeError::Id))); |
116 this, SLOT(handleSnapshot(CxeError::Id))); |
109 connect(&mEngine->stillCaptureControl(), SIGNAL(stateChanged(CxeStillCaptureControl::State, CxeError::Id)), |
117 connect(&mEngine->stillCaptureControl(), SIGNAL(stateChanged(CxeStillCaptureControl::State, CxeError::Id)), |
110 this, SLOT(handleStillCaptureStateChanged(CxeStillCaptureControl::State, CxeError::Id))); |
118 this, SLOT(handleStillCaptureStateChanged(CxeStillCaptureControl::State, CxeError::Id))); |
111 connect(&mEngine->viewfinderControl(), SIGNAL(stateChanged(CxeViewfinderControl::State, CxeError::Id)), |
119 connect(&mEngine->viewfinderControl(), SIGNAL(stateChanged(CxeViewfinderControl::State, CxeError::Id)), |
112 this, SLOT(handleViewfinderStateChanged(CxeViewfinderControl::State, CxeError::Id))); |
120 this, SLOT(handleViewfinderStateChanged(CxeViewfinderControl::State, CxeError::Id))); |
113 connect(&(mEngine->settings()), SIGNAL(sceneChanged(CxeScene&)), |
|
114 this, SLOT(handleSceneChanged(CxeScene&))); |
|
115 connect(&mEngine->stillCaptureControl(), SIGNAL(availableImagesChanged()), |
121 connect(&mEngine->stillCaptureControl(), SIGNAL(availableImagesChanged()), |
116 this, SLOT(updateImagesLeftLabel())); |
122 this, SLOT(updateImagesLeftLabel())); |
117 |
123 |
|
124 mEngine->settings().listenForSetting(CxeSettingIds::IMAGE_SCENE_DATA, this, SLOT(handleSceneChanged(const QVariant&))); |
|
125 |
118 loadDefaultWidgets(); |
126 loadDefaultWidgets(); |
119 hideControls(); |
127 hideControls(); |
120 |
|
121 mSelfTimer = new CxuiSelfTimer(mEngine->settings()); |
|
122 connect(mSelfTimer, SIGNAL(timerFinished()), this, SLOT(focusAndCapture())); |
|
123 |
|
124 int value = Cxe::GeoTaggingDisclaimerDisabled; |
|
125 mEngine->settings().get(CxeSettingIds::GEOTAGGING_DISCLAIMER, value); |
|
126 if(value == Cxe::GeoTaggingDisclaimerEnabled) { |
|
127 launchGeoTaggingDisclaimerDialog(); |
|
128 } |
|
129 |
128 |
130 OstTrace0( camerax_performance, DUP1_CXUISTILLPRECAPTUREVIEW_CONSTRUCT, "msg: e_CX_STILLPRECAPVIEW_CONSTRUCT 0" ); |
129 OstTrace0( camerax_performance, DUP1_CXUISTILLPRECAPTUREVIEW_CONSTRUCT, "msg: e_CX_STILLPRECAPVIEW_CONSTRUCT 0" ); |
131 CX_DEBUG_EXIT_FUNCTION(); |
130 CX_DEBUG_EXIT_FUNCTION(); |
132 } |
131 } |
133 |
132 |
135 * Loads default widgets in layouts xml. |
134 * Loads default widgets in layouts xml. |
136 */ |
135 */ |
137 void CxuiStillPrecaptureView::loadDefaultWidgets() |
136 void CxuiStillPrecaptureView::loadDefaultWidgets() |
138 { |
137 { |
139 CX_DEBUG_ENTER_FUNCTION(); |
138 CX_DEBUG_ENTER_FUNCTION(); |
140 CX_DEBUG_ASSERT(mDocumentLoader); |
139 CX_ASSERT_ALWAYS(mDocumentLoader); |
141 |
140 |
142 // get pointer to the viewfinder |
141 // get pointer to the viewfinder |
143 QGraphicsWidget *widget = NULL; |
142 QGraphicsWidget *widget = NULL; |
144 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_VIEWFINDER); |
143 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_VIEWFINDER); |
145 mViewfinder = qobject_cast<HbTransparentWindow *>(widget); |
144 mViewfinder = qobject_cast<HbTransparentWindow *>(widget); |
146 CX_DEBUG_ASSERT(mViewfinder); |
145 CX_ASSERT_ALWAYS(mViewfinder); |
147 |
146 |
|
147 reloadIndicatorWidgets(); |
|
148 CX_DEBUG_EXIT_FUNCTION(); |
|
149 } |
|
150 |
|
151 /*! |
|
152 * Loads default indicators from docml and modifies the visibility |
|
153 * according to current settings. |
|
154 */ |
|
155 void CxuiStillPrecaptureView::reloadIndicatorWidgets() |
|
156 { |
|
157 CX_DEBUG_ENTER_FUNCTION(); |
|
158 CX_ASSERT_ALWAYS(mDocumentLoader); |
|
159 |
|
160 bool ok = false; |
|
161 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_INDICATORS_SECTION, &ok); |
|
162 CX_ASSERT_ALWAYS(ok); |
|
163 |
|
164 QGraphicsWidget *widget = NULL; |
148 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_QUALITY_ICON); |
165 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_QUALITY_ICON); |
149 mQualityIcon = qobject_cast<HbLabel *>(widget); |
166 mQualityIcon = qobject_cast<HbLabel *>(widget); |
150 CX_DEBUG_ASSERT(mQualityIcon); |
167 CX_ASSERT_ALWAYS(mQualityIcon); |
|
168 |
|
169 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_FLASHBLINK_INDICATOR_ICON); |
|
170 HbLabel *flashBlinkingIcon = qobject_cast<HbLabel *>(widget); |
|
171 CX_ASSERT_ALWAYS(flashBlinkingIcon); |
151 |
172 |
152 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_GEOTAGGING_INDICATOR_ICON); |
173 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_GEOTAGGING_INDICATOR_ICON); |
153 mGeoTaggingIndicatorIcon = qobject_cast<HbLabel *>(widget); |
174 mGeoTaggingIndicatorIcon = qobject_cast<HbLabel *>(widget); |
154 CX_DEBUG_ASSERT(mGeoTaggingIndicatorIcon); |
175 CX_ASSERT_ALWAYS(mGeoTaggingIndicatorIcon); |
155 |
176 |
156 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_FACE_TRACKING_ICON); |
177 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_FACE_TRACKING_ICON); |
157 mFaceTrackingIcon = qobject_cast<HbLabel *>(widget); |
178 mFaceTrackingIcon = qobject_cast<HbLabel *>(widget); |
158 CX_DEBUG_ASSERT(mFaceTrackingIcon); |
179 CX_ASSERT_ALWAYS(mFaceTrackingIcon); |
159 |
180 |
160 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_INDICATOR_CONTAINER); |
181 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_INDICATOR_CONTAINER); |
161 mIndicators = qobject_cast<HbWidget *>(widget); |
182 mIndicators = qobject_cast<HbWidget *>(widget); |
162 CX_DEBUG_ASSERT(mIndicators); |
183 CX_ASSERT_ALWAYS(mIndicators); |
|
184 |
|
185 QGraphicsLayout *layout = mIndicators->layout(); |
|
186 QGraphicsLayoutItem *graphicsLayoutItem = NULL; |
|
187 QGraphicsItem *graphicsItem = NULL; |
|
188 QString key = ""; |
|
189 int currentSettingValue = -1; |
|
190 bool isSettingOff = false; |
|
191 // Go through the items in the layout to check whether they should be |
|
192 // shown or not in the indicator pane. Start from the last towards |
|
193 // the first, so that removing items from between works correctly. |
|
194 for (int i = layout->count() - 1; i >= 0; i--) { |
|
195 graphicsLayoutItem = layout->itemAt(i); |
|
196 isSettingOff = false; |
|
197 if (graphicsLayoutItem) { |
|
198 graphicsItem = graphicsLayoutItem->graphicsItem(); |
|
199 currentSettingValue = -1; |
|
200 if (graphicsItem == mGeoTaggingIndicatorIcon) { |
|
201 key = CxeSettingIds::GEOTAGGING; |
|
202 currentSettingValue = mEngine->settings().get(key, currentSettingValue); |
|
203 if (currentSettingValue == Cxe::GeoTaggingOff) { |
|
204 isSettingOff = true; |
|
205 } |
|
206 } else if (graphicsItem == mFaceTrackingIcon) { |
|
207 key = CxeSettingIds::FACE_TRACKING; |
|
208 currentSettingValue = mEngine->settings().get(key, currentSettingValue); |
|
209 // facetracking implementation does not use |
|
210 // enum for on/off values but instead |
|
211 // 0 for off and 1 for on. |
|
212 if (currentSettingValue == 0) { |
|
213 isSettingOff = true; |
|
214 } |
|
215 } else if (graphicsItem == flashBlinkingIcon) { |
|
216 //remove flash indicator |
|
217 isSettingOff = true; |
|
218 } |
|
219 if (isSettingOff) { |
|
220 layout->removeAt(i); |
|
221 } |
|
222 } |
|
223 } |
|
224 |
163 // create background for indicator container |
225 // create background for indicator container |
164 createWidgetBackgroundGraphic(mIndicators, TRANSPARENT_BACKGROUND_GRAPHIC); |
226 createWidgetBackgroundGraphic(mIndicators, TRANSPARENT_BACKGROUND_GRAPHIC); |
|
227 |
|
228 mIndicators->setVisible(true); |
165 |
229 |
166 CX_DEBUG_EXIT_FUNCTION(); |
230 CX_DEBUG_EXIT_FUNCTION(); |
167 } |
231 } |
168 |
232 |
169 /*! |
233 /*! |
185 |
249 |
186 bool ok = false; |
250 bool ok = false; |
187 |
251 |
188 OstTrace0( camerax_performance, DUP4_CXUISTILLPRECAPTUREVIEW_LOADWIDGETS, "msg: e_CX_DOCUMENTLOADER_LOAD 1" ); |
252 OstTrace0( camerax_performance, DUP4_CXUISTILLPRECAPTUREVIEW_LOADWIDGETS, "msg: e_CX_DOCUMENTLOADER_LOAD 1" ); |
189 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_WIDGETS_SECTION, &ok); |
253 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_WIDGETS_SECTION, &ok); |
190 Q_ASSERT_X(ok, "camerax ui", "error in xml file parsing"); |
254 CX_ASSERT_ALWAYS(ok); |
191 if (CxuiServiceProvider::isCameraEmbedded()) { |
255 if (CxuiServiceProvider::isCameraEmbedded()) { |
192 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_EMBEDDED_SECTION, &ok); |
256 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_EMBEDDED_SECTION, &ok); |
193 } else { |
257 } else { |
194 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_STANDALONE_SECTION, &ok); |
258 mDocumentLoader->load(STILL_1ST_XML, STILL_PRE_CAPTURE_STANDALONE_SECTION, &ok); |
195 } |
259 } |
196 OstTrace0( camerax_performance, DUP5_CXUISTILLPRECAPTUREVIEW_LOADWIDGETS, "msg: e_CX_DOCUMENTLOADER_LOAD 0" ); |
260 OstTrace0( camerax_performance, DUP5_CXUISTILLPRECAPTUREVIEW_LOADWIDGETS, "msg: e_CX_DOCUMENTLOADER_LOAD 0" ); |
197 Q_ASSERT_X(ok, "camerax ui", "error in xml file parsing"); |
261 CX_ASSERT_ALWAYS(ok); |
198 |
262 |
199 // get pointers to ui components from the layout data |
263 // get pointers to ui components from the layout data |
200 QGraphicsWidget *widget = NULL; |
264 QGraphicsWidget *widget = NULL; |
201 QObject *object = NULL; |
265 QObject *object = NULL; |
202 |
266 |
203 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_ZOOM_SLIDER); |
267 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_ZOOM_SLIDER); |
204 mSlider = qobject_cast<CxuiZoomSlider *>(widget); |
268 mSlider = qobject_cast<CxuiZoomSlider *>(widget); |
205 CX_DEBUG_ASSERT(mSlider); |
269 CX_ASSERT_ALWAYS(mSlider); |
206 mSlider->addZoomButtons(); |
270 mSlider->addZoomButtons(); |
207 createWidgetBackgroundGraphic(mSlider, TRANSPARENT_BACKGROUND_GRAPHIC); |
271 createWidgetBackgroundGraphic(mSlider, TRANSPARENT_BACKGROUND_GRAPHIC); |
208 |
|
209 if (mSelfTimer) { |
|
210 // let selftimer class get needed selftimer related widgets |
|
211 // from the documentloader |
|
212 mSelfTimer->loadSelftimerWidgets(mDocumentLoader); |
|
213 } |
|
214 |
272 |
215 // create background for selftimer containers |
273 // create background for selftimer containers |
216 HbWidget *container = NULL; |
274 HbWidget *container = NULL; |
217 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_CONTAINER); |
275 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_CONTAINER); |
218 container = qobject_cast<HbWidget *>(widget); |
276 container = qobject_cast<HbWidget *>(widget); |
219 CX_DEBUG_ASSERT(container); |
277 CX_ASSERT_ALWAYS(container); |
220 createWidgetBackgroundGraphic(container, TRANSPARENT_BACKGROUND_GRAPHIC); |
278 createWidgetBackgroundGraphic(container, TRANSPARENT_BACKGROUND_GRAPHIC); |
221 |
279 |
222 // connect selftimer start button to hide controls |
280 // connect selftimer start button to hide controls |
223 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_START_BUTTON); |
281 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_START_BUTTON); |
224 HbPushButton *startButton = qobject_cast<HbPushButton *>(widget); |
282 HbPushButton *startButton = qobject_cast<HbPushButton *>(widget); |
225 CX_DEBUG_ASSERT(startButton); |
283 CX_ASSERT_ALWAYS(startButton); |
226 connect(startButton, SIGNAL(released()), this, SLOT(hideControls())); |
284 connect(startButton, SIGNAL(released()), this, SLOT(hideControls())); |
227 |
285 |
228 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_TOOLBAR); |
286 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_TOOLBAR); |
229 mToolbar = qobject_cast<HbToolBar *>(widget); |
287 mToolbar = qobject_cast<HbToolBar *>(widget); |
230 CX_DEBUG_ASSERT(mToolbar); |
288 CX_ASSERT_ALWAYS(mToolbar); |
231 |
289 |
232 object = mDocumentLoader->findObject(STILL_PRE_CAPTURE_FLASH_ACTION); |
290 object = mDocumentLoader->findObject(STILL_PRE_CAPTURE_FLASH_ACTION); |
233 mFlashSetting = qobject_cast<HbAction *>(object); |
291 mFlashSetting = qobject_cast<HbAction *>(object); |
234 CX_DEBUG_ASSERT(mFlashSetting); |
292 CX_ASSERT_ALWAYS(mFlashSetting); |
235 |
293 |
236 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_IMAGES_LEFT_LABEL); |
294 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_IMAGES_LEFT_LABEL); |
237 mImagesLeft = qobject_cast<HbLabel *>(widget); |
295 mImagesLeft = qobject_cast<HbLabel *>(widget); |
238 CX_DEBUG_ASSERT(mImagesLeft); |
296 CX_ASSERT_ALWAYS(mImagesLeft); |
239 |
297 |
240 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_IMAGES_LEFT_CONTAINER); |
298 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_IMAGES_LEFT_CONTAINER); |
241 mImagesLeftContainer = qobject_cast<HbWidget *>(widget); |
299 mImagesLeftContainer = qobject_cast<HbWidget *>(widget); |
242 CX_DEBUG_ASSERT(mImagesLeftContainer); |
300 CX_ASSERT_ALWAYS(mImagesLeftContainer); |
243 createWidgetBackgroundGraphic(mImagesLeftContainer, TRANSPARENT_BACKGROUND_GRAPHIC); |
301 createWidgetBackgroundGraphic(mImagesLeftContainer, TRANSPARENT_BACKGROUND_GRAPHIC); |
244 updateImagesLeftLabel(); |
302 updateImagesLeftLabel(); |
|
303 |
|
304 // Create self timer. |
|
305 // Let selftimer class get needed selftimer related widgets from the documentloader |
|
306 mSelfTimer = new CxuiSelfTimer(mEngine->settings()); |
|
307 CX_ASSERT_ALWAYS(mSelfTimer); |
|
308 connect(mSelfTimer, SIGNAL(timerFinished()), this, SLOT(focusAndCapture())); |
|
309 mSelfTimer->loadSelftimerWidgets(mDocumentLoader); |
245 |
310 |
246 if (CxuiServiceProvider::isCameraEmbedded()) { |
311 if (CxuiServiceProvider::isCameraEmbedded()) { |
247 CX_DEBUG(("EMBEDDED: camera in embedded mode")); |
312 CX_DEBUG(("EMBEDDED: camera in embedded mode")); |
248 |
313 |
249 if (!CxuiServiceProvider::instance()->allowQualityChange()) { |
314 if (!CxuiServiceProvider::instance()->allowQualityChange()) { |
272 |
337 |
273 // Setting widgets loaded here so updating icons works. |
338 // Setting widgets loaded here so updating icons works. |
274 mWidgetsLoaded = true; |
339 mWidgetsLoaded = true; |
275 |
340 |
276 // Update toolbar flash mode icon |
341 // Update toolbar flash mode icon |
277 int flash; |
342 int flash = mEngine->settings().get<int>(CxeSettingIds::FLASH_MODE); |
278 if (mEngine->settings().get(CxeSettingIds::FLASH_MODE, flash) == CxeError::None) { |
343 handleSettingValueChanged(CxeSettingIds::FLASH_MODE, flash); |
279 handleSettingValueChanged(CxeSettingIds::FLASH_MODE, flash); |
|
280 } |
|
281 |
344 |
282 // Update toolbar scene mode icon |
345 // Update toolbar scene mode icon |
283 QString sceneId; |
346 updateSceneIcon(mEngine->settings().get<QString>(CxeSettingIds::IMAGE_SCENE)); |
284 if (mEngine->settings().get(CxeSettingIds::SCENE_ID, sceneId) == CxeError::None) { |
|
285 updateSceneIcon(sceneId); |
|
286 } |
|
287 |
347 |
288 hideControls(); |
348 hideControls(); |
|
349 |
|
350 // Check if we need to show the geotagging disclaimer for first time use. |
|
351 Cxe::GeoTaggingDisclaimer value = mEngine->settings().get<Cxe::GeoTaggingDisclaimer>(CxeSettingIds::GEOTAGGING_DISCLAIMER, Cxe::GeoTaggingDisclaimerDisabled); |
|
352 if (value == Cxe::GeoTaggingDisclaimerEnabled) { |
|
353 launchGeoTaggingDisclaimerDialog(); |
|
354 } |
289 |
355 |
290 // View is ready. Needed for startup performance automated testing. |
356 // View is ready. Needed for startup performance automated testing. |
291 emit viewReady(); |
357 emit viewReady(); |
292 |
358 |
293 OstTrace0( camerax_performance, DUP1_CXUISTILLPRECAPTUREVIEW_LOADWIDGETS, "msg: e_CX_STILLPRECAPTUREVIEW_LOADWIDGETS 0" ); |
359 OstTrace0( camerax_performance, DUP1_CXUISTILLPRECAPTUREVIEW_LOADWIDGETS, "msg: e_CX_STILLPRECAPTUREVIEW_LOADWIDGETS 0" ); |
795 |
860 |
796 /* |
861 /* |
797 Slot for handling scene mode change |
862 Slot for handling scene mode change |
798 \param scene QVariantMap containing settings related to the new scene mode |
863 \param scene QVariantMap containing settings related to the new scene mode |
799 */ |
864 */ |
800 void CxuiStillPrecaptureView::handleSceneChanged(CxeScene &scene) |
865 void CxuiStillPrecaptureView::handleSceneChanged(const QVariant &newSceneData) |
801 { |
866 { |
802 CX_DEBUG_ENTER_FUNCTION(); |
867 CX_DEBUG_ENTER_FUNCTION(); |
803 if (mEngine->mode() == Cxe::ImageMode) { |
868 if (mEngine->mode() == Cxe::ImageMode) { |
804 |
869 |
|
870 CxeScene scene = newSceneData.toMap(); |
805 // update toolbar scene mode icon |
871 // update toolbar scene mode icon |
806 updateSceneIcon(scene[CxeSettingIds::SCENE_ID].toString()); |
872 updateSceneIcon(scene[CxeSettingIds::SCENE_ID].toString()); |
807 |
873 |
808 // for now, we are only interested in flashmode change |
874 // for now, we are only interested in flashmode change |
809 if (scene.contains(CxeSettingIds::FLASH_MODE)) { |
875 if (scene.contains(CxeSettingIds::FLASH_MODE)) { |
810 CX_DEBUG(("updating flash to: %d", scene[CxeSettingIds::FLASH_MODE].value<int>())); |
876 CX_DEBUG(("updating flash to: %d", scene[CxeSettingIds::FLASH_MODE].value<int>())); |
811 handleSettingValueChanged(CxeSettingIds::FLASH_MODE, scene[CxeSettingIds::FLASH_MODE]); |
877 handleSettingValueChanged(CxeSettingIds::FLASH_MODE, scene[CxeSettingIds::FLASH_MODE]); |
812 } else { |
878 } else { |
813 // No flash mode specified within the scene. |
879 // No flash mode specified within the scene. |
814 // Check from setting model what is it currently. |
880 // Check from setting model what is it currently. |
815 int flashMode(Cxe::FlashAuto); |
881 Cxe::FlashMode flashMode = mEngine->settings().get<Cxe::FlashMode>(CxeSettingIds::FLASH_MODE, Cxe::FlashAuto); |
816 mEngine->settings().get(CxeSettingIds::FLASH_MODE, flashMode); |
|
817 handleSettingValueChanged(CxeSettingIds::FLASH_MODE, QVariant(flashMode)); |
882 handleSettingValueChanged(CxeSettingIds::FLASH_MODE, QVariant(flashMode)); |
818 } |
883 } |
|
884 |
819 } |
885 } |
820 |
886 |
821 CX_DEBUG_EXIT_FUNCTION(); |
887 CX_DEBUG_EXIT_FUNCTION(); |
822 } |
888 } |
823 |
889 |