camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp
changeset 36 b12f3922a74f
parent 32 5c1e3c6aa4ef
child 37 64817133cd1d
--- a/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Fri Jun 11 13:26:48 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Wed Jun 23 17:59:54 2010 +0300
@@ -17,7 +17,6 @@
 #include <QDebug>
 #include <QPixmap>
 #include <QTimer>
-#include <QGraphicsSceneEvent>
 #include <QFileInfo>
 #include <QApplication>
 #include <QGraphicsRectItem>
@@ -76,6 +75,7 @@
     mEmbeddedToolbar(NULL),
     mBackgroundItem(NULL),
     mImageLabel(NULL),
+    mShareUi(NULL),
     mStopViewfinderTimer(this),
     mReleaseCameraTimer(this),
     mPostcaptureTimer(this),
@@ -97,6 +97,7 @@
     CX_DEBUG_ENTER_FUNCTION();
     QCoreApplication::instance()->removeEventFilter(this);
     stopTimers();
+    delete mShareUi;
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -126,6 +127,8 @@
     mImageLabel = qobject_cast<HbLabel *>(widget);
     CX_DEBUG_ASSERT(mImageLabel);
 
+    mShareUi = new ShareUi();
+
     // get toolbar pointers from the documentloader
     widget = mDocumentLoader->findWidget(STILL_POST_CAPTURE_TOOLBAR);
     // This resize is a workaround to get toolbar shown correctly.
@@ -206,7 +209,7 @@
  */
 void CxuiPostcaptureView::playVideo()
 {
-
+    
     launchNotSupportedNotification();
     //! @todo needs an implementation
     CX_DEBUG_IN_FUNCTION();
@@ -285,16 +288,12 @@
 
     stopTimers();
     releaseCamera();
-
+    hideControls();
     QString filename = getCurrentFilename();
-
     QStringList filelist;
     filelist.append(filename);
 
-    ShareUi dialog;
-    dialog.send(filelist, true);
-
-    showControls();
+    mShareUi->send(filelist, true);
 
     CX_DEBUG_EXIT_FUNCTION();
 }
@@ -398,22 +397,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// CxuiPostcaptureView::mousePressEvent
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPostcaptureView::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-
-    if (event->type() == QEvent::GraphicsSceneMousePress) {
-        mPostcaptureTimer.stop();
-        toggleControls();
-        event->accept();
-    }
-
-}
-
-// ---------------------------------------------------------------------------
 // CxuiPostcaptureView::showEvent
 //
 // ---------------------------------------------------------------------------