Fixed VideoPlayerPage.qml failure to set cameraConfig
[harmattan/cameraplus] / qml / VideoResolutionSettings.qml
index e719002..26d4eac 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-import QtQuick 1.1
-import com.nokia.meego 1.1
+import QtQuick 2.0
+import QtCamera 1.0
 
 Column {
-        spacing: 10
+    property Camera camera: null
 
-        SectionHeader {
-                text: qsTr("Resolution");
-        }
+    spacing: 10
 
+    SectionHeader {
+        text: qsTr("Resolution")
+    }
 
-        ButtonRow {
-                width: parent.width
-                enabled: cam.idle
-                exclusive: false
+    CameraButtonRow {
+        width: parent.width
+        enabled: camera ? camera.idle : false
+        exclusive: false
 
-                Repeater {
-                        id: resolutions
+        Repeater {
+            id: resolutions
 
-                        model: videoSettings.resolutions
+            model: videoSettings.resolutions
 
-                        delegate: Button {
-                                font.capitalization: Font.Capitalize
-                                text: qsTr("%1 %2").arg(resolutionName).arg(resolution);
-                                checked: settings.videoResolution == resolutionName;
-                                onClicked: settings.videoResolution = resolutionName;
-                        }
-                }
+            delegate: CameraButton {
+                font.capitalization: Font.Capitalize
+                text: qsTr("%1 %2").arg(resolutionName).arg(resolution)
+                checked: settings.videoResolution == resolutionName
+                onClicked: settings.videoResolution = resolutionName
+            }
         }
+    }
 }