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 "qtcamvideosettings.h"
23 class QtCamVideoSettingsPrivate {
33 QtCamVideoSettings::QtCamVideoSettings(const QString& id, const QString& name,
34 const QSize& capture, const QSize& preview,
35 int fps, int nightFps) :
36 d_ptr(new QtCamVideoSettingsPrivate) {
40 d_ptr->capture = capture;
41 d_ptr->preview = preview;
43 d_ptr->nightFps = nightFps;
46 QtCamVideoSettings::QtCamVideoSettings(const QtCamVideoSettings& other) :
47 d_ptr(new QtCamVideoSettingsPrivate) {
49 d_ptr->id = other.d_ptr->id;
50 d_ptr->name = other.d_ptr->name;
51 d_ptr->capture = other.d_ptr->capture;
52 d_ptr->preview = other.d_ptr->preview;
53 d_ptr->fps = other.d_ptr->fps;
54 d_ptr->nightFps = other.d_ptr->nightFps;
57 QtCamVideoSettings::~QtCamVideoSettings() {
61 QtCamVideoSettings& QtCamVideoSettings::operator=(const QtCamVideoSettings&
63 d_ptr->id = other.d_ptr->id;
64 d_ptr->name = other.d_ptr->name;
65 d_ptr->capture = other.d_ptr->capture;
66 d_ptr->preview = other.d_ptr->preview;
67 d_ptr->fps = other.d_ptr->fps;
68 d_ptr->nightFps = other.d_ptr->nightFps;
73 QString QtCamVideoSettings::id() const {
77 QString QtCamVideoSettings::name() const {
81 QSize QtCamVideoSettings::captureResolution() const {
82 return d_ptr->capture;
85 QSize QtCamVideoSettings::previewResolution() const {
86 return d_ptr->preview;
89 int QtCamVideoSettings::frameRate() const {
93 int QtCamVideoSettings::nightFrameRate() const {
94 return d_ptr->nightFps;