1 #include "qtcamvideosettings.h"
3 class QtCamVideoSettingsPrivate {
15 QtCamVideoSettings::QtCamVideoSettings(const QString& id, const QString& name,
16 const QSize& capture, const QSize& preview,
17 int numerator, int denominator,
18 int nightNumerator, int nightDenominator) :
19 d_ptr(new QtCamVideoSettingsPrivate) {
23 d_ptr->capture = capture;
24 d_ptr->preview = preview;
25 d_ptr->numerator = numerator;
26 d_ptr->denominator = denominator;
27 d_ptr->nightNumerator = nightNumerator;
28 d_ptr->nightDenominator = nightDenominator;
31 QtCamVideoSettings::QtCamVideoSettings(const QtCamVideoSettings& other) :
32 d_ptr(new QtCamVideoSettingsPrivate) {
34 d_ptr->id = other.d_ptr->id;
35 d_ptr->name = other.d_ptr->name;
36 d_ptr->capture = other.d_ptr->capture;
37 d_ptr->preview = other.d_ptr->preview;
38 d_ptr->numerator = other.d_ptr->numerator;
39 d_ptr->denominator = other.d_ptr->denominator;
40 d_ptr->nightNumerator = other.d_ptr->nightNumerator;
41 d_ptr->nightDenominator = other.d_ptr->nightDenominator;
44 QtCamVideoSettings::~QtCamVideoSettings() {
48 QtCamVideoSettings& QtCamVideoSettings::operator=(const QtCamVideoSettings&
50 d_ptr->id = other.d_ptr->id;
51 d_ptr->name = other.d_ptr->name;
52 d_ptr->capture = other.d_ptr->capture;
53 d_ptr->preview = other.d_ptr->preview;
54 d_ptr->numerator = other.d_ptr->numerator;
55 d_ptr->denominator = other.d_ptr->denominator;
56 d_ptr->nightNumerator = other.d_ptr->nightNumerator;
57 d_ptr->nightDenominator = other.d_ptr->nightDenominator;
62 QString QtCamVideoSettings::id() const {
66 QString QtCamVideoSettings::name() const {
70 QSize QtCamVideoSettings::captureResolution() const {
71 return d_ptr->capture;
74 QSize QtCamVideoSettings::previewResolution() const {
75 return d_ptr->preview;
78 QPair<int, int> QtCamVideoSettings::frameRate() const {
79 return qMakePair<int, int>(d_ptr->numerator, d_ptr->denominator);
82 QPair<int, int> QtCamVideoSettings::nightFrameRate() const {
83 return qMakePair<int, int>(d_ptr->nightNumerator, d_ptr->nightDenominator);