4 * This file is part of CameraPlus.
6 * Copyright (C) 2012 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(int postCaptureTimeout READ postCaptureTimeout WRITE setPostCaptureTimeout NOTIFY postCaptureTimeoutChanged);
36 Q_PROPERTY(bool useGps READ useGps WRITE setUseGps NOTIFY useGpsChanged);
37 Q_PROPERTY(bool useGeotags READ useGeotags WRITE setUseGeotags NOTIFY useGeotagsChanged);
38 Q_PROPERTY(int imageSceneMode READ imageSceneMode WRITE setImageSceneMode NOTIFY imageSceneModeChanged);
39 Q_PROPERTY(int imageColorFilter READ imageColorFilter WRITE setImageColorFilter NOTIFY imageColorFilterChanged);
40 Q_PROPERTY(int imageWhiteBalance READ imageWhiteBalance WRITE setImageWhiteBalance NOTIFY imageWhiteBalanceChanged);
41 Q_PROPERTY(qreal imageEvComp READ imageEvComp WRITE setImageEvComp NOTIFY imageEvCompChanged);
43 Q_PROPERTY(int videoSceneMode READ videoSceneMode WRITE setVideoSceneMode NOTIFY videoSceneModeChanged);
44 Q_PROPERTY(int videoColorFilter READ videoColorFilter WRITE setVideoColorFilter NOTIFY videoColorFilterChanged);
45 Q_PROPERTY(int videoWhiteBalance READ videoWhiteBalance WRITE setVideoWhiteBalance NOTIFY videoWhiteBalanceChanged);
46 Q_PROPERTY(qreal videoEvComp READ videoEvComp WRITE setVideoEvComp NOTIFY videoEvCompChanged);
48 Q_PROPERTY(int imageFlashMode READ imageFlashMode WRITE setImageFlashMode NOTIFY imageFlashModeChanged);
49 Q_PROPERTY(int imageIso READ imageIso WRITE setImageIso NOTIFY imageIsoChanged);
51 Q_PROPERTY(QString imageAspectRatio READ imageAspectRatio WRITE setImageAspectRatio NOTIFY imageAspectRatioChanged);
52 Q_PROPERTY(QString imageResolution READ imageResolution WRITE setImageResolution NOTIFY imageResolutionChanged);
54 Q_PROPERTY(QString videoAspectRatio READ videoAspectRatio WRITE setVideoAspectRatio NOTIFY videoAspectRatioChanged);
55 Q_PROPERTY(QString videoResolution READ videoResolution WRITE setVideoResolution NOTIFY videoResolutionChanged);
57 Q_PROPERTY(bool soundEnabled READ isSoundEnabled WRITE setSoundEnabled NOTIFY soundEnabledChanged);
60 Settings(QObject *parent = 0);
64 void setMode(int mode);
66 QString creatorName() const;
67 void setCreatorName(const QString& name);
69 int postCaptureTimeout() const;
70 void setPostCaptureTimeout(int timeout);
73 void setUseGps(bool enable);
75 bool useGeotags() const;
76 void setUseGeotags(bool enable);
78 int imageSceneMode() const;
79 void setImageSceneMode(int mode);
81 int imageColorFilter() const;
82 void setImageColorFilter(int filter);
84 int imageWhiteBalance() const;
85 void setImageWhiteBalance(int wb);
87 qreal imageEvComp() const;
88 void setImageEvComp(qreal ev);
90 int videoSceneMode() const;
91 void setVideoSceneMode(int mode);
93 int videoColorFilter() const;
94 void setVideoColorFilter(int filter);
96 int videoWhiteBalance() const;
97 void setVideoWhiteBalance(int wb);
99 qreal videoEvComp() const;
100 void setVideoEvComp(qreal ev);
102 int imageFlashMode() const;
103 void setImageFlashMode(int mode);
105 int imageIso() const;
106 void setImageIso(int iso);
108 QString imageAspectRatio() const;
109 void setImageAspectRatio(const QString& aspectRatio);
111 QString imageResolution() const;
112 void setImageResolution(const QString& resolution);
114 QString videoAspectRatio() const;
115 void setVideoAspectRatio(const QString& aspectRatio);
117 QString videoResolution() const;
118 void setVideoResolution(const QString& resolution);
120 bool isSoundEnabled() const;
121 void setSoundEnabled(bool enabled);
125 void creatorNameChanged();
126 void postCaptureTimeoutChanged();
127 void useGpsChanged();
128 void useGeotagsChanged();
129 void imageSceneModeChanged();
130 void imageColorFilterChanged();
131 void imageWhiteBalanceChanged();
132 void imageEvCompChanged();
133 void videoSceneModeChanged();
134 void videoColorFilterChanged();
135 void videoWhiteBalanceChanged();
136 void videoEvCompChanged();
137 void imageFlashModeChanged();
138 void imageIsoChanged();
139 void imageAspectRatioChanged();
140 void imageResolutionChanged();
141 void videoAspectRatioChanged();
142 void videoResolutionChanged();
143 void soundEnabledChanged();
146 QSettings *m_settings;
149 #endif /* SETTINGS_H */