43 |
43 |
44 virtual ~CxuiVideoPrecaptureView(); |
44 virtual ~CxuiVideoPrecaptureView(); |
45 |
45 |
46 public: |
46 public: |
47 |
47 |
48 /** |
|
49 * Construct-method handles initialisation tasks for this class. |
|
50 * @param mainwindow |
|
51 * @param engine |
|
52 * @param documentLoader |
|
53 * @param keyHandler |
|
54 */ |
|
55 void construct(HbMainWindow *mainwindow, CxeEngine *engine, |
48 void construct(HbMainWindow *mainwindow, CxeEngine *engine, |
56 CxuiDocumentLoader *documentLoader, |
49 CxuiDocumentLoader *documentLoader, |
57 CxuiCaptureKeyHandler *keyHandler, |
50 CxuiCaptureKeyHandler *keyHandler, |
58 HbActivityManager *activityManager); |
51 HbActivityManager *activityManager); |
59 |
52 |
60 /** |
|
61 * Loads widgets that are needed right from the start. |
|
62 */ |
|
63 virtual void loadDefaultWidgets(); |
53 virtual void loadDefaultWidgets(); |
64 |
54 |
65 /** |
|
66 * Loads widgets that are not part of the default section in layouts xml. |
|
67 * Widgets are created at the time they are first loaded. |
|
68 */ |
|
69 virtual void loadWidgets(); |
55 virtual void loadWidgets(); |
70 |
56 |
71 void restoreActivity(const QString &activityId, const QVariant &data); |
57 void restoreActivity(const QString &activityId, const QVariant &data); |
72 void saveActivity(); |
58 void saveActivity(); |
73 void clearActivity(); |
59 void clearActivity(); |
75 public slots: |
61 public slots: |
76 |
62 |
77 // from CxuiPrecaptureView |
63 // from CxuiPrecaptureView |
78 virtual void handleSettingValueChanged(const QString& key, QVariant newValue); |
64 virtual void handleSettingValueChanged(const QString& key, QVariant newValue); |
79 |
65 |
80 void handleSceneChanged(CxeScene &scene); |
66 void handleSceneChanged(const QVariant &scene); |
81 void handleQuitClicked(); |
67 void handleQuitClicked(); |
82 |
68 |
83 protected slots: |
69 protected slots: |
84 |
70 |
85 void handleSnapshot(CxeError::Id error); |
|
86 void record(); |
71 void record(); |
87 void pause(); |
72 void pause(); |
88 void stop(); |
73 void stop(); |
89 void goToStill(); |
74 void goToStill(); |
90 void showEvent(QShowEvent *event); |
75 void showEvent(QShowEvent *event); |
98 // from CxuiPrecaptureView |
83 // from CxuiPrecaptureView |
99 void hideControls(); |
84 void hideControls(); |
100 |
85 |
101 protected: |
86 protected: |
102 |
87 |
103 void setVideoTime(HbLabel* label, int time); |
88 void setVideoTime(HbLabel* label, int elapsedTime, int remainingTime); |
104 bool getElapsedTime(); |
89 bool getElapsedTime(); |
105 void getRemainingTime(); |
90 void getRemainingTime(); |
106 bool allowShowControls() const; |
91 bool allowShowControls() const; |
107 bool isFeedbackEnabled() const; |
92 bool isFeedbackEnabled() const; |
108 void showToolbar(); |
93 void showToolbar(); |
111 |
96 |
112 void initializeSettingsGrid(); |
97 void initializeSettingsGrid(); |
113 bool isPostcaptureOn() const; |
98 bool isPostcaptureOn() const; |
114 void updateSceneIcon(const QString& sceneId); |
99 void updateSceneIcon(const QString& sceneId); |
115 void updateQualityIcon(); |
100 void updateQualityIcon(); |
116 void setRecordingItemsVisibility(bool visible); |
|
117 |
101 |
118 // from QObject |
102 // from QObject |
119 bool eventFilter(QObject *object, QEvent *event); |
103 bool eventFilter(QObject *object, QEvent *event); |
|
104 |
|
105 private: |
|
106 void reloadIndicatorWidgets(); |
120 |
107 |
121 protected: |
108 protected: |
122 QTimer mElapsedTimer; |
109 QTimer mElapsedTimer; |
123 int mTimeElapsed; |
110 int mTimeElapsed; |
124 int mTimeRemaining; |
111 int mTimeRemaining; |
125 |
112 |
126 HbLabel *mElapsedTimeText; // not own |
113 HbLabel *mVideoTimeText; // not own |
127 HbLabel *mRemainingTimeText; // not own |
|
128 HbLabel *mRecordingIcon; // not own |
114 HbLabel *mRecordingIcon; // not own |
129 HbAction *mGoToStillAction; // not own |
115 HbAction *mGoToStillAction; // not own |
130 HbToolBar *mToolbarIdle; // not own |
116 HbToolBar *mToolbarIdle; // not own |
131 HbToolBar *mToolbarRec; // not own |
117 HbToolBar *mToolbarRec; // not own |
132 HbToolBar *mToolbarPaused; // not own |
118 HbToolBar *mToolbarPaused; // not own |