--- a/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp Thu May 13 21:30:19 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp Thu Jul 15 01:55:05 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -16,7 +16,6 @@
*/
#include <coemain.h>
-#include <QGraphicsSceneEvent>
#include <QProcess>
#include <QApplication>
#include <hbmainwindow.h>
@@ -55,48 +54,37 @@
#include "cxuisettingslider.h"
#include "cxuisettingsinfo.h"
#include "OstTraceDefinitions.h"
+#include "cxuiserviceprovider.h"
+#include "cxuizoomslider.h"
+#include "cxuifullscreenpopup.h"
+
#ifdef OST_TRACE_COMPILER_IN_USE
#include "cxuiprecaptureviewTraces.h"
#endif
-#include "cxuiserviceprovider.h"
-#include "cxuizoomslider.h"
-
-
-// CONSTANTS
-const int CXUI_HIDE_CONTROLS_TIMEOUT = 6000; // 6 seconds
-const QString PhotosAppExe = "photos.exe";
-const QString VideosAppExe = "videoplayer.exe";
+#include "cxegeotaggingtrail.h"
using namespace CxUiLayout;
using namespace CxUiSettings;
using namespace CxUiInternal;
-
// ---------------------------------------------------------------------------
// CxuiPrecaptureView::CxuiPrecaptureView
// Constructor
// ---------------------------------------------------------------------------
//
CxuiPrecaptureView::CxuiPrecaptureView(QGraphicsItem *parent) :
- HbView(parent),
- mEngine(0),
+ CxuiView(parent),
mViewfinder(0),
- mMainWindow(0),
- mDocumentLoader(0),
mDisplayHandler(0),
- mControlsVisible(false),
- mHideControlsTimeout(this),
- mSlider(0),
- mToolBar(0),
mSettingsGrid(0),
- mZoomVisible(false),
mWidgetsLoaded(false),
mSettingsDialog(NULL),
mSettingsDialogList(NULL),
- mKeyHandler(NULL),
mQualityIcon(NULL),
- mIndicators(NULL),
+ mGeoTaggingIndicatorIcon(NULL),
+ mFaceTrackingIcon(NULL),
+ mStandbyPopup(NULL),
mSettingsDialogHeading(NULL),
mSliderSettingsDialog(NULL),
mSliderSettingsDialogHeading(NULL),
@@ -118,22 +106,23 @@
CX_DEBUG_EXIT_FUNCTION();
}
-
+/**
+ * CxuiPrecaptureView::construct
+ * Construct-method handles initialisation tasks for this class.
+ * @param mainwindow
+ * @param engine
+ * @param documentLoader
+ * @param keyHandler
+ */
void CxuiPrecaptureView::construct(HbMainWindow *mainWindow, CxeEngine *engine,
CxuiDocumentLoader *documentLoader,
- CxuiCaptureKeyHandler * keyHandler)
+ CxuiCaptureKeyHandler * keyHandler,
+ HbActivityManager *activityManager)
{
CX_DEBUG_ENTER_FUNCTION();
- OstTrace0( camerax_performance, CXUIPRECAPTUREVIEW_CONSTRUCT, "msg: e_CX_PRECAPVIEW_CONST 1" );
+ OstTrace0(camerax_performance, CXUIPRECAPTUREVIEW_CONSTRUCT_1, "msg: e_CX_PRECAPVIEW_CONSTRUCT 1");
- CX_ASSERT_ALWAYS(mainWindow);
- CX_ASSERT_ALWAYS(engine);
- CX_ASSERT_ALWAYS(documentLoader);
-
- mMainWindow = mainWindow;
- mEngine = engine;
- mDocumentLoader = documentLoader;
- mKeyHandler = keyHandler;
+ CxuiView::construct(mainWindow, engine, documentLoader, keyHandler, activityManager);
mSettingsInfo = new CxuiSettingsInfo(engine);
CX_DEBUG_ASSERT(mSettingsInfo);
@@ -150,6 +139,9 @@
connect(&mEngine->viewfinderControl(), SIGNAL(stateChanged(CxeViewfinderControl::State, CxeError::Id)),
this, SLOT(handleVfStateChanged(CxeViewfinderControl::State, CxeError::Id)));
+ connect(&mEngine->geoTaggingTrail(), SIGNAL(stateChanged(CxeGeoTaggingTrail::State, CxeError::Id)),
+ this, SLOT(updateLocationIndicator(CxeGeoTaggingTrail::State, CxeError::Id)));
+
connect(&(mEngine->settings()), SIGNAL(settingValueChanged(const QString&,QVariant)),
this, SLOT(handleSettingValueChanged(const QString&, QVariant)));
@@ -167,30 +159,21 @@
connect(exitAction, SIGNAL(triggered()), CxuiServiceProvider::instance(), SLOT(sendFilenameToClientAndExit()));
setNavigationAction(exitAction);
}
- OstTrace0( camerax_performance, DUP1_CXUIPRECAPTUREVIEW_CONSTRUCT, "msg: e_CX_PRECAPVIEW_CONST 0" );
+
+ OstTrace0(camerax_performance, CXUIPRECAPTUREVIEW_CONSTRUCT_2, "msg: e_CX_PRECAPVIEW_CONSTRUCT 0");
QCoreApplication::instance()->installEventFilter(this);
CX_DEBUG_EXIT_FUNCTION();
}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::prepareWindow
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::prepareWindow()
+/*!
+* Is standby mode supported / needed by this view.
+* Pre-capture views implement / need standby mode and return true.
+* @return True if standby mode is supported, false otherwise.
+*/
+bool CxuiPrecaptureView::isStandbyModeSupported() const
{
- CX_DEBUG_ENTER_FUNCTION();
-
- if (mMainWindow) {
- mEngine->viewfinderControl().setWindow(mMainWindow->effectiveWinId());
- setFlag(QGraphicsItem::ItemIsFocusable);
- setFocusPolicy(Qt::StrongFocus);
- setFocus();
- }
-
- CX_DEBUG_EXIT_FUNCTION();
+ return true;
}
// ---------------------------------------------------------------------------
@@ -240,93 +223,6 @@
}
// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideControls()
-{
- CX_DEBUG_ENTER_FUNCTION();
-
- hideItems(Hb::AllItems);
- hideZoom();
- mControlsVisible = false;
- if (mHideControlsTimeout.isActive()) {
- mHideControlsTimeout.stop();
- }
- hideToolbar();
-
- // show indicators when controls are hidden
- showIndicators();
-
- // give the keyboard focus back to the view
- // for the view to receive key events
- setFocus();
-
- CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideToolbar
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideToolbar()
-{
- CX_DEBUG_ENTER_FUNCTION();
- if (mToolBar) {
- mToolBar->hide();
- }
- CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideZoom
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideZoom()
-{
- if (mSlider) {
- mSlider->hide();
- }
- mZoomVisible = false;
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showZoom
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showZoom()
-{
- CX_DEBUG_ENTER_FUNCTION();
- if (mSlider) {
-
- // if maxVal has not been set yet, ask for new parameters from engine
- if (mSlider->maximum() <= 0) {
-
- // get the zoom range
- int min = mEngine->zoomControl().min();
- int max = mEngine->zoomControl().max();
-
- // only change values if they are acceptable and have changed
- if ((max - min > 0) && ((mSlider->maximum() != max) || (mSlider->minimum() != min))) {
- mSlider->setRange(min, max);
- }
- }
-
- // show zoom only if the slider has acceptable value
- if (mSlider->maximum() > 0) {
- mSlider->show();
- }
- }
-
- mZoomVisible = true;
- CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
// CxuiPrecaptureView::toggleZoom
//
// ---------------------------------------------------------------------------
@@ -340,77 +236,6 @@
}
}
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideIndicators
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideIndicators()
-{
- if (mIndicators) {
- mIndicators->hide();
- }
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showIndicators
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showIndicators()
-{
- if (mIndicators) {
- mIndicators->show();
- }
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showControls()
-{
- if (mEngine) {
- bool videoCases = (mEngine->videoCaptureControl().state() == CxeVideoCaptureControl::Recording ||
- mEngine->videoCaptureControl().state() == CxeVideoCaptureControl::Paused);
-
- if (mEngine->isEngineReady() || videoCases) {
- // show toolbar
- showToolbar();
- // show zoom
- showZoom();
- // show titlepane
- showItems(Hb::AllItems);
-
- // hide indicators when controls are shown
- hideIndicators();
-
- mHideControlsTimeout.start();
- mControlsVisible = true;
- }
- }
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showToolbar
-// shows toolbar
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showToolbar()
-{
-
- CX_DEBUG_ENTER_FUNCTION();
-
- // toolbar pointer is missing if widgets for the view have not been loaded
- // from the DocML
- if (mToolBar) {
- mToolBar->show();
- }
-
- CX_DEBUG_EXIT_FUNCTION();
-}
-
/*
* Event filter which filters tool bar mouse events and
@@ -419,17 +244,23 @@
bool CxuiPrecaptureView::eventFilter(QObject *object, QEvent *event)
{
- Q_UNUSED(object)
-
bool eventWasConsumed = false;
switch (event->type())
{
case QEvent::GraphicsSceneMouseRelease:
- mHideControlsTimeout.start();
+ if (mStandbyPopup) {
+ mStandbyPopup->handleMouseRelease();
+ } else {
+ mHideControlsTimeout.start();
+ }
break;
case QEvent::GraphicsSceneMousePress:
- mHideControlsTimeout.stop();
+ if (object == mStandbyPopup) {
+ mStandbyPopup->handleMousePress();
+ } else {
+ mHideControlsTimeout.stop();
+ }
break;
default:
break;
@@ -452,27 +283,7 @@
// call load widgets to load app DocML and get the pointers to needed widgets
loadWidgets();
}
-
- if (mControlsVisible) {
- hideControls();
- } else {
- showControls();
- }
-}
-
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::mousePressEvent
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
- //! @todo temporary workaround for title bar mouse event handling bug
- if (event->type() == QEvent::GraphicsSceneMousePress && event->scenePos().y() > 70) {
- toggleControls();
- event->accept();
- }
+ CxuiView::toggleControls();
}
// ---------------------------------------------------------------------------
@@ -582,16 +393,6 @@
CX_DEBUG_EXIT_FUNCTION();
}
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::releaseCamera
-// ---------------------------------------------------------------------------
-void CxuiPrecaptureView::releaseCamera()
-{
- CX_DEBUG_ENTER_FUNCTION();
- mEngine->cameraDeviceControl().release();
- CX_DEBUG_EXIT_FUNCTION();
-}
-
// ---------------------------------------------------------------------------
// CxuiPrecaptureView::initCamera
@@ -631,18 +432,48 @@
CX_DEBUG_EXIT_FUNCTION();
}
-
-/*
- * CxuiPrecaptureView::handleFocusGained
- */
-void CxuiPrecaptureView::handleFocusGained()
+/*!
+* Slot for entering standby mode.
+* Show standby canvas in addition to base class implementation.
+* @sa CxuiView::enterStandby()
+*/
+void CxuiPrecaptureView::enterStandby()
{
CX_DEBUG_ENTER_FUNCTION();
- // Set the window size and handle again.
- prepareWindow();
+ // Release camera right away to avoid any problems with GPU memory.
+ CxuiView::enterStandby();
+
+ // If this view is still the current view, show popup.
+ // If we moved to precapture view because (error) standby during capturing,
+ // don't try show the popup.
+ if (mMainWindow->currentView() == this) {
+ // Show standby canvas / popup.
+ if (!mStandbyPopup) {
+ mStandbyPopup = CxuiFullScreenPopup::create(scene(), hbTrId("txt_cam_info_camera_in_standby_mode"));
+ }
+ mStandbyPopup->show();
+ }
+ CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+* Slot for exiting standby mode.
+* Hide the standby canvas and re-prepare camera.
+* @sa CxuiView::exitStandby()
+*/
+void CxuiPrecaptureView::exitStandby()
+{
+ CX_DEBUG_ENTER_FUNCTION();
+ CxuiView::exitStandby();
+
+ if (mStandbyPopup) {
+ mStandbyPopup->hide();
+ delete mStandbyPopup;
+ mStandbyPopup = NULL;
+ }
+
initCamera();
-
CX_DEBUG_EXIT_FUNCTION();
}
@@ -671,15 +502,21 @@
*/
void CxuiPrecaptureView::prepareToCloseDialog(HbAction *action)
{
- if (!action) {
- return;
- }
-
// Check if the dialog was started from grid, and show the grid now if needed.
// Autofocus key-press will clear the action to disable showing the grid.
- QString fromGrid = action->property(PROPERTY_KEY_SETTING_GRID).toString();
- if (fromGrid.compare(QString(PROPERTY_KEY_TRUE)) == 0 ) {
- showSettingsGrid();
+ if (action) {
+ QString fromGrid = action->property(PROPERTY_KEY_SETTING_GRID).toString();
+ if (fromGrid.compare(QString(PROPERTY_KEY_TRUE)) == 0 ) {
+ showSettingsGrid();
+ }
+ // disable geotagging disclaimer after geotagging setting is triggered from FirstTimeUse dialog
+ QString settingId = action->property(PROPERTY_KEY_SETTING_ID).toString();
+ int value = Cxe::GeoTaggingDisclaimerDisabled;
+ mEngine->settings().get(CxeSettingIds::GEOTAGGING_DISCLAIMER, value);
+ if (settingId == CxeSettingIds::GEOTAGGING && value == Cxe::GeoTaggingDisclaimerEnabled) {
+ // disable geotagging first-time-use dialog
+ disableGeotaggingDisclaimer();
+ }
}
// Clear the starter actions to be sure they are not reused.
@@ -689,6 +526,16 @@
if (mSliderSettingsDialog) {
mSliderSettingsDialog->setStarterAction(NULL);
}
+
+ // Dialog will be deleted automatically when closed
+ // The pointers may become invalid at any time
+ mSettingsDialog = NULL;
+ mSettingsDialogList = NULL;
+ mSettingsDialogHeading = NULL;
+
+ mSliderSettingsDialog = NULL;
+ mSliderSettingsDialogHeading = NULL;
+ mSettingsSlider = NULL;
}
@@ -748,6 +595,8 @@
return;
}
+ hideControls();
+
QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
@@ -794,7 +643,9 @@
// Adjust position and show the dialog.
mSettingsDialog->setPreferredPos(getDialogPosition(), HbPopup::BottomRightCorner);
+ mSettingsDialog->setAttribute(Qt::WA_DeleteOnClose, true);
mSettingsDialog->show();
+
}
} else {
launchNotSupportedNotification();
@@ -856,6 +707,8 @@
return;
}
+ hideControls();
+
QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
@@ -903,7 +756,9 @@
// Adjust position and show the dialog.
mSliderSettingsDialog->setFrameType(HbPopup::Weak);
mSliderSettingsDialog->setPreferredPos(getDialogPosition(), HbPopup::BottomRightCorner);
+ mSliderSettingsDialog->setAttribute(Qt::WA_DeleteOnClose, true);
mSliderSettingsDialog->show();
+
}
} else {
launchNotSupportedNotification();
@@ -912,42 +767,6 @@
CX_DEBUG_EXIT_FUNCTION();
}
-void CxuiPrecaptureView::launchPhotosApp()
-{
- QProcess::startDetached(PhotosAppExe);
-}
-
-/*!
- * Launching Videos application as a separate process
- */
-void CxuiPrecaptureView::launchVideosApp()
-{
- //Releasing cameda device in order to free
- //graphical memory
- releaseCamera();
- QProcess::startDetached(VideosAppExe);
-}
-
-/*!
-* Show "not supported" notification.
-*/
-void CxuiPrecaptureView::launchNotSupportedNotification()
-{
- CX_DEBUG_ENTER_FUNCTION();
- HbNotificationDialog::launchDialog("Notification", "Not supported yet");
- CX_DEBUG_EXIT_FUNCTION();
-}
-
-/*!
-* Show "Disk full" notification.
-*/
-void CxuiPrecaptureView::launchDiskFullNotification()
-{
- CX_DEBUG_ENTER_FUNCTION();
- HbMessageBox::warning(hbTrId("txt_cam_info_memory_full"));
- CX_DEBUG_EXIT_FUNCTION();
-}
-
/**
* Show settings grid.
*/
@@ -980,80 +799,6 @@
CX_DEBUG_EXIT_FUNCTION();
}
-/**
-* Get if postcapture view should be shown or not.
-* Postcapture view may be shown for a predefined time or
-* until user dismisses it, or it may be completely disabled.
-*/
-bool CxuiPrecaptureView::isPostcaptureOn() const
-{
- CX_DEBUG_ENTER_FUNCTION();
- if (CxuiServiceProvider::isCameraEmbedded()) {
- // always show post capture in embedded mode
- return true;
- }
-
- // Read the value from settings. Ignoring reading error.
- // On error (missing settings) default to "postcapture on".
- int showPostcapture(-1);
- QString key;
- if(mEngine) {
- if (mEngine->mode() == Cxe::ImageMode) {
- key = CxeSettingIds::STILL_SHOWCAPTURED;
- } else {
- key = CxeSettingIds::VIDEO_SHOWCAPTURED;
- }
- mEngine->settings().get(key, showPostcapture);
- }
-
- CX_DEBUG_EXIT_FUNCTION();
- return showPostcapture != 0; // 0 == no postcapture
-}
-
-/*!
-* Adding zoom buttons to the slider
-* \param slider Pointer to the slider object, where the buttons will be added
-*/
-void CxuiPrecaptureView::addIncreaseDecreaseButtons(CxuiZoomSlider *slider)
-{
- // get current slider elements
- QList<QVariant> elements = slider->sliderElements();
-
- // add increase and decrease elements to the slider
- elements << HbSlider::IncreaseElement << HbSlider::DecreaseElement;
- slider->setSliderElements(elements);
-
- // set icons for the increase and decrease element
- slider->setElementIcon(HbSlider::DecreaseElement , HbIcon("qtg_mono_minus"));
- slider->setElementIcon(HbSlider::IncreaseElement , HbIcon("qtg_mono_plus"));
-}
-
-
-/*!
-* Function can be used to create a graphics item and setting it as a background
-* item for HbWidget. graphicName refers to system wide graphic name. Given graphic
-* can consist of one, three or nine pieces. Nine piece graphics are used by default.
-* See HbFrameDrawer documentation for graphic naming.
-*/
-void CxuiPrecaptureView::createWidgetBackgroundGraphic(HbWidget *widget,
- const QString &graphicName,
- HbFrameDrawer::FrameType frameType)
-{
- if (widget) {
- HbFrameDrawer *drawer = new HbFrameDrawer(graphicName, frameType);
-
- if (drawer) {
- HbFrameItem *backgroundItem = new HbFrameItem(drawer, widget);
- if (backgroundItem) {
- // set item to fill the whole widget
- backgroundItem->setGeometry(QRectF(QPointF(0, 0), widget->size()));
- backgroundItem->setZValue(0);
- widget->setBackgroundItem(backgroundItem);
- }
- }
- }
-}
-
/*!
* Returns dialogs bottom right corner
*/
@@ -1103,33 +848,6 @@
return icon;
}
-/*!
- Update the quality indicator
-*/
-void CxuiPrecaptureView::updateQualityIcon()
-{
- CX_DEBUG_ENTER_FUNCTION();
-
- if (mQualityIcon && mEngine) {
- QString key = "";
- QString icon = "";
- int currentValue = -1;
-
- if (mEngine->mode() == Cxe::VideoMode) {
- key = CxeSettingIds::VIDEO_QUALITY;
- } else {
- key = CxeSettingIds::IMAGE_QUALITY;
- }
-
- mEngine->settings().get(key, currentValue);
- icon = getSettingItemIcon(key, currentValue);
-
- mQualityIcon->setIcon(HbIcon(icon));
- }
-
- CX_DEBUG_EXIT_FUNCTION();
-}
-
void CxuiPrecaptureView::handleSettingValueChanged(const QString& key, QVariant newValue)
{
CX_DEBUG_ENTER_FUNCTION();
@@ -1138,4 +856,91 @@
CX_DEBUG_EXIT_FUNCTION();
}
+/*!
+ * Slot to keep track of state changes in GeotaggingLocation trail. We use these states to update
+ * the UI by enabling right icon.
+ */
+void CxuiPrecaptureView::updateLocationIndicator(CxeGeoTaggingTrail::State newState, CxeError::Id error)
+{
+ CX_DEBUG( ("CxuiPrecaptureView::updateLocationIndicator <> error: %d ", error));
+
+ if (mGeoTaggingIndicatorIcon) {
+ if (newState == CxeGeoTaggingTrail::DataAvailable && error == CxeError::None) {
+ CX_DEBUG(("CxuiPrecaptureView::updateLocationIndicator GPS data available, showing icon"));
+ mGeoTaggingIndicatorIcon->setIcon(HbIcon("qtg_mono_geotag"));
+ mGeoTaggingIndicatorIcon->show();
+ } else {
+ CX_DEBUG(("CxuiPrecaptureView::handleIconChanged GPS data not available"));
+ mGeoTaggingIndicatorIcon->hide();
+ }
+ }
+
+ CX_DEBUG_EXIT_FUNCTION();
+}
+
+
+/*!
+* Lauches "Geotagging first-time use" notification to the user
+*/
+void CxuiPrecaptureView::launchGeoTaggingDisclaimerDialog()
+{
+ CX_DEBUG_ENTER_FUNCTION();
+
+ HbMessageBox *ftuMessageBox = new HbMessageBox(hbTrId("txt_cam_info_captured_photos_and_videos_will_be_ta"),
+ HbMessageBox::MessageTypeInformation);
+
+ HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"));
+ HbAction *settingsAction = new HbAction(hbTrId("txt_cam_opt_general_settings"));
+
+ // connecting signals for dialog's actions
+ connect(okAction,
+ SIGNAL(triggered()),
+ this,
+ SLOT(disableGeotaggingDisclaimer()));
+
+ connect(settingsAction,
+ SIGNAL(triggered()),
+ this,
+ SLOT(launchGeoTaggingSetting()));
+
+ // adding buttons to the information message
+ ftuMessageBox->setStandardButtons(HbMessageBox::NoButton);
+ ftuMessageBox->addAction(okAction);
+ ftuMessageBox->addAction(settingsAction);
+
+ ftuMessageBox->setAttribute(Qt::WA_DeleteOnClose, true);
+ ftuMessageBox->show();
+
+ CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+* Slot that disables Geotagging first-time use notification.
+*/
+void CxuiPrecaptureView::disableGeotaggingDisclaimer()
+{
+ CX_DEBUG_ENTER_FUNCTION();
+
+ // disable geotagging first-time-use dialog
+ mEngine->settings().set(CxeSettingIds::GEOTAGGING_DISCLAIMER, Cxe::GeoTaggingDisclaimerDisabled);
+
+ CX_DEBUG_EXIT_FUNCTION();
+}
+
+
+/*!
+* Slot that launches geotagging setting dialog.
+*/
+void CxuiPrecaptureView::launchGeoTaggingSetting()
+{
+ CX_DEBUG_ENTER_FUNCTION();
+
+ QObject *action = sender();
+ action->setProperty(PROPERTY_KEY_SETTING_ID, CxeSettingIds::GEOTAGGING);
+ launchSettingsDialog(action);
+
+ CX_DEBUG_EXIT_FUNCTION();
+}
+
// end of file
+