silence dbus-send output
[harmattan/cameraplus] / declarative / videoresolution.h
1 // -*- c++ -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
7  *
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.
12  *
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.
17  *
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
21  */
22
23 #ifndef VIDEO_RESOLUTION_H
24 #define VIDEO_RESOLUTION_H
25
26 #include <QObject>
27 #include "qtcamvideosettings.h"
28
29 class VideoResolution : public QObject {
30   Q_OBJECT
31
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);
40
41 public:
42   VideoResolution(QObject *parent = 0);
43   VideoResolution(const QtCamVideoResolution& resolution, QObject *parent = 0);
44   ~VideoResolution();
45
46   QtCamVideoResolution resolution();
47
48   QString resolutionId() const;
49   void setResolutionId(const QString& resolutionId);
50
51   QString name() const;
52   void setName(const QString& name);
53
54   QString aspectRatio() const;
55   void setAspectRatio(const QString& aspectRatio);
56
57   QSize capture() const;
58   void setCapture(const QSize& capture);
59
60   QSize preview() const;
61   void setPreview(const QSize& preview);
62
63   int fps() const;
64   void setFps(int fps);
65
66   int nightFps() const;
67   void setNightFps(int nightFps);
68
69   QString commonName() const;
70   void setCommonName(const QString& commonName);
71
72 signals:
73   void resolutionIdChanged();
74   void nameChanged();
75   void captureChanged();
76   void previewChanged();
77   void fpsChanged();
78   void nightFpsChanged();
79   void aspectRatioChanged();
80   void commonNameChanged();
81
82 private:
83   QString m_resolutionId;
84   QString m_name;
85   QString m_aspectRatio;
86   QString m_commonName;
87   QSize m_capture;
88   QSize m_preview;
89   int m_fps;
90   int m_nightFps;
91 };
92
93 #endif /* VIDEO_RESOLUTION_H */