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 IMAGE_RESOLUTION_H
24 #define IMAGE_RESOLUTION_H
27 #include "qtcamimagesettings.h"
29 class ImageResolution : 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(QSize viewfinderResolution READ viewfinder WRITE setViewfinder NOTIFY viewfinderChanged);
38 Q_PROPERTY(int frameRate READ fps WRITE setFps NOTIFY fpsChanged);
39 Q_PROPERTY(int nightFrameRate READ nightFps WRITE setNightFps NOTIFY nightFpsChanged);
40 Q_PROPERTY(int megaPixels READ megaPixels WRITE setMegaPixels NOTIFY megaPixelsChanged);
43 ImageResolution(QObject *parent = 0);
44 ImageResolution(const QtCamImageResolution& resolution, QObject *parent = 0);
47 QtCamImageResolution resolution();
49 QString resolutionId() const;
50 void setResolutionId(const QString& resolutionId);
53 void setName(const QString& name);
55 QString aspectRatio() const;
56 void setAspectRatio(const QString& aspectRatio);
58 QSize capture() const;
59 void setCapture(const QSize& capture);
61 QSize preview() const;
62 void setPreview(const QSize& preview);
64 QSize viewfinder() const;
65 void setViewfinder(const QSize& viewfinder);
71 void setNightFps(int nightFps);
73 int megaPixels() const;
74 void setMegaPixels(int megaPixels);
77 void resolutionIdChanged();
79 void captureChanged();
80 void previewChanged();
81 void viewfinderChanged();
83 void nightFpsChanged();
84 void megaPixelsChanged();
85 void aspectRatioChanged();
88 QString m_resolutionId;
90 QString m_aspectRatio;
99 #endif /* IMAGE_RESOLUTION_H */