X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FVideoEvCompButton.qml;h=922cef835ed056ae1c5a3eb94f79a910c5f69645;hp=c33644d674c63e4879679c6b0cf71889cde6cacd;hb=695e8f4f85218b41a7f27af281fcebe8238a33b7;hpb=3423bd2565dc32f1a8910a99e1d26a6e977a3f63 diff --git a/qml/VideoEvCompButton.qml b/qml/VideoEvCompButton.qml index c33644d..922cef8 100644 --- a/qml/VideoEvCompButton.qml +++ b/qml/VideoEvCompButton.qml @@ -20,38 +20,43 @@ * 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 -ToolIcon { - id: button +CameraToolIcon { + id: button - iconSource: settings.videoEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : "" + iconSource: settings.videoEvComp == 0 ? cameraTheme.cameraManualExposureIconId : "" - Label { - anchors.fill: parent - verticalAlignment: Text.AlignVCenter - visible: settings.videoEvComp != 0 - text: settings.videoEvComp == 0 ? "" : settings.videoEvComp.toFixed(1); + CameraLabel { + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + visible: settings.videoEvComp != 0 + text: settings.videoEvComp == 0 ? "" : settings.videoEvComp.toFixed(1) + } + + property CameraToolBarTools tools: CameraToolBarTools { + CameraLabel { + height: parent ? parent.height : 0 + text: qsTr("EV") + verticalAlignment: Text.AlignVCenter + } + + CameraSlider { + id: slider + orientation: Qt.Horizontal + minimumValue: cam ? cam.evComp.minimum : 0 + maximumValue: cam ? cam.evComp.maximum : 0 + value: settings.videoEvComp + valueIndicatorVisible: true + stepSize: 0.1 + onValueChanged: settings.videoEvComp = value.toFixed(1) + Component.onCompleted: { slider.value = settings.videoEvComp.toFixed(1) } } - property list items: [ - Label { - height: parent ? parent.height : 0 - text: qsTr("EV"); - verticalAlignment: Text.AlignVCenter - }, - Slider { - id: slider - width: 500 - orientation: Qt.Horizontal - minimumValue: cam.evComp.minimum - maximumValue: cam.evComp.maximum - value: settings.videoEvComp - valueIndicatorVisible: true - stepSize: 0.1 - onValueChanged: settings.videoEvComp = value.toFixed(1); - Component.onCompleted: { slider.value = settings.videoEvComp.toFixed(1); } - }] + CameraToolIcon { + iconSource: cameraTheme.resetIconId + onClicked: slider.value = 0 + } + } }