#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);
-class PlatformSettings : private QSettings {
public:
- PlatformSettings();
+ PlatformSettings(QObject *parent = 0);
~PlatformSettings();
- QList<QPair<QString, QSize> > previewLevels();
+ 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();
QString thumbnailExtension();
QColor backgroundRenderingColor();
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;
+
+public slots:
+ void init();
+
+private:
+ QSize portraitSize(const QSize& size);
+ QSize landscapeSize(const QSize& size);
+
+ QSettings *m_settings;
};
#endif /* PLATFORM_SETTINGS_H */