projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Give aspect ratios Repeater an id (aspectRatios)
[harmattan/cameraplus]
/
qml
/
ImageResolutionSettings.qml
diff --git
a/qml/ImageResolutionSettings.qml
b/qml/ImageResolutionSettings.qml
index
3c78458
..
3f8b5c0
100644
(file)
--- a/
qml/ImageResolutionSettings.qml
+++ b/
qml/ImageResolutionSettings.qml
@@
-20,25
+20,30
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-@IMPORT_QT_QUICK@
-import
com.nokia.meego 1.1
+import QtQuick 2.0
+import
QtCamera 1.0
Column {
Column {
+ property Camera camera: null
+
spacing: 10
SectionHeader {
text: qsTr("Aspect ratio")
spacing: 10
SectionHeader {
text: qsTr("Aspect ratio")
+ visible: aspectRatioRow.visible
}
}
- ButtonRow {
+
Camera
ButtonRow {
id: aspectRatioRow
width: parent.width
id: aspectRatioRow
width: parent.width
- enabled: cam
.idl
e
+ enabled: cam
era ? camera.idle : fals
e
exclusive: false
exclusive: false
+ visible: imageSettings.aspectRatioCount > 1
Repeater {
Repeater {
+ id: aspectRatios
model: imageSettings.aspectRatios
model: imageSettings.aspectRatios
- delegate: Button {
+ delegate:
Camera
Button {
text: qsTr(modelData)
checked: settings.imageAspectRatio == modelData
onClicked: settings.imageAspectRatio = modelData
text: qsTr(modelData)
checked: settings.imageAspectRatio == modelData
onClicked: settings.imageAspectRatio = modelData
@@
-48,13
+53,15
@@
Column {
SectionHeader {
text: qsTr("Resolution")
SectionHeader {
text: qsTr("Resolution")
+ visible: resolutionsRow.visible
}
}
- ButtonRow {
+
Camera
ButtonRow {
id: resolutionsRow
width: parent.width
id: resolutionsRow
width: parent.width
- enabled: cam
.idl
e
+ enabled: cam
era ? camera.idle : fals
e
exclusive: false
exclusive: false
+ visible: imageSettings.resolutions.count > 1
Binding {
target: imageSettings.resolutions
Binding {
target: imageSettings.resolutions
@@
-67,8
+74,8
@@
Column {
model: imageSettings.resolutions.aspectRatio == settings.imageAspectRatio ?
imageSettings.resolutions : undefined
model: imageSettings.resolutions.aspectRatio == settings.imageAspectRatio ?
imageSettings.resolutions : undefined
- delegate: Button {
-
font.capitalization: Font.Capitaliz
e
+ delegate:
Camera
Button {
+
capitalize: tru
e
text: qsTr("%1 %2 Mpx").arg(resolutionName).arg(megaPixels)
checked: settings.imageResolution == resolutionName
onClicked: settings.imageResolution = resolutionName
text: qsTr("%1 %2 Mpx").arg(resolutionName).arg(megaPixels)
checked: settings.imageResolution == resolutionName
onClicked: settings.imageResolution = resolutionName