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(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);
65 Settings(QObject *parent = 0);
69 void setMode(int mode);
71 QString creatorName() const;
72 void setCreatorName(const QString& name);
75 void setUseGps(bool enable);
77 bool useGeotags() const;
78 void setUseGeotags(bool enable);
80 int imageSceneMode() const;
81 void setImageSceneMode(int mode);
83 int imageColorFilter() const;
84 void setImageColorFilter(int filter);
86 int imageWhiteBalance() const;
87 void setImageWhiteBalance(int wb);
89 qreal imageEvComp() const;
90 void setImageEvComp(qreal ev);
92 int videoSceneMode() const;
93 void setVideoSceneMode(int mode);
95 int videoColorFilter() const;
96 void setVideoColorFilter(int filter);
98 int videoWhiteBalance() const;
99 void setVideoWhiteBalance(int wb);
101 qreal videoEvComp() const;
102 void setVideoEvComp(qreal ev);
104 int imageFlashMode() const;
105 void setImageFlashMode(int mode);
107 int imageIso() const;
108 void setImageIso(int iso);
110 QString imageAspectRatio() const;
111 void setImageAspectRatio(const QString& aspectRatio);
113 QString imageResolution() const;
114 void setImageResolution(const QString& resolution);
116 QString videoAspectRatio() const;
117 void setVideoAspectRatio(const QString& aspectRatio);
119 QString videoResolution() const;
120 void setVideoResolution(const QString& resolution);
122 bool isSoundEnabled() const;
123 void setSoundEnabled(bool enabled);
125 bool isVideoTorchOn() const;
126 void setVideoTorchOn(bool on);
128 bool isToolBarShown() const;
129 void setToolBarShown(bool shown);
131 bool isVideoMuted() const;
132 void setVideoMuted(bool muted);
134 bool isGridEnabled() const;
135 void setGridEnabled(bool enabled);
139 void creatorNameChanged();
140 void useGpsChanged();
141 void useGeotagsChanged();
142 void imageSceneModeChanged();
143 void imageColorFilterChanged();
144 void imageWhiteBalanceChanged();
145 void imageEvCompChanged();
146 void videoSceneModeChanged();
147 void videoColorFilterChanged();
148 void videoWhiteBalanceChanged();
149 void videoEvCompChanged();
150 void imageFlashModeChanged();
151 void imageIsoChanged();
152 void imageAspectRatioChanged();
153 void imageResolutionChanged();
154 void videoAspectRatioChanged();
155 void videoResolutionChanged();
156 void soundEnabledChanged();
157 void videoTorchOnChanged();
158 void toolBarShownChanged();
159 void videoMutedChanged();
160 void gridEnabledChanged();
163 QSettings *m_settings;
166 #endif /* SETTINGS_H */