60 |
63 |
61 virtual ~CxuiPrecaptureView(); |
64 virtual ~CxuiPrecaptureView(); |
62 |
65 |
63 public: |
66 public: |
64 |
67 |
65 virtual void construct(HbMainWindow *mainWindow, CxeEngine *engine, |
68 virtual void construct(HbMainWindow *mainWindow, |
|
69 CxeEngine *engine, |
66 CxuiDocumentLoader *documentLoader, |
70 CxuiDocumentLoader *documentLoader, |
67 CxuiCaptureKeyHandler *keyHandler); |
71 CxuiCaptureKeyHandler *keyHandler, |
|
72 HbActivityManager *activityManager); |
68 |
73 |
|
74 virtual bool isStandbyModeSupported() const; |
69 /** |
75 /** |
70 * Loads widgets that are not part of the default section in layouts xml. |
76 * Loads widgets that are not part of the default section in layouts xml. |
71 * Widgets are created at the time they are first loaded. |
77 * Widgets are created at the time they are first loaded. |
72 */ |
78 */ |
73 virtual void loadWidgets() = 0; |
79 virtual void loadWidgets() = 0; |
74 void prepareWindow(); |
|
75 |
|
76 public slots: |
|
77 |
|
78 void initCamera(); |
|
79 void requestCameraSwitch(); |
|
80 |
|
81 // whenever a setting is changed on the engine side, an icon might need updating |
|
82 // connects to the settingValueChanged signal of CxeSettings |
|
83 virtual void handleSettingValueChanged(const QString& key, QVariant newValue); |
|
84 |
|
85 protected slots: |
|
86 |
|
87 // Key events |
|
88 virtual void handleAutofocusKeyPressed(); |
|
89 |
|
90 // Camera / Engine |
|
91 void handleEngineZoomStateChange(CxeZoomControl::State newState, CxeError::Id error); |
|
92 void handleZoomLevelChange(int); |
|
93 void handleVfStateChanged(CxeViewfinderControl::State newState, CxeError::Id error); |
|
94 virtual void handleFocusGained(); |
|
95 virtual void handleFocusLost() = 0; |
|
96 // UI: Zoom slider change notification |
|
97 void zoomTo(int value); |
|
98 |
|
99 void disableControlsTimeout(); |
|
100 |
|
101 void toggleZoom(); |
|
102 |
|
103 // Settings related |
|
104 void launchDiskFullNotification(); |
|
105 void showSettingsGrid(); |
|
106 void hideSettingsGrid(); |
|
107 void launchSliderSetting(); |
|
108 void prepareToShowDialog(HbAction *action); |
|
109 void prepareToCloseDialog(HbAction *action); |
|
110 |
|
111 protected: |
|
112 void toggleControls(); |
|
113 virtual void initializeSettingsGrid() = 0; |
|
114 void showEvent(QShowEvent *event); |
|
115 void hideEvent(QHideEvent *event); |
|
116 bool eventFilter(QObject *object, QEvent *event); |
|
117 void launchSettingsDialog(QObject *action); |
|
118 bool isPostcaptureOn() const; |
|
119 void addIncreaseDecreaseButtons(CxuiZoomSlider *slider); |
|
120 QString getSettingItemIcon(const QString &key, QVariant value); |
|
121 void updateQualityIcon(); |
|
122 void updateSceneIcon(const QString& sceneId); |
|
123 |
|
124 |
80 |
125 signals: |
81 signals: |
|
82 |
|
83 /*! |
|
84 * Signal that view is ready to be used. |
|
85 */ |
|
86 void viewReady(); |
126 |
87 |
127 // signals to switch to post/pre-capture view. |
88 // signals to switch to post/pre-capture view. |
128 void changeToPostcaptureView(); |
89 void changeToPostcaptureView(); |
129 void changeToPrecaptureView(); |
90 void changeToPrecaptureView(); |
130 |
91 |
134 // signals to start and stop standby timer |
95 // signals to start and stop standby timer |
135 void startStandbyTimer(); |
96 void startStandbyTimer(); |
136 void stopStandbyTimer(); |
97 void stopStandbyTimer(); |
137 |
98 |
138 // signal to report error to ErrorManager for further actions. |
99 // signal to report error to ErrorManager for further actions. |
139 void reportError(CxeError::Id errorId); |
100 void errorEncountered(CxeError::Id id); |
|
101 |
|
102 public slots: |
|
103 |
|
104 void initCamera(); |
|
105 void requestCameraSwitch(); |
|
106 |
|
107 // whenever a setting is changed on the engine side, an icon might need updating |
|
108 // connects to the settingValueChanged signal of CxeSettings |
|
109 virtual void handleSettingValueChanged(const QString& key, QVariant newValue); |
|
110 |
|
111 // From CxuiView |
|
112 virtual void enterStandby(); |
|
113 virtual void exitStandby(); |
|
114 |
|
115 protected slots: |
|
116 |
|
117 // Key events |
|
118 virtual void handleAutofocusKeyPressed(); |
|
119 |
|
120 // Camera / Engine |
|
121 void handleEngineZoomStateChange(CxeZoomControl::State newState, CxeError::Id error); |
|
122 void handleZoomLevelChange(int); |
|
123 void handleVfStateChanged(CxeViewfinderControl::State newState, CxeError::Id error); |
|
124 // UI: Zoom slider change notification |
|
125 void zoomTo(int value); |
|
126 |
|
127 void disableControlsTimeout(); |
|
128 |
|
129 void toggleZoom(); |
|
130 |
|
131 // Settings related |
|
132 void showSettingsGrid(); |
|
133 void hideSettingsGrid(); |
|
134 void launchSliderSetting(); |
|
135 void prepareToShowDialog(HbAction *action); |
|
136 void prepareToCloseDialog(HbAction *action); |
|
137 void updateLocationIndicator(CxeGeoTaggingTrail::State newState, CxeError::Id error); |
|
138 |
|
139 private slots: |
|
140 void disableGeotaggingDisclaimer(); |
|
141 void launchGeoTaggingSetting(); |
|
142 |
|
143 protected: |
|
144 void toggleControls(); |
|
145 virtual void initializeSettingsGrid() = 0; |
|
146 void showEvent(QShowEvent *event); |
|
147 void hideEvent(QHideEvent *event); |
|
148 bool eventFilter(QObject *object, QEvent *event); |
|
149 void launchSettingsDialog(QObject *action); |
|
150 virtual bool isPostcaptureOn() const = 0; |
|
151 void addIncreaseDecreaseButtons(CxuiZoomSlider *slider); |
|
152 QString getSettingItemIcon(const QString &key, QVariant value); |
|
153 virtual void updateQualityIcon() = 0; |
|
154 virtual void updateSceneIcon(const QString& sceneId) = 0; |
|
155 void launchGeoTaggingDisclaimerDialog(); |
|
156 |
|
157 private: |
|
158 CxuiSettingDialog* createSettingsDialog(); |
|
159 CxuiSettingDialog* createSliderSettingsDialog(); |
|
160 QPointF getDialogPosition(); |
140 |
161 |
141 protected: |
162 protected: |
142 HbTransparentWindow *mViewfinder; // not own, owned by the graphics scene |
163 HbTransparentWindow *mViewfinder; // not own, owned by the graphics scene |
143 CxuiDisplayPropertyHandler *mDisplayHandler; |
164 CxuiDisplayPropertyHandler *mDisplayHandler; |
144 HbToolBarExtension *mSettingsGrid; |
165 HbToolBarExtension *mSettingsGrid; |
145 bool mWidgetsLoaded; |
166 bool mWidgetsLoaded; |
146 CxuiSettingDialog *mSettingsDialog; |
167 CxuiSettingDialog *mSettingsDialog; |
147 CxuiSettingRadioButtonList *mSettingsDialogList; |
168 CxuiSettingRadioButtonList *mSettingsDialogList; |
148 HbLabel *mQualityIcon; |
169 HbLabel *mQualityIcon; |
|
170 HbLabel *mGeoTaggingIndicatorIcon; |
149 HbLabel *mFaceTrackingIcon; |
171 HbLabel *mFaceTrackingIcon; |
|
172 CxuiFullScreenPopup *mStandbyPopup; |
150 |
173 |
151 private: |
|
152 CxuiSettingDialog* createSettingsDialog(); |
|
153 CxuiSettingDialog* createSliderSettingsDialog(); |
|
154 QPointF getDialogPosition(); |
|
155 private: |
174 private: |
156 HbLabel *mSettingsDialogHeading; |
175 HbLabel *mSettingsDialogHeading; |
157 |
176 |
158 CxuiSettingDialog *mSliderSettingsDialog; |
177 CxuiSettingDialog *mSliderSettingsDialog; |
159 HbLabel *mSliderSettingsDialogHeading; |
178 HbLabel *mSliderSettingsDialogHeading; |