128 |
128 |
129 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_QUALITY_ICON); |
129 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_QUALITY_ICON); |
130 mQualityIcon = qobject_cast<HbLabel *>(widget); |
130 mQualityIcon = qobject_cast<HbLabel *>(widget); |
131 CX_DEBUG_ASSERT(mQualityIcon); |
131 CX_DEBUG_ASSERT(mQualityIcon); |
132 |
132 |
|
133 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_FACE_TRACKING_ICON); |
|
134 mFaceTrackingIcon = qobject_cast<HbLabel *>(widget); |
|
135 CX_DEBUG_ASSERT(mFaceTrackingIcon); |
|
136 |
133 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_INDICATOR_CONTAINER); |
137 widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_INDICATOR_CONTAINER); |
134 mIndicators = qobject_cast<HbWidget *>(widget); |
138 mIndicators = qobject_cast<HbWidget *>(widget); |
135 CX_DEBUG_ASSERT(mIndicators); |
139 CX_DEBUG_ASSERT(mIndicators); |
136 // create background for indicator container |
140 // create background for indicator container |
137 createWidgetBackgroundGraphic(mIndicators, TRANSPARENT_BACKGROUND_GRAPHIC); |
141 createWidgetBackgroundGraphic(mIndicators, TRANSPARENT_BACKGROUND_GRAPHIC); |
294 |
298 |
295 action = mSettingsGrid->addAction(HbIcon("qtg_mono_contrast"), hbTrId("txt_cam_button_contrast"), this, SLOT(launchSliderSetting())); |
299 action = mSettingsGrid->addAction(HbIcon("qtg_mono_contrast"), hbTrId("txt_cam_button_contrast"), this, SLOT(launchSliderSetting())); |
296 action->setProperty(PROPERTY_KEY_SETTING_ID, CxeSettingIds::CONTRAST); |
300 action->setProperty(PROPERTY_KEY_SETTING_ID, CxeSettingIds::CONTRAST); |
297 action->setProperty(PROPERTY_KEY_SETTING_GRID, PROPERTY_KEY_TRUE); |
301 action->setProperty(PROPERTY_KEY_SETTING_GRID, PROPERTY_KEY_TRUE); |
298 |
302 |
299 mSettingsGrid->addAction(HbIcon("qtg_mono_face_tracking"), hbTrId("txt_cam_button_face_tracking"), this, SLOT(launchNotSupportedNotification())); |
303 action = mSettingsGrid->addAction(HbIcon("qtg_mono_face_tracking"), hbTrId("txt_cam_button_face_tracking"), this, SLOT(launchSetting())); |
|
304 action->setProperty(PROPERTY_KEY_SETTING_ID, CxeSettingIds::FACE_TRACKING); |
300 action->setProperty(PROPERTY_KEY_SETTING_GRID, PROPERTY_KEY_TRUE); |
305 action->setProperty(PROPERTY_KEY_SETTING_GRID, PROPERTY_KEY_TRUE); |
301 |
306 |
302 connect(mCaptureKeyHandler, SIGNAL(autofocusKeyPressed()), mSettingsGrid, SLOT(close())); |
307 connect(mCaptureKeyHandler, SIGNAL(autofocusKeyPressed()), mSettingsGrid, SLOT(close())); |
303 } |
308 } |
304 } |
309 } |
553 { |
558 { |
554 CxuiPrecaptureView::showEvent(event); |
559 CxuiPrecaptureView::showEvent(event); |
555 |
560 |
556 updateImagesLeftLabel(); |
561 updateImagesLeftLabel(); |
557 updateQualityIcon(); |
562 updateQualityIcon(); |
|
563 updateFaceTrackingIcon(); |
558 |
564 |
559 // cancel selftimer when returning to precapture |
565 // cancel selftimer when returning to precapture |
560 // since selftimer needs to be turned off after capturing an image |
566 // since selftimer needs to be turned off after capturing an image |
561 // (with selftimer postcapture is always shown) |
567 // (with selftimer postcapture is always shown) |
562 if (mSelfTimer && mSelfTimer->isEnabled()) { |
568 if (mSelfTimer && mSelfTimer->isEnabled()) { |
702 if (key == CxeSettingIds::IMAGE_QUALITY) { |
708 if (key == CxeSettingIds::IMAGE_QUALITY) { |
703 // update the quality indicator on screen |
709 // update the quality indicator on screen |
704 updateQualityIcon(); |
710 updateQualityIcon(); |
705 // update images left when quality values are changed |
711 // update images left when quality values are changed |
706 updateImagesLeftLabel(); |
712 updateImagesLeftLabel(); |
|
713 } else if (key == CxeSettingIds::FACE_TRACKING) { |
|
714 updateFaceTrackingIcon(); |
707 } |
715 } |
708 |
716 |
709 // update toolbar flash icon |
717 // update toolbar flash icon |
710 if (mFlashSetting && key == CxeSettingIds::FLASH_MODE) { |
718 if (mFlashSetting && key == CxeSettingIds::FLASH_MODE) { |
711 CX_DEBUG((("flash mode: %d"), newValue.toInt())); |
719 CX_DEBUG((("flash mode: %d"), newValue.toInt())); |
790 } |
798 } |
791 |
799 |
792 CX_DEBUG_EXIT_FUNCTION(); |
800 CX_DEBUG_EXIT_FUNCTION(); |
793 } |
801 } |
794 |
802 |
|
803 /*! |
|
804 Update the face tracking icon |
|
805 */ |
|
806 void CxuiStillPrecaptureView::updateFaceTrackingIcon() |
|
807 { |
|
808 CX_DEBUG_ENTER_FUNCTION(); |
|
809 if (mFaceTrackingIcon && mEngine) { |
|
810 QString key = ""; |
|
811 QString icon = ""; |
|
812 int currentValue = -1; |
|
813 |
|
814 key = CxeSettingIds::FACE_TRACKING; |
|
815 |
|
816 mEngine->settings().get(key, currentValue); |
|
817 icon = getSettingItemIcon(key, currentValue); |
|
818 |
|
819 mFaceTrackingIcon->setIcon(HbIcon(icon)); |
|
820 } |
|
821 |
|
822 CX_DEBUG_EXIT_FUNCTION(); |
|
823 } |
|
824 |
795 // end of file |
825 // end of file |