X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lib%2Fqtcamimagesettings.h;h=01914d032801f1eeb42ce56b32551e01adf126a1;hb=701f215813f1059a1a03200f42e70e57ef6e3699;hp=cb70041518fb4a012f8788e4e5c8d08c92c7ded5;hpb=91049febc4f59b875b8f77d124a7fcbbd0efa863;p=harmattan%2Fcameraplus diff --git a/lib/qtcamimagesettings.h b/lib/qtcamimagesettings.h index cb70041..01914d0 100644 --- a/lib/qtcamimagesettings.h +++ b/lib/qtcamimagesettings.h @@ -1,25 +1,47 @@ // -*- 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_IMAGE_SETTINGS_H #define QT_CAM_IMAGE_SETTINGS_H #include #include #include +#include +#include class QtCamImageSettingsPrivate; +class QtCamImageResolutionPrivate; -class QtCamImageSettings { +class QtCamImageResolution { public: - QtCamImageSettings(const QString& id, const QString& name, const QSize& capture, - const QSize& preview, const QSize& viewfinder, - int fps, int nightFps); + QtCamImageResolution(const QString& id, const QString& name, const QSize& capture, + const QSize& preview, const QSize& viewfinder, + int fps, int nightFps, int megaPixels, QString aspectRatio); + QtCamImageResolution(const QtCamImageResolution& other); - QtCamImageSettings(const QtCamImageSettings& other); - - ~QtCamImageSettings(); + QtCamImageResolution& operator=(const QtCamImageResolution& other); - QtCamImageSettings& operator=(const QtCamImageSettings& other); + ~QtCamImageResolution(); QString id() const; QString name() const; @@ -28,9 +50,34 @@ public: QSize previewResolution() const; int frameRate() const; int nightFrameRate() const; + int megaPixels() const; + QString aspectRatio() const; + +private: + QSharedDataPointer d_ptr; +}; + +class QtCamImageSettings { +public: + QtCamImageSettings(const QString& id, const QString& suffix, const QString& profileName, + const QString& profilePath, const QList& resolutions); + QtCamImageSettings(const QtCamImageSettings& other); + + QtCamImageSettings& operator=(const QtCamImageSettings& other); + + ~QtCamImageSettings(); + + QString id() const; + QString suffix() const; + QString profileName() const; + QString profilePath() const; + + QtCamImageResolution defaultResolution(const QString& aspectRatio = QString()) const; + QList resolutions(const QString& aspectRatio = QString()) const; + QStringList aspectRatios() const; private: - QtCamImageSettingsPrivate *d_ptr; + QSharedDataPointer d_ptr; }; #endif /* QT_CAM_IMAGE_SETTINGS_H */