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
30 class Settings : public QObject {
33 Q_PROPERTY(int mode READ mode WRITE setMode NOTIFY modeChanged);
34 Q_PROPERTY(QString creatorName READ creatorName WRITE setCreatorName NOTIFY creatorNameChanged);
35 Q_PROPERTY(bool useGps READ useGps WRITE setUseGps NOTIFY useGpsChanged);
36 Q_PROPERTY(bool useGeotags READ useGeotags WRITE setUseGeotags NOTIFY useGeotagsChanged);
37 Q_PROPERTY(int imageSceneMode READ imageSceneMode WRITE setImageSceneMode NOTIFY imageSceneModeChanged);
38 Q_PROPERTY(int imageColorFilter READ imageColorFilter WRITE setImageColorFilter NOTIFY imageColorFilterChanged);
39 Q_PROPERTY(int imageWhiteBalance READ imageWhiteBalance WRITE setImageWhiteBalance NOTIFY imageWhiteBalanceChanged);
40 Q_PROPERTY(qreal imageEvComp READ imageEvComp WRITE setImageEvComp NOTIFY imageEvCompChanged);
42 Q_PROPERTY(int videoSceneMode READ videoSceneMode WRITE setVideoSceneMode NOTIFY videoSceneModeChanged);
43 Q_PROPERTY(int videoColorFilter READ videoColorFilter WRITE setVideoColorFilter NOTIFY videoColorFilterChanged);
44 Q_PROPERTY(int videoWhiteBalance READ videoWhiteBalance WRITE setVideoWhiteBalance NOTIFY videoWhiteBalanceChanged);
45 Q_PROPERTY(qreal videoEvComp READ videoEvComp WRITE setVideoEvComp NOTIFY videoEvCompChanged);
47 Q_PROPERTY(int imageFlashMode READ imageFlashMode WRITE setImageFlashMode NOTIFY imageFlashModeChanged);
48 Q_PROPERTY(int imageIso READ imageIso WRITE setImageIso NOTIFY imageIsoChanged);
50 Q_PROPERTY(QString imageAspectRatio READ imageAspectRatio WRITE setImageAspectRatio NOTIFY imageAspectRatioChanged);
51 Q_PROPERTY(QString imageResolution READ imageResolution WRITE setImageResolution NOTIFY imageResolutionChanged);
53 Q_PROPERTY(QString videoAspectRatio READ videoAspectRatio WRITE setVideoAspectRatio NOTIFY videoAspectRatioChanged);
54 Q_PROPERTY(QString videoResolution READ videoResolution WRITE setVideoResolution NOTIFY videoResolutionChanged);
56 Q_PROPERTY(bool soundEnabled READ isSoundEnabled WRITE setSoundEnabled NOTIFY soundEnabledChanged);
57 Q_PROPERTY(bool videoTorchOn READ isVideoTorchOn WRITE setVideoTorchOn NOTIFY videoTorchOnChanged);
59 Q_PROPERTY(bool showToolBar READ isToolBarShown WRITE setToolBarShown NOTIFY toolBarShownChanged);
60 Q_PROPERTY(bool videoMuted READ isVideoMuted WRITE setVideoMuted NOTIFY videoMutedChanged);
62 Q_PROPERTY(bool gridEnabled READ isGridEnabled WRITE setGridEnabled NOTIFY gridEnabledChanged);
64 Q_PROPERTY(bool faceDetectionEnabled READ isFaceDetectionEnabled WRITE setFaceDetectionEnabled NOTIFY faceDetectionEnabledChanged);
65 Q_PROPERTY(bool zoomAsShutter READ isZoomAsShutterEnabled WRITE setZoomAsShutterEnabled NOTIFY zoomAsShutterChanged);
68 Settings(QObject *parent = 0);
72 void setMode(int mode);
74 QString creatorName() const;
75 void setCreatorName(const QString& name);
78 void setUseGps(bool enable);
80 bool useGeotags() const;
81 void setUseGeotags(bool enable);
83 int imageSceneMode() const;
84 void setImageSceneMode(int mode);
86 int imageColorFilter() const;
87 void setImageColorFilter(int filter);
89 int imageWhiteBalance() const;
90 void setImageWhiteBalance(int wb);
92 qreal imageEvComp() const;
93 void setImageEvComp(qreal ev);
95 int videoSceneMode() const;
96 void setVideoSceneMode(int mode);
98 int videoColorFilter() const;
99 void setVideoColorFilter(int filter);
101 int videoWhiteBalance() const;
102 void setVideoWhiteBalance(int wb);
104 qreal videoEvComp() const;
105 void setVideoEvComp(qreal ev);
107 int imageFlashMode() const;
108 void setImageFlashMode(int mode);
110 int imageIso() const;
111 void setImageIso(int iso);
113 QString imageAspectRatio() const;
114 void setImageAspectRatio(const QString& aspectRatio);
116 QString imageResolution() const;
117 void setImageResolution(const QString& resolution);
119 QString videoAspectRatio() const;
120 void setVideoAspectRatio(const QString& aspectRatio);
122 QString videoResolution() const;
123 void setVideoResolution(const QString& resolution);
125 bool isSoundEnabled() const;
126 void setSoundEnabled(bool enabled);
128 bool isVideoTorchOn() const;
129 void setVideoTorchOn(bool on);
131 bool isToolBarShown() const;
132 void setToolBarShown(bool shown);
134 bool isVideoMuted() const;
135 void setVideoMuted(bool muted);
137 bool isGridEnabled() const;
138 void setGridEnabled(bool enabled);
140 bool isFaceDetectionEnabled() const;
141 void setFaceDetectionEnabled(bool enabled);
143 bool isZoomAsShutterEnabled();
144 void setZoomAsShutterEnabled(bool enabled);
148 void creatorNameChanged();
149 void useGpsChanged();
150 void useGeotagsChanged();
151 void imageSceneModeChanged();
152 void imageColorFilterChanged();
153 void imageWhiteBalanceChanged();
154 void imageEvCompChanged();
155 void videoSceneModeChanged();
156 void videoColorFilterChanged();
157 void videoWhiteBalanceChanged();
158 void videoEvCompChanged();
159 void imageFlashModeChanged();
160 void imageIsoChanged();
161 void imageAspectRatioChanged();
162 void imageResolutionChanged();
163 void videoAspectRatioChanged();
164 void videoResolutionChanged();
165 void soundEnabledChanged();
166 void videoTorchOnChanged();
167 void toolBarShownChanged();
168 void videoMutedChanged();
169 void gridEnabledChanged();
170 void faceDetectionEnabledChanged();
171 void zoomAsShutterChanged();
174 QSettings *m_settings;
177 #endif /* SETTINGS_H */