camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h
changeset 43 0e652f8f1fbd
parent 28 3075d9b614e6
child 45 24fd82631616
--- a/camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h	Thu May 13 21:30:19 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h	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"
@@ -20,42 +20,50 @@
 #include <QObject>
 #include <QList>
 #include <QTimer>
-#include <hbview.h>
 #include <xqappmgr.h>
+#include "cxuiview.h"
 
 class QGraphicsRectItem;
 class HbMainWindow;
 class HbAction;
 class HbLabel;
+class ShareUi;
 
 class CxeEngine;
 class CxuiDocumentLoader;
-
+class ThumbnailManager;
 
 /**
  * Post-capture view
  */
-class CxuiPostcaptureView : public HbView
+class CxuiPostcaptureView : public CxuiView
 {
     Q_OBJECT
 
 public:
     CxuiPostcaptureView(QGraphicsItem *parent = 0);
     virtual ~CxuiPostcaptureView();
-    void construct(HbMainWindow *mainwindow, CxeEngine *engine, CxuiDocumentLoader *documentLoader);
+    void construct(HbMainWindow *mainwindow, CxeEngine *engine,
+                   CxuiDocumentLoader *documentLoader, CxuiCaptureKeyHandler *keyHandler,
+                   HbActivityManager *activityManager);
 
     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
 
+    void restoreActivity(const QString &activityId, const QVariant &data);
+    void saveActivity();
+    void clearActivity();
+
 signals:
     void changeToPrecaptureView();
 
 public slots:
+    void enterStandby();
+    void exitStandby();
     void handleCaptureKeyPressed();
     void handleAutofocusKeyPressed();
 
 protected:
     bool eventFilter(QObject *object, QEvent *event);
-    void mousePressEvent(QGraphicsSceneMouseEvent *event);
     void showEvent(QShowEvent *event);
     void hideEvent(QHideEvent *event);
     void showToolbar();
@@ -66,42 +74,35 @@
 protected slots:
     void goToPrecaptureView();
     void stopViewfinder();
-    void releaseCamera();
 
-    // Control visibility
-    void hideControls();
-    void showControls();
-    void toggleControls();
+    void hideToolbar();
 
     // toolbar actions
-    void launchPhotosApp();
     void select();
     void launchShare();
     void playVideo();
     void showDeleteNote();
-    void launchVideosApp();
 
-    void handleDeleteDialogClosed(HbAction *action);
+    void handleDeleteDialogClosed(int action);
 
 private:
-    void launchNotSupportedNotification();
     QString getCurrentFilename();
 
+    void startTimers();
+    void startPostcaptureTimer();
+    void startReleaseTimers();
+
 private slots:
-    void startTimers();
-    void handleFocusLost();
+    void handleThumbnailReady(QPixmap thumbnail, void *clientData, int id, int errorCode);
 
 private: // data
-    HbMainWindow *mMainWindow; // not own
-    CxeEngine *mEngine; // not own
-    CxuiDocumentLoader *mDocumentLoader; // not own
     HbToolBar *mStillToolbar;
     HbToolBar *mVideoToolbar;
     HbToolBar *mEmbeddedToolbar;
     QGraphicsRectItem *mBackgroundItem;
     HbLabel *mImageLabel;
 
-    QTimer mHideControlsTimeout;
+    ShareUi *mShareUi;
 
     /**
      * Timer used to stop viewfinder after a delay if the user remains in
@@ -125,12 +126,15 @@
     */
     QTimer mPostcaptureTimer;
 
-    bool mControlsVisible;
+    bool mTimersStarted;
 
-    bool mTimersStarted;
-    
     XQApplicationManager mAppManager;
 
+    bool mDeleteNoteOpen;
+
+    QString mFilename;
+
+    ThumbnailManager *mThumbnailManager;
 };
 
 #endif // CXUIPOSTCAPTUREVIEW_H