2 * This file is part of CameraPlus.
4 * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "qtcamimagesettings.h"
23 class QtCamImageSettingsPrivate {
34 QtCamImageSettings::QtCamImageSettings(const QString& id, const QString& name,
35 const QSize& capture, const QSize& preview,
36 const QSize& viewfinder,
37 int fps, int nightFps) :
38 d_ptr(new QtCamImageSettingsPrivate) {
42 d_ptr->capture = capture;
43 d_ptr->preview = preview;
44 d_ptr->viewfinder = viewfinder;
46 d_ptr->nightFps = nightFps;
49 QtCamImageSettings::QtCamImageSettings(const QtCamImageSettings& other) :
50 d_ptr(new QtCamImageSettingsPrivate) {
52 d_ptr->id = other.d_ptr->id;
53 d_ptr->name = other.d_ptr->name;
54 d_ptr->capture = other.d_ptr->capture;
55 d_ptr->preview = other.d_ptr->preview;
56 d_ptr->viewfinder = other.d_ptr->viewfinder;
57 d_ptr->fps = other.d_ptr->fps;
58 d_ptr->nightFps = other.d_ptr->nightFps;
61 QtCamImageSettings::~QtCamImageSettings() {
65 QtCamImageSettings& QtCamImageSettings::operator=(const QtCamImageSettings&
67 d_ptr->id = other.d_ptr->id;
68 d_ptr->name = other.d_ptr->name;
69 d_ptr->capture = other.d_ptr->capture;
70 d_ptr->preview = other.d_ptr->preview;
71 d_ptr->viewfinder = other.d_ptr->viewfinder;
72 d_ptr->fps = other.d_ptr->fps;
73 d_ptr->nightFps = other.d_ptr->nightFps;
78 QString QtCamImageSettings::id() const {
82 QString QtCamImageSettings::name() const {
86 QSize QtCamImageSettings::captureResolution() const {
87 return d_ptr->capture;
90 QSize QtCamImageSettings::viewfinderResolution() const {
91 return d_ptr->viewfinder;
94 QSize QtCamImageSettings::previewResolution() const {
95 return d_ptr->preview;
98 int QtCamImageSettings::frameRate() const {
102 int QtCamImageSettings::nightFrameRate() const {
103 return d_ptr->nightFps;