X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=lib%2Fqtcamvideosettings.h;h=35649ffbdd292cd7d9f5ebebe0cba7ddd627aa2a;hp=c829b54847f0be2c460c9b19fc13891eb7a577e2;hb=f15b7b41a0fd2cade6cd0bb3771c2c0da14db3c8;hpb=d73c4932978c622161ede3cccf3183b066aab7c2 diff --git a/lib/qtcamvideosettings.h b/lib/qtcamvideosettings.h index c829b54..35649ff 100644 --- a/lib/qtcamvideosettings.h +++ b/lib/qtcamvideosettings.h @@ -1,35 +1,81 @@ // -*- c++ -*- +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012-2013 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef QT_CAM_VIDEO_SETTINGS_H #define QT_CAM_VIDEO_SETTINGS_H #include #include #include +#include +#include class QtCamVideoSettingsPrivate; +class QtCamVideoResolutionPrivate; -class QtCamVideoSettings { +class QtCamVideoResolution { public: - QtCamVideoSettings(const QString& id, const QString& name, - const QSize& capture, const QSize& preview, - int numerator, int denominator, int nightNumerator, int nightDenominator); - - QtCamVideoSettings(const QtCamVideoSettings& other); + QtCamVideoResolution(const QString& id, const QString& name, const QSize& capture, + const QSize& preview, int fps, int nightFps, + const QString& aspectRatio, const QString& resolution); + QtCamVideoResolution(const QtCamVideoResolution& other); + QtCamVideoResolution& operator=(const QtCamVideoResolution& other); - ~QtCamVideoSettings(); - - QtCamVideoSettings& operator=(const QtCamVideoSettings& other); + ~QtCamVideoResolution(); QString id() const; QString name() const; QSize captureResolution() const; QSize previewResolution() const; - QPair frameRate() const; - QPair nightFrameRate() const; + int frameRate() const; + int nightFrameRate() const; + QString aspectRatio() const; + QString resolution() const; + +private: + QSharedDataPointer d_ptr; +}; + +class QtCamVideoSettings { +public: + QtCamVideoSettings(const QString& id, const QString& suffix, const QString& profileName, + const QString& profilePath, const QList& resolutions); + QtCamVideoSettings(const QtCamVideoSettings& other); + + QtCamVideoSettings& operator=(const QtCamVideoSettings& other); + + ~QtCamVideoSettings(); + + QString id() const; + QString suffix() const; + QString profileName() const; + QString profilePath() const; + + QtCamVideoResolution defaultResolution(const QString& aspectRatio = QString()) const; + QList resolutions(const QString& aspectRatio = QString()) const; + QStringList aspectRatios() const; private: - QtCamVideoSettingsPrivate *d_ptr; + QSharedDataPointer d_ptr; }; #endif /* QT_CAM_VIDEO_SETTINGS_H */