4 * This file is part of CameraPlus.
6 * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef VIDEO_RESOLUTION_H
24 #define VIDEO_RESOLUTION_H
27 #include "qtcamvideosettings.h"
29 class VideoResolution : public QObject {
32 Q_PROPERTY(QString resolutionLd READ resolutionId WRITE setResolutionId NOTIFY resolutionIdChanged);
33 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged);
34 Q_PROPERTY(QString aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged);
35 Q_PROPERTY(QSize captureResolution READ capture WRITE setCapture NOTIFY captureChanged);
36 Q_PROPERTY(QSize previewResolution READ preview WRITE setPreview NOTIFY previewChanged);
37 Q_PROPERTY(int frameRate READ fps WRITE setFps NOTIFY fpsChanged);
38 Q_PROPERTY(int nightFrameRate READ nightFps WRITE setNightFps NOTIFY nightFpsChanged);
39 Q_PROPERTY(QString commonName READ commonName WRITE setCommonName NOTIFY commonNameChanged);
42 VideoResolution(QObject *parent = 0);
43 VideoResolution(const QtCamVideoResolution& resolution, QObject *parent = 0);
46 QtCamVideoResolution resolution();
48 QString resolutionId() const;
49 void setResolutionId(const QString& resolutionId);
52 void setName(const QString& name);
54 QString aspectRatio() const;
55 void setAspectRatio(const QString& aspectRatio);
57 QSize capture() const;
58 void setCapture(const QSize& capture);
60 QSize preview() const;
61 void setPreview(const QSize& preview);
67 void setNightFps(int nightFps);
69 QString commonName() const;
70 void setCommonName(const QString& commonName);
73 void resolutionIdChanged();
75 void captureChanged();
76 void previewChanged();
78 void nightFpsChanged();
79 void aspectRatioChanged();
80 void commonNameChanged();
83 QString m_resolutionId;
85 QString m_aspectRatio;
93 #endif /* VIDEO_RESOLUTION_H */