camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp
changeset 40 2922f70fca82
parent 39 c5025ea871a1
child 41 67457b2ffb33
--- a/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Thu Jul 15 01:46:05 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Thu Jul 15 01:49:11 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
 //
 // ---------------------------------------------------------------------------