#ifndef PLATFORM_SETTINGS_H
#define PLATFORM_SETTINGS_H
-#include <QSettings>
+#include <QObject>
#include <QColor>
+#include <QSize>
+
+class QSettings;
+
+class PlatformSettings : public QObject {
+ Q_OBJECT
+
+ Q_PROPERTY(QString imageCaptureStartedSound READ imageCaptureStartedSound CONSTANT);
+ Q_PROPERTY(QString imageCaptureEndedSound READ imageCaptureEndedSound CONSTANT);
+ Q_PROPERTY(QString videoRecordingStartedSound READ videoRecordingStartedSound CONSTANT);
+ Q_PROPERTY(QString videoRecordingEndedSound READ videoRecordingEndedSound CONSTANT);
+ Q_PROPERTY(QString autoFocusAcquiredSound READ autoFocusAcquiredSound CONSTANT);
+ Q_PROPERTY(QString imagePath READ imagePath CONSTANT);
+ Q_PROPERTY(QString videoPath READ videoPath CONSTANT);
+ Q_PROPERTY(QString temporaryVideoPath READ temporaryVideoPath CONSTANT);
-class PlatformSettings : private QSettings {
public:
- PlatformSettings();
+ PlatformSettings(QObject *parent = 0);
~PlatformSettings();
+ class Service {
+ public:
+ bool m_enabled;
+ QString m_type;
+ QString m_path;
+ QString m_interface;
+ QString m_dest;
+ QString m_method;
+ };
+
QSize previewSize();
QString thumbnailFlavorName();
bool isDBusThumbnailingEnabled();
bool isThumbnailCreationEnabled();
QString temporaryFilePath();
+
+ Service service(const QString& id);
+
+ QString imageCaptureStartedSound() const;
+ QString imageCaptureEndedSound() const;
+ QString videoRecordingStartedSound() const;
+ QString videoRecordingEndedSound() const;
+ QString autoFocusAcquiredSound() const;
+
+ QString imagePath() const;
+ QString videoPath() const;
+ QString temporaryVideoPath() const;
+
+public slots:
+ void init();
+
+private:
+ QSize portraitSize(const QSize& size);
+ QSize landscapeSize(const QSize& size);
+
+ QSettings *m_settings;
};
#endif /* PLATFORM_SETTINGS_H */