* 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
import "data.js" as Data
-ToolIcon {
- id: button
+CameraToolIcon {
+ id: button
- iconSource: "image://theme/" + Data.wbIcon(settings.videoWhiteBalance);
+ iconId: Data.wbIcon(settings.videoWhiteBalance)
- property list<Item> items: [
- Label {
- height: parent ? parent.height : 0
- text: qsTr("WB");
- verticalAlignment: Text.AlignVCenter
- },
- CheckButton {
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Auto
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- },
- CheckButton {
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Sunset
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- },
- CheckButton {
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Cloudy
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- },
- CheckButton {
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Flourescent
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- },
- CheckButton {
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Tungsten
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- }]
+ property CameraToolBarTools tools: CameraToolBarTools {
+ CameraLabel {
+ height: parent ? parent.height : 0
+ text: qsTr("WB")
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ CheckButton {
+ iconId: Data.wbIcon(WhiteBalance.Auto)
+ onClicked: settings.videoWhiteBalance = WhiteBalance.Auto
+ checked: settings.videoWhiteBalance == WhiteBalance.Auto
+ }
+
+ CheckButton {
+ iconId: Data.wbIcon(WhiteBalance.Sunset)
+ onClicked: settings.videoWhiteBalance = WhiteBalance.Sunset
+ checked: settings.videoWhiteBalance == WhiteBalance.Sunset
+ }
+
+ CheckButton {
+ iconId: Data.wbIcon(WhiteBalance.Cloudy)
+ onClicked: settings.videoWhiteBalance = WhiteBalance.Cloudy
+ checked: settings.videoWhiteBalance == WhiteBalance.Cloudy
+ }
+
+ CheckButton {
+ iconId: Data.wbIcon(WhiteBalance.Flourescent)
+ onClicked: settings.videoWhiteBalance = WhiteBalance.Flourescent
+ checked: settings.videoWhiteBalance == WhiteBalance.Flourescent
+ }
+
+ CheckButton {
+ iconId: Data.wbIcon(WhiteBalance.Tungsten)
+ onClicked: settings.videoWhiteBalance = WhiteBalance.Tungsten
+ checked: settings.videoWhiteBalance == WhiteBalance.Tungsten
+ }
+ }
}