1 #include "qtcamvideosettings.h"
3 class QtCamVideoSettingsPrivate {
13 QtCamVideoSettings::QtCamVideoSettings(const QString& id, const QString& name,
14 const QSize& capture, const QSize& preview,
15 int numerator, int denominator) :
16 d_ptr(new QtCamVideoSettingsPrivate) {
20 d_ptr->capture = capture;
21 d_ptr->preview = preview;
22 d_ptr->numerator = numerator;
23 d_ptr->denominator = denominator;
26 QtCamVideoSettings::QtCamVideoSettings(const QtCamVideoSettings& other) :
27 d_ptr(new QtCamVideoSettingsPrivate) {
29 d_ptr->id = other.d_ptr->id;
30 d_ptr->name = other.d_ptr->name;
31 d_ptr->capture = other.d_ptr->capture;
32 d_ptr->preview = other.d_ptr->preview;
33 d_ptr->numerator = other.d_ptr->numerator;
34 d_ptr->denominator = other.d_ptr->denominator;
37 QtCamVideoSettings::~QtCamVideoSettings() {
41 QtCamVideoSettings& QtCamVideoSettings::operator=(const QtCamVideoSettings&
43 d_ptr->id = other.d_ptr->id;
44 d_ptr->name = other.d_ptr->name;
45 d_ptr->capture = other.d_ptr->capture;
46 d_ptr->preview = other.d_ptr->preview;
47 d_ptr->numerator = other.d_ptr->numerator;
48 d_ptr->denominator = other.d_ptr->denominator;
53 QString QtCamVideoSettings::id() const {
57 QString QtCamVideoSettings::name() const {
61 QSize QtCamVideoSettings::captureResolution() const {
62 return d_ptr->capture;
65 QSize QtCamVideoSettings::previewResolution() const {
66 return d_ptr->preview;
69 QPair<int, int> QtCamVideoSettings::frameRate() const {
70 return qMakePair<int, int>(d_ptr->numerator, d_ptr->denominator);