X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=qml%2FImageResolutionSettings.qml;h=3f8b5c06be1faff4f44ee1096feec5ab4c9c0c43;hb=584383d77381b4b38303117c1f276a2f3ee01aac;hp=3c78458e8e67712c631d751d35a032a6b7498de7;hpb=bb079e0dff5557e811af63194a86a5d6548b4cfd;p=harmattan%2Fcameraplus diff --git a/qml/ImageResolutionSettings.qml b/qml/ImageResolutionSettings.qml index 3c78458..3f8b5c0 100644 --- a/qml/ImageResolutionSettings.qml +++ b/qml/ImageResolutionSettings.qml @@ -20,25 +20,30 @@ * 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 { + property Camera camera: null + spacing: 10 SectionHeader { text: qsTr("Aspect ratio") + visible: aspectRatioRow.visible } - ButtonRow { + CameraButtonRow { id: aspectRatioRow width: parent.width - enabled: cam.idle + enabled: camera ? camera.idle : false exclusive: false + visible: imageSettings.aspectRatioCount > 1 Repeater { + id: aspectRatios model: imageSettings.aspectRatios - delegate: Button { + delegate: CameraButton { text: qsTr(modelData) checked: settings.imageAspectRatio == modelData onClicked: settings.imageAspectRatio = modelData @@ -48,13 +53,15 @@ Column { SectionHeader { text: qsTr("Resolution") + visible: resolutionsRow.visible } - ButtonRow { + CameraButtonRow { id: resolutionsRow width: parent.width - enabled: cam.idle + enabled: camera ? camera.idle : false exclusive: false + visible: imageSettings.resolutions.count > 1 Binding { target: imageSettings.resolutions @@ -67,8 +74,8 @@ Column { model: imageSettings.resolutions.aspectRatio == settings.imageAspectRatio ? imageSettings.resolutions : undefined - delegate: Button { - font.capitalization: Font.Capitalize + delegate: CameraButton { + capitalize: true text: qsTr("%1 %2 Mpx").arg(resolutionName).arg(megaPixels) checked: settings.imageResolution == resolutionName onClicked: settings.imageResolution = resolutionName