X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FImageEvCompButton.qml;h=ece1bf31838e05fea3cb76091b4c11d37134021d;hp=9450e021c42383eda49ffbd6aedc1b05e7d421de;hb=HEAD;hpb=896d397cb4c88deb70a34d0e757d635c3dcd4c91 diff --git a/qml/ImageEvCompButton.qml b/qml/ImageEvCompButton.qml index 9450e02..ece1bf3 100644 --- a/qml/ImageEvCompButton.qml +++ b/qml/ImageEvCompButton.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,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.imageEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : "" + iconSource: settings.imageEvComp == 0 ? cameraTheme.cameraManualExposureIconId : "" - Label { - anchors.fill: parent - verticalAlignment: Text.AlignVCenter - visible: settings.imageEvComp != 0 - text: settings.imageEvComp == 0 ? "" : settings.imageEvComp.toFixed(1); + CameraLabel { + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + visible: settings.imageEvComp != 0 + text: settings.imageEvComp == 0 ? "" : settings.imageEvComp.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.imageEvComp + valueIndicatorVisible: true + stepSize: 0.1 + onValueChanged: settings.imageEvComp = value.toFixed(1) + Component.onCompleted: { slider.value = settings.imageEvComp.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.imageEvComp - valueIndicatorVisible: true - stepSize: 0.1 - onValueChanged: settings.imageEvComp = value.toFixed(1); - Component.onCompleted: { slider.value = settings.imageEvComp.toFixed(1); } - }] + CameraToolIcon { + iconSource: cameraTheme.resetIconId + onClicked: slider.value = 0 + } + } }