X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=declarative%2Fvideosettings.h;h=da4cf30ed3fcce7b063c1184b2991d5112a9caad;hb=e22873168e4a096cd64816f1cdcf71b09a471dfa;hp=aa7b6f46f9f6fc4fec9e71a428ab8a85d6b7c122;hpb=6333acb7c3f57ec8eb95284b84a6c8fc881e0941;p=harmattan%2Fcameraplus diff --git a/declarative/videosettings.h b/declarative/videosettings.h index aa7b6f4..da4cf30 100644 --- a/declarative/videosettings.h +++ b/declarative/videosettings.h @@ -29,6 +29,8 @@ class Camera; class QtCamVideoSettings; class VideoResolutionModel; +class VideoResolution; +class QtCamVideoResolution; class VideoSettings : public QObject { Q_OBJECT @@ -39,6 +41,7 @@ class VideoSettings : public QObject { 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); @@ -54,6 +57,12 @@ 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; @@ -64,14 +73,18 @@ signals: 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 */