X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FVideoResolutionSettings.qml;h=26d4eac9f6e022ddf606985ef6d3236db68ace56;hp=eb762ae0b1625946c44985b14865cb0ad575033b;hb=d9f0af7e2ceb416fd44a0ca14d20df8604754dd1;hpb=ad9ad895653432270b73e68ea1c2588613709836 diff --git a/qml/VideoResolutionSettings.qml b/qml/VideoResolutionSettings.qml index eb762ae..26d4eac 100644 --- a/qml/VideoResolutionSettings.qml +++ b/qml/VideoResolutionSettings.qml @@ -3,7 +3,7 @@ /*! * This file is part of CameraPlus. * - * Copyright (C) 2012 Mohammed Sameer + * Copyright (C) 2012-2013 Mohammed Sameer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,43 +20,34 @@ * 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"); - } - - - ButtonRow { - width: parent.width - - exclusive: false + spacing: 10 - Repeater { - id: resolutions + SectionHeader { + text: qsTr("Resolution") + } - model: videoSettings.resolutions + CameraButtonRow { + width: parent.width + enabled: camera ? camera.idle : false + exclusive: false - function name(name, res) { - return name.charAt(0).toUpperCase() + name.slice(1) + " " + res; - } + Repeater { + id: resolutions - delegate: Button { - text: resolutions.name(resolutionName, resolution); - checked: settings.videoResolution == resolutionName; - onClicked: { - if (!cam.idle) { - showError(qsTr("Camera is busy saving.")); - return; - } + model: videoSettings.resolutions - 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 + } } + } }