+QString QtCamImageSettings::profilePath() const {
+ return d_ptr->profilePath;
+}
+
+QtCamImageResolution QtCamImageSettings::defaultResolution(const QString& aspectRatio) const {
+ if (d_ptr->resolutions.isEmpty()) {
+ return QtCamImageResolution(QString(), QString(),
+ QSize(), QSize(), QSize(),
+ -1, -1, -1, QString());
+ }
+
+ if (aspectRatio.isEmpty()) {
+ return d_ptr->resolutions[0];
+ }
+
+ foreach (const QtCamImageResolution& r, d_ptr->resolutions) {
+ if (r.aspectRatio() == aspectRatio) {
+ return r;
+ }
+ }
+
+ return d_ptr->resolutions[0];
+}
+
+QList<QtCamImageResolution> QtCamImageSettings::resolutions(const QString& aspectRatio) const {
+ if (aspectRatio.isEmpty()) {
+ return d_ptr->resolutions;
+ }
+
+ QList<QtCamImageResolution> res;
+
+ foreach (const QtCamImageResolution& r, d_ptr->resolutions) {
+ if (r.aspectRatio() == aspectRatio) {
+ res << r;
+ }
+ }
+
+ return res;
+}
+
+QStringList QtCamImageSettings::aspectRatios() const {
+ QStringList aspects;
+
+ foreach (const QtCamImageResolution& r, d_ptr->resolutions) {
+ if (aspects.indexOf(r.aspectRatio()) == -1) {
+ aspects << r.aspectRatio();
+ }
+ }
+
+ return aspects;