camerauis/cameraxui/cxui/inc/cxuistillprecaptureview.h
changeset 37 64817133cd1d
parent 36 b12f3922a74f
child 42 feebad15db8c
child 48 42ba2d16bf40
equal deleted inserted replaced
36:b12f3922a74f 37:64817133cd1d
    35 class HbPushButton;
    35 class HbPushButton;
    36 class HbLabel;
    36 class HbLabel;
    37 class CxuiSelfTimerRadioButtonList;
    37 class CxuiSelfTimerRadioButtonList;
    38 class HbToolBarExtension;
    38 class HbToolBarExtension;
    39 class HbWidget;
    39 class HbWidget;
       
    40 
    40 /**
    41 /**
    41  * Pre-capture view for still image mode
    42  * Pre-capture view for still image mode
    42  */
    43  */
    43 
       
    44 
       
    45 class CxuiStillPrecaptureView : public CxuiPrecaptureView
    44 class CxuiStillPrecaptureView : public CxuiPrecaptureView
    46 {
    45 {
    47     Q_OBJECT
    46     Q_OBJECT
    48 
    47 
    49 public:
    48 public:
    51 
    50 
    52     virtual ~CxuiStillPrecaptureView();
    51     virtual ~CxuiStillPrecaptureView();
    53 
    52 
    54 public:
    53 public:
    55 
    54 
    56     /**
    55     virtual void construct(HbMainWindow *mainwindow, 
    57      * Construct-method handles initialisation tasks for this class. Needs to be called
    56                            CxeEngine *engine,
    58      * before the instance of this class is used.
    57                            CxuiDocumentLoader *documentLoader, 
    59      * @param mainwindow
    58                            CxuiCaptureKeyHandler *keyHandler,
    60      * @param engine
    59                            HbActivityManager *activityManager);
    61      * @param documentLoader
       
    62      * @param keyHandler
       
    63      */
       
    64     virtual void construct(HbMainWindow *mainwindow, CxeEngine *engine,
       
    65                    CxuiDocumentLoader *documentLoader, CxuiCaptureKeyHandler *keyHandler = NULL);
       
    66 
    60 
    67     /**
       
    68      * Loads default widgets in layouts xml.
       
    69      */
       
    70     virtual void loadDefaultWidgets();
    61     virtual void loadDefaultWidgets();
    71 
       
    72     /**
       
    73      * Loads widgets that are not part of the default section in layouts xml.
       
    74      * Widgets are created at the time they are first loaded.
       
    75      */
       
    76     virtual void loadWidgets();
    62     virtual void loadWidgets();
    77 
    63 
       
    64     void restoreActivity(const QString &activityId, const QVariant &data);
       
    65     void saveActivity();
       
    66     void clearActivity();
    78 protected:
    67 protected:
    79 
    68 
    80     void showEvent(QShowEvent *event);
    69     void showEvent(QShowEvent *event);
    81     virtual bool allowShowControls() const;
    70     virtual bool allowShowControls() const;
    82 
    71 
    87 
    76 
    88     // whenever a scene setting is changed on the engine side, an icon might need updating on the toolbar
    77     // whenever a scene setting is changed on the engine side, an icon might need updating on the toolbar
    89     // connects to the sceneChanged signal of CxeSettings
    78     // connects to the sceneChanged signal of CxeSettings
    90     void handleSceneChanged(CxeScene &scene);
    79     void handleSceneChanged(CxeScene &scene);
    91 
    80 
       
    81     // From CxuiPrecaptureView
       
    82     virtual void enterStandby();
       
    83 
    92 protected slots:
    84 protected slots:
    93     void focusAndCapture();
    85     void focusAndCapture();
    94     void capture();
    86     void capture();
    95     void setCapturePending();
    87     void setCapturePending();
    96     void goToVideo();
    88     void goToVideo();
    97 
       
    98 
    89 
    99     // Key events
    90     // Key events
   100     void handleCaptureKeyPressed();
    91     void handleCaptureKeyPressed();
   101     void handleAutofocusKeyPressed();
    92     void handleAutofocusKeyPressed();
   102     void handleAutofocusKeyReleased();
    93     void handleAutofocusKeyReleased();
   105     void handleAutoFocusStateChanged(CxeAutoFocusControl::State newState, CxeError::Id error);
    96     void handleAutoFocusStateChanged(CxeAutoFocusControl::State newState, CxeError::Id error);
   106     void handleViewfinderStateChanged(CxeViewfinderControl::State newState, CxeError::Id error);
    97     void handleViewfinderStateChanged(CxeViewfinderControl::State newState, CxeError::Id error);
   107     void handleStillCaptureStateChanged(CxeStillCaptureControl::State newState, CxeError::Id error);
    98     void handleStillCaptureStateChanged(CxeStillCaptureControl::State newState, CxeError::Id error);
   108     void handleSnapshot(CxeError::Id error);
    99     void handleSnapshot(CxeError::Id error);
   109 
   100 
   110     /**
       
   111      * Signal used to reset mCapturePending after a short timeout. If the image
       
   112      * cannot be captured within a given time of the key press, it is better to cancel
       
   113      * the whole operation.
       
   114      */
       
   115     void resetCapturePendingFlag();
   101     void resetCapturePendingFlag();
   116 
   102 
   117     /**
       
   118      * Application focus slots are called if focus state is changed.
       
   119      * Camera is released or reserved according to new state.
       
   120      */
       
   121     void handleFocusLost();
       
   122     void launchSetting();
   103     void launchSetting();
   123     void updateImagesLeftLabel();
   104     void updateImagesLeftLabel();
   124 
   105 
   125 protected:
   106 protected:
   126     void initializeSettingsGrid();
   107     void initializeSettingsGrid();
       
   108     bool isPostcaptureOn() const;
       
   109     void updateSceneIcon(const QString& sceneId);
       
   110     void updateQualityIcon();
   127     void closeDialogs();
   111     void closeDialogs();
   128     void updateFaceTrackingIcon();
   112     void updateFaceTrackingIcon();
   129 
   113 
   130 protected:
   114 protected:
   131     CxuiSelfTimer *mSelfTimer;
   115     CxuiSelfTimer *mSelfTimer;