X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=src%2Fsettings.h;h=e98bdf993eb62fdfaabbbc058213db535e08d971;hb=ad9ad895653432270b73e68ea1c2588613709836;hp=51a5919cf03ca08b4105bb524a187a4ac2760b19;hpb=06fbbf613614a98dbeb5dea68eeb9e9dd79ec7e0;p=harmattan%2Fcameraplus diff --git a/src/settings.h b/src/settings.h index 51a5919..e98bdf9 100644 --- a/src/settings.h +++ b/src/settings.h @@ -1,5 +1,25 @@ // -*- c++ -*- +/*! + * This file is part of CameraPlus. + * + * Copyright (C) 2012 Mohammed Sameer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + #ifndef SETTINGS_H #define SETTINGS_H @@ -12,7 +32,6 @@ class Settings : public QObject { Q_PROPERTY(int mode READ mode WRITE setMode NOTIFY modeChanged); Q_PROPERTY(QString creatorName READ creatorName WRITE setCreatorName NOTIFY creatorNameChanged); - Q_PROPERTY(int postCaptureTimeout READ postCaptureTimeout WRITE setPostCaptureTimeout NOTIFY postCaptureTimeoutChanged); Q_PROPERTY(bool useGps READ useGps WRITE setUseGps NOTIFY useGpsChanged); Q_PROPERTY(bool useGeotags READ useGeotags WRITE setUseGeotags NOTIFY useGeotagsChanged); Q_PROPERTY(int imageSceneMode READ imageSceneMode WRITE setImageSceneMode NOTIFY imageSceneModeChanged); @@ -28,6 +47,22 @@ class Settings : public QObject { Q_PROPERTY(int imageFlashMode READ imageFlashMode WRITE setImageFlashMode NOTIFY imageFlashModeChanged); Q_PROPERTY(int imageIso READ imageIso WRITE setImageIso NOTIFY imageIsoChanged); + Q_PROPERTY(QString imageAspectRatio READ imageAspectRatio WRITE setImageAspectRatio NOTIFY imageAspectRatioChanged); + Q_PROPERTY(QString imageResolution READ imageResolution WRITE setImageResolution NOTIFY imageResolutionChanged); + + Q_PROPERTY(QString videoAspectRatio READ videoAspectRatio WRITE setVideoAspectRatio NOTIFY videoAspectRatioChanged); + Q_PROPERTY(QString videoResolution READ videoResolution WRITE setVideoResolution NOTIFY videoResolutionChanged); + + Q_PROPERTY(bool soundEnabled READ isSoundEnabled WRITE setSoundEnabled NOTIFY soundEnabledChanged); + Q_PROPERTY(bool videoTorchOn READ isVideoTorchOn WRITE setVideoTorchOn NOTIFY videoTorchOnChanged); + + Q_PROPERTY(bool showToolBar READ isToolBarShown WRITE setToolBarShown NOTIFY toolBarShownChanged); + Q_PROPERTY(bool videoMuted READ isVideoMuted WRITE setVideoMuted NOTIFY videoMutedChanged); + + Q_PROPERTY(bool gridEnabled READ isGridEnabled WRITE setGridEnabled NOTIFY gridEnabledChanged); + + Q_PROPERTY(bool faceDetectionEnabled READ isFaceDetectionEnabled WRITE setFaceDetectionEnabled NOTIFY faceDetectionEnabledChanged); + public: Settings(QObject *parent = 0); ~Settings(); @@ -38,9 +73,6 @@ public: QString creatorName() const; void setCreatorName(const QString& name); - int postCaptureTimeout() const; - void setPostCaptureTimeout(int timeout); - bool useGps() const; void setUseGps(bool enable); @@ -77,10 +109,39 @@ public: int imageIso() const; void setImageIso(int iso); + QString imageAspectRatio() const; + void setImageAspectRatio(const QString& aspectRatio); + + QString imageResolution() const; + void setImageResolution(const QString& resolution); + + QString videoAspectRatio() const; + void setVideoAspectRatio(const QString& aspectRatio); + + QString videoResolution() const; + void setVideoResolution(const QString& resolution); + + bool isSoundEnabled() const; + void setSoundEnabled(bool enabled); + + bool isVideoTorchOn() const; + void setVideoTorchOn(bool on); + + bool isToolBarShown() const; + void setToolBarShown(bool shown); + + bool isVideoMuted() const; + void setVideoMuted(bool muted); + + bool isGridEnabled() const; + void setGridEnabled(bool enabled); + + bool isFaceDetectionEnabled() const; + void setFaceDetectionEnabled(bool enabled); + signals: void modeChanged(); void creatorNameChanged(); - void postCaptureTimeoutChanged(); void useGpsChanged(); void useGeotagsChanged(); void imageSceneModeChanged(); @@ -93,6 +154,16 @@ signals: void videoEvCompChanged(); void imageFlashModeChanged(); void imageIsoChanged(); + void imageAspectRatioChanged(); + void imageResolutionChanged(); + void videoAspectRatioChanged(); + void videoResolutionChanged(); + void soundEnabledChanged(); + void videoTorchOnChanged(); + void toolBarShownChanged(); + void videoMutedChanged(); + void gridEnabledChanged(); + void faceDetectionEnabledChanged(); private: QSettings *m_settings;