Changelog for 0.0.8
[harmattan/cameraplus] / declarative / videosettings.h
index c838234..da4cf30 100644 (file)
@@ -29,6 +29,8 @@
 class Camera;
 class QtCamVideoSettings;
 class VideoResolutionModel;
+class VideoResolution;
+class QtCamVideoResolution;
 
 class VideoSettings : public QObject {
   Q_OBJECT
@@ -36,8 +38,10 @@ class VideoSettings : public QObject {
   Q_PROPERTY(Camera* camera READ camera WRITE setCamera NOTIFY cameraChanged);
   Q_PROPERTY(QString suffix READ suffix NOTIFY settingsChanged);
   Q_PROPERTY(QStringList aspectRatios READ aspectRatios NOTIFY settingsChanged);
+  Q_PROPERTY(int aspectRatioCount READ aspectRatioCount NOTIFY aspectRatioCountChanged);
   Q_PROPERTY(VideoResolutionModel *resolutions READ resolutions NOTIFY resolutionsChanged);
   Q_PROPERTY(bool ready READ isReady NOTIFY readyChanged);
+  Q_PROPERTY(VideoResolution *currentResolution READ currentResolution NOTIFY currentResolutionChanged);
 
 public:
   VideoSettings(QObject *parent = 0);
@@ -53,21 +57,34 @@ public:
 
   bool isReady() const;
 
+  VideoResolution *currentResolution();
+
+  Q_INVOKABLE VideoResolution *findResolution(const QString& aspectRatio,
+                                             const QString& name);
+  Q_INVOKABLE bool setResolution(VideoResolution *resolution);
+
   Q_INVOKABLE bool setResolution(const QString& aspectRatio, const QString& resolution);
 
+  int aspectRatioCount() const;
+
 signals:
   void settingsChanged();
   void cameraChanged();
   void resolutionsChanged();
   void readyChanged();
+  void aspectRatioCountChanged();
+  void currentResolutionChanged();
 
 private slots:
   void deviceChanged();
 
 private:
+  bool setResolution(const QtCamVideoResolution& resolution);
+
   Camera *m_cam;
   QtCamVideoSettings *m_settings;
   VideoResolutionModel *m_resolutions;
+  VideoResolution *m_currentResolution;
 };
 
 #endif /* VIDEO_SETTINGS_H */