Column {
id: col
spacing: 10
+ width: parent.width
Label {
font.pixelSize: 36
text: qsTr("Camera settings");
}
-
+/*
SectionHeader {
text: qsTr("Show captured content");
}
onClicked: settings.postCaptureTimeout = -1;
}
}
-
+*/
SectionHeader {
text: qsTr("Creator name");
}
--- /dev/null
+// -*- js -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+var stack = new Array();
+
+function push(items) {
+ if (stack.length >= 1) {
+ hide(stack[stack.length - 1]);
+ }
+
+ stack.push(items);
+
+ layout();
+}
+
+function pop() {
+ var items = stack[stack.length - 1];
+ hide(items);
+ stack.pop();
+ layout();
+}
+
+function hide(items) {
+ var len = items.length;
+
+ for (var x = 0; x < len; x++) {
+ var item = items[x];
+ item.visible = false;
+ }
+}
+
+function show(items) {
+ var len = items.length;
+
+ var width = 0;
+ for (var x = 0; x < len; x++) {
+ width += items[x].width;
+ }
+
+ var spacing = (tools.width - width - tools.menuWidth) / len;
+
+ for (var x = 0; x < len; x++) {
+ var child = items[x];
+
+ if (x != 0) {
+ var prev = items[x - 1];
+ child.x = prev.x + prev.width + spacing;
+ }
+ else {
+ child.x = spacing + 80;
+ }
+
+ child.parent = tools;
+ child.visible = true;
+ child.y = 0;
+ }
+}
+
+function layout() {
+ if (stack.length == 0) {
+ return;
+ }
+
+ var items = stack[stack.length - 1];
+ var len = items.length;
+
+ if (!tools.expanded) {
+ hide(items);
+ }
+ else if (tools.width == tools.targetWidth) {
+ show(items);
+ }
+}
--- /dev/null
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import "CameraToolBar.js" as Layout
+
+Rectangle {
+ id: tools
+ property bool expanded: false
+ property list<Item> items
+ property int targetWidth: parent.width - (2 * anchors.leftMargin)
+ property alias menuWidth: menu.width
+
+ height: menu.height
+ width: expanded ? targetWidth : menu.width
+ color: expanded ? "black" : width == menu.width ? "transparent" : "black"
+ border.color: expanded ? "gray" : width == menu.width ? "transparent" : "gray"
+ radius: 20
+
+ Behavior on width {
+ PropertyAnimation { duration: 100; }
+ }
+
+ ToolIcon {
+ property bool __isMenu: true
+ id: menu
+ anchors.verticalCenter: parent.verticalCenter
+ iconSource: "image://theme/icon-m-toolbar-back-white"
+ onClicked: {
+ if (!expanded) {
+ expanded = true;
+ }
+ else if (Layout.stack.length == 1) {
+ expanded = false;
+ }
+ else {
+ Layout.pop();
+ }
+ }
+
+ anchors.left: parent.left
+ rotation: 180
+ }
+
+ onExpandedChanged: {
+ if (tools.expanded) {
+ tools.push(tools.items);
+ }
+ else {
+ tools.pop();
+ }
+ }
+
+ onWidthChanged: Layout.layout();
+ onTargetWidthChanged: Layout.layout();
+
+ Component.onCompleted: {
+ if (tools.expanded) {
+ tools.push(tools.items);
+ }
+ }
+
+ function push(items) {
+ return Layout.push(items);
+ }
+
+ function pop() {
+ return Layout.pop();
+ }
+
+ state: "collapsed"
+ states: [
+ State {
+ name: "expanded"
+ when: tools.expanded
+ },
+ State {
+ name: "collapsed"
+ when: !tools.expanded
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "expanded"
+ to: "collapsed"
+
+ PropertyAnimation {
+ property: "rotation"
+ target: menu
+ from: 0
+ to: 180
+ duration: 500
+ }
+ },
+ Transition {
+ from: "collapsed"
+ to: "expanded"
+ PropertyAnimation {
+ property: "rotation"
+ target: menu
+ from: 180
+ to: 360
+ duration: 500
+ }
+ }
+ ]
+}
import QtQuick 1.1
import com.nokia.meego 1.1
-Button {
+ToolIcon {
id: button
property string normalIcon: ""
property string checkedIcon: ""
property int value: -1
- property bool doClose: true
property int savedValue: -1
- width: visible ? 56 : 0
- height: visible ? 56 : 0
- iconSource: !visible ? "" : savedValue == value ? checkedIcon : normalIcon
-
- onClicked: {
- if (doClose) {
- close();
- }
- }
+ iconSource: savedValue == value ? checkedIcon : normalIcon
}
import QtCamera 1.0
import "data.js" as Data
-Selector {
+ToolIcon {
id: button
iconSource: "image://theme/" + Data.flashIcon(settings.imageFlashMode)
- title: qsTr("Flash mode");
-
- widget: Row {
- id: row
- height: button.checked ? 64 : 0
- width: button.checked ? (children.length * height) + (children.length - 1) * spacing : 0
- spacing: 10
-
- Behavior on width {
- // TODO: seems animation is not working
- PropertyAnimation { duration: 250; }
- }
-
+ property list<Item> items: [
+ Label {
+ height: parent ? parent.height : 0
+ text: qsTr("Flash");
+ verticalAlignment: Text.AlignVCenter
+ },
CheckButton {
normalIcon: "image://theme/" + Data.flashIcon(value)
checkedIcon: "image://theme/" + Data.flashPressedIcon(value)
onClicked: settings.imageFlashMode = value;
value: Flash.Auto
savedValue: settings.imageFlashMode
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.flashIcon(value)
checkedIcon: "image://theme/" + Data.flashPressedIcon(value)
onClicked: settings.imageFlashMode = value;
value: Flash.On
savedValue: settings.imageFlashMode
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.flashIcon(value)
checkedIcon: "image://theme/" + Data.flashPressedIcon(value)
onClicked: settings.imageFlashMode = value;
value: Flash.Off
savedValue: settings.imageFlashMode
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.flashIcon(value)
checkedIcon: "image://theme/" + Data.flashPressedIcon(value)
onClicked: settings.imageFlashMode = value;
value: Flash.RedEye
savedValue: settings.imageFlashMode
- }
- }
+ }]
}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-
-Item {
- id: root
- width: Math.max(150, Math.max(label.width, icon.width) + 20);
- height: 120
-
- property string normalIcon: ""
- property string checkedIcon: ""
- property int value: -1
- property int savedValue: -1
-
- property alias iconSource: icon.source
- property alias text: label.text
-
- signal clicked
-
- MouseArea {
- anchors.fill: parent
- onClicked: root.clicked();
- }
-
- Image {
- id: icon
-
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.topMargin: 10
- anchors.leftMargin: 10
- anchors.rightMargin: 10
- source: root.value == root.savedValue ? checkedIcon : normalIcon
- fillMode: Image.PreserveAspectFit
- }
-
- Label {
- id: label
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.top: icon.bottom
- anchors.bottomMargin: 10
- anchors.leftMargin: 10
- anchors.rightMargin: 10
- anchors.topMargin: 10
- horizontalAlignment: Text.AlignHCenter
- wrapMode: Text.NoWrap
- font.pixelSize: 22
- }
-}
--- /dev/null
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import QtCamera 1.0
+import "data.js" as Data
+
+ToolIcon {
+ id: button
+ iconSource: "image://theme/" + Data.cfIcon(settings.imageColorFilter);
+
+ property list<Item> items: [
+ Label {
+ height: parent ? parent.height : 0
+ text: qsTr("Filter");
+ verticalAlignment: Text.AlignVCenter
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Normal
+ savedValue: settings.imageColorFilter
+ onClicked: settings.imageColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.GrayScale
+ savedValue: settings.imageColorFilter
+ onClicked: settings.imageColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Sepia
+ savedValue: settings.imageColorFilter
+ onClicked: settings.imageColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Vivid
+ savedValue: settings.imageColorFilter
+ onClicked: settings.imageColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Negative
+ savedValue: settings.imageColorFilter
+ onClicked: settings.imageColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Solarize
+ savedValue: settings.imageColorFilter
+ onClicked: settings.imageColorFilter = value;
+ }]
+}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-import QtCamera 1.0
-import CameraPlus 1.0
-import "data.js" as Data
-
-CameraPage {
- id: page
-
- controlsVisible: false
- policyMode: CameraResources.Image
- needsPipeline: true
-
- Rectangle {
- color: "black"
- width: parent.width
- height: row.height + title.height + 30
- anchors.bottom: toolBar.top
- opacity: 0.5
-
- SectionHeader {
- id: title
- anchors.top: parent.top
- anchors.topMargin: 10
- text: qsTr("Color filter");
- }
-
- Row {
- id: row
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 20
- anchors.rightMargin: 20
- anchors.top: title.bottom
- anchors.topMargin: 10
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Normal
- savedValue: settings.imageColorFilter
- onClicked: settings.imageColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.GrayScale
- savedValue: settings.imageColorFilter
- onClicked: settings.imageColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Sepia
- savedValue: settings.imageColorFilter
- onClicked: settings.imageColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Vivid
- savedValue: settings.imageColorFilter
- onClicked: settings.imageColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Negative
- savedValue: settings.imageColorFilter
- onClicked: settings.imageColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Solarize
- savedValue: settings.imageColorFilter
- onClicked: settings.imageColorFilter = value;
- text: Data.cfName(value);
- }
- }
- }
-
- ToolBar {
- id: toolBar
- anchors.bottom: parent.bottom
- tools: ToolBarLayout {
- id: layout
- ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
- }
- }
-}
import com.nokia.meego 1.1
import QtCamera 1.0
-Selector {
+ToolIcon {
id: button
iconSource: settings.imageEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : ""
- text: settings.imageEvComp == 0 ? "" : settings.imageEvComp.toFixed(1);
- font.pixelSize: 19
- timerConstraints: slider.pressed
- title: qsTr("Exposure compensation");
-
- widget: Slider {
- id: slider
- width: 500
- orientation: Qt.Horizontal
- minimumValue: cam.evComp.minimum
- maximumValue: cam.evComp.maximum
- value: settings.imageEvComp
- stepSize: 0.1
- onValueChanged: settings.imageEvComp = value.toFixed(1);
- Component.onCompleted: { slider.value = settings.imageEvComp.toFixed(1); }
+ Label {
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ visible: settings.imageEvComp != 0
+ text: settings.imageEvComp == 0 ? "" : settings.imageEvComp.toFixed(1);
}
+
+ property list<Item> 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); }
+ }]
}
onSaved: mountProtector.unlock();
}
- FlashButton {
- id: flash
- visible: controlsVisible
+ Rectangle {
+ id: indicators
anchors.top: parent.top
- anchors.left: parent.left
anchors.topMargin: 20
- anchors.leftMargin: 20
- }
-
- ImageSceneButton {
- id: scene
- visible: controlsVisible
- anchors.top: flash.bottom
- anchors.left: parent.left
- anchors.topMargin: 10
- anchors.leftMargin: 20
- }
-
- ImageEvCompButton {
- id: evComp
- visible: controlsVisible
- anchors.top: scene.bottom
- anchors.left: parent.left
- anchors.topMargin: 10
- anchors.leftMargin: 20
- }
-
- MouseArea {
- id: indicators
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
width: 48
height: col.height
- onClicked: openFile("ImageSettingsPage.qml");
+ color: "black"
+ border.color: "gray"
+ radius: 20
+ opacity: 0.5
visible: controlsVisible
- BorderImage {
- id: image
- anchors.fill: parent
- smooth: true
- source: indicators.pressed ? "image://theme/meegotouch-camera-settings-indicators-background-pressed" : "image://theme/meegotouch-camera-settings-indicators-background"
- }
-
Column {
id: col
width: parent.width
onClicked: openFile("PostCapturePage.qml");
visible: controlsVisible
}
+
+ CameraToolBar {
+ id: toolBar
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ opacity: 0.5
+ targetWidth: parent.width - (anchors.leftMargin * 2) - (66 * 1.5)
+ visible: controlsVisible
+ expanded: settings.showToolBar
+ onExpandedChanged: settings.showToolBar = expanded;
+
+ items: [
+ FlashButton {
+ onClicked: toolBar.push(items);
+ },
+ ImageSceneButton {
+ onClicked: toolBar.push(items);
+ },
+ ImageEvCompButton {
+ onClicked: toolBar.push(items);
+ },
+ ImageWhiteBalanceButton {
+ onClicked: toolBar.push(items);
+ },
+ ImageColorFilterButton {
+ onClicked: toolBar.push(items);
+ },
+ ToolIcon {
+ iconSource: "image://theme/icon-m-toolbar-view-menu-white"
+ onClicked: openFile("ImageSettingsPage.qml");
+ }
+ ]
+ }
}
import QtCamera 1.0
import "data.js" as Data
-Selector {
+ToolIcon {
id: button
iconSource: "image://theme/" + Data.ismIcon(settings.imageSceneMode);
- title: qsTr("Scene mode");
-
- widget: Row {
- id: row
- height: button.checked ? 64 : 0
- width: button.checked ? (children.length * height) + (children.length - 1) * spacing : 0
- spacing: 10
-
- Behavior on width {
- // TODO: seems animation is not working
- PropertyAnimation { duration: 250; }
- }
-
+ property list<Item> items: [
+ Label {
+ height: parent ? parent.height : 0
+ text: qsTr("Scene");
+ verticalAlignment: Text.AlignVCenter
+ },
CheckButton {
normalIcon: "image://theme/" + Data.ismIcon(value);
checkedIcon: "image://theme/" + Data.ismSelectedIcon(value);
savedValue: settings.imageSceneMode
onClicked: settings.imageSceneMode = value;
value: Scene.Auto
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.ismIcon(value);
checkedIcon: "image://theme/" + Data.ismSelectedIcon(value);
savedValue: settings.imageSceneMode
onClicked: settings.imageSceneMode = value;
value: Scene.Closeup
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.ismIcon(value);
checkedIcon: "image://theme/" + Data.ismSelectedIcon(value);
savedValue: settings.imageSceneMode
onClicked: settings.imageSceneMode = value;
value: Scene.Landscape
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.ismIcon(value);
checkedIcon: "image://theme/" + Data.ismSelectedIcon(value);
savedValue: settings.imageSceneMode
onClicked: settings.imageSceneMode = value;
value: Scene.Portrait
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.ismIcon(value);
checkedIcon: "image://theme/" + Data.ismSelectedIcon(value);
savedValue: settings.imageSceneMode
onClicked: settings.imageSceneMode = value;
value: Scene.Night
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.ismIcon(value);
checkedIcon: "image://theme/" + Data.ismSelectedIcon(value);
savedValue: settings.imageSceneMode
onClicked: settings.imageSceneMode = value;
value: Scene.Sport
- }
- }
+ }]
}
font.pixelSize: 36
text: qsTr("Image settings");
}
-
+/*
SectionHeader {
text: qsTr("Capture mode");
}
Button { text: qsTr("Self timer"); }
Button { text: qsTr("Fast capture"); }
}
-
- Row {
- width: parent.width
-
- ListItem {
- id: wb
- width: parent.width / 2
- title: qsTr("White balance");
- subtitle: Data.wbName(settings.imageWhiteBalance);
- iconId: Data.wbSelectedIcon(settings.imageWhiteBalance);
- onClicked: openFile("ImageWhiteBalancePage.qml");
- }
-
- ListItem {
- id: cf
- width: parent.width / 2
- title: qsTr("Color filter");
- subtitle: Data.cfName(settings.imageColorFilter);
- iconId: Data.cfSelectedIcon(settings.imageColorFilter);
- onClicked: openFile("ImageColorFilterPage.qml");
- }
- }
-
+*/
+/*
SectionHeader {
text: qsTr("Self timer");
}
Button { text: qsTr("2 seconds"); }
Button { text: qsTr("10 seconds"); }
}
-
+*/
SectionHeader {
text: qsTr("Light sensitivity");
}
--- /dev/null
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import QtCamera 1.0
+import "data.js" as Data
+
+ToolIcon {
+ id: button
+
+ iconSource: "image://theme/" + Data.wbIcon(settings.imageWhiteBalance);
+
+ 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);
+ onClicked: settings.imageWhiteBalance = value;
+ value: WhiteBalance.Auto
+ savedValue: settings.imageWhiteBalance
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.wbIcon(value);
+ checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
+ onClicked: settings.imageWhiteBalance = value;
+ value: WhiteBalance.Sunset
+ savedValue: settings.imageWhiteBalance
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.wbIcon(value);
+ checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
+ onClicked: settings.imageWhiteBalance = value;
+ value: WhiteBalance.Cloudy
+ savedValue: settings.imageWhiteBalance
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.wbIcon(value);
+ checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
+ onClicked: settings.imageWhiteBalance = value;
+ value: WhiteBalance.Flourescent
+ savedValue: settings.imageWhiteBalance
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.wbIcon(value);
+ checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
+ onClicked: settings.imageWhiteBalance = value;
+ value: WhiteBalance.Tungsten
+ savedValue: settings.imageWhiteBalance
+ }]
+}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-import QtCamera 1.0
-import CameraPlus 1.0
-import "data.js" as Data
-
-CameraPage {
- id: page
-
- controlsVisible: false
- policyMode: CameraResources.Image
- needsPipeline: true
-
- Rectangle {
- color: "black"
- width: parent.width
- height: row.height + title.height + 30
- anchors.bottom: toolBar.top
- opacity: 0.5
-
- SectionHeader {
- id: title
- anchors.top: parent.top
- anchors.topMargin: 10
- text: qsTr("White balance");
- }
-
- Row {
- id: row
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 20
- anchors.rightMargin: 20
- anchors.top: title.bottom
- anchors.topMargin: 10
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Auto
- savedValue: settings.imageWhiteBalance
- onClicked: settings.imageWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Sunset
- savedValue: settings.imageWhiteBalance
- onClicked: settings.imageWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Cloudy
- savedValue: settings.imageWhiteBalance
- onClicked: settings.imageWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Flourescent
- savedValue: settings.imageWhiteBalance
- onClicked: settings.imageWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Tungsten
- savedValue: settings.imageWhiteBalance
- onClicked: settings.imageWhiteBalance = value;
- text: Data.wbName(value);
- }
- }
- }
-
- ToolBar {
- id: toolBar
- anchors.bottom: parent.bottom
- tools: ToolBarLayout {
- id: layout
- ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
- }
- }
-}
anchors.topMargin: 5
anchors.bottomMargin: 5
- width: parent.width - 10
height: width
}
camera: cam
}
- VideoTorchButton {
- id: torch
- camera: cam
- visible: controlsVisible
+ Rectangle {
anchors.top: parent.top
- anchors.left: parent.left
anchors.topMargin: 20
+ anchors.left: parent.left
anchors.leftMargin: 20
+ width: 48
+ height: col.height
+ color: "black"
+ border.color: "gray"
+ radius: 20
opacity: 0.5
- }
-
- VideoEvCompButton {
- id: evComp
visible: controlsVisible
- anchors.top: torch.bottom
- anchors.left: parent.left
- anchors.topMargin: 10
- anchors.leftMargin: 20
+
+ Column {
+ id: col
+ width: parent.width
+ spacing: 5
+
+ Indicator {
+ id: resolutionIndicator
+ source: "image://theme/" + Data.videoIcon(settings.videoResolution);
+ }
+
+ Indicator {
+ id: wbIndicator
+ source: visible ? "image://theme/" + Data.wbIcon(settings.videoWhiteBalance) + "-screen" : ""
+ visible: settings.videoWhiteBalance != WhiteBalance.Auto
+ }
+
+ Indicator {
+ id: cfIndicator
+ source: "image://theme/" + Data.cfIcon(settings.videoColorFilter) + "-screen"
+ visible: settings.videoColorFilter != ColorTone.Normal
+ }
+
+ Indicator {
+ id: gpsIndicator
+ visible: settings.useGps
+ source: "image://theme/icon-m-camera-location"
+
+ PropertyAnimation on opacity {
+ easing.type: Easing.OutSine
+ loops: Animation.Infinite
+ from: 0.2
+ to: 1.0
+ duration: 1000
+ running: settings.useGps && !positionSource.position.longitudeValid
+ alwaysRunToEnd: true
+ }
+ }
+ }
}
Rectangle {
- anchors.left: parent.left
anchors.bottom: parent.bottom
- anchors.leftMargin: 20
+ anchors.right: parent.right
+ anchors.rightMargin: 20
anchors.bottomMargin: 20
visible: controlsVisible
anchors.leftMargin: 5
}
}
+
+ CameraToolBar {
+ id: toolBar
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ opacity: 0.5
+ targetWidth: parent.width - (anchors.leftMargin * 2) - (66 * 1.5)
+ visible: controlsVisible
+ expanded: settings.showToolBar
+ onExpandedChanged: settings.showToolBar = expanded;
+
+ items: [
+ VideoTorchButton {
+ camera: cam
+ },
+ VideoEvCompButton {
+ onClicked: toolBar.push(items);
+ },
+ VideoWhiteBalanceButton {
+ onClicked: toolBar.push(items);
+ },
+ VideoColorFilterButton {
+ onClicked: toolBar.push(items);
+ },
+ ToolIcon {
+ iconSource: "image://theme/icon-m-toolbar-view-menu-white"
+ onClicked: openFile("VideoSettingsPage.qml");
+ }
+ ]
+ }
}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-import QtCamera 1.0
-
-Button {
- id: button
- width: 56
- height: 56
-
- opacity: 0.5
-
- property alias widget: __widget.children
- property bool timerConstraints: false
- property alias title: label.text
-
- checkable: true
-
- function close() {
- button.checked = false;
- }
-
- Timer {
- interval: 2000
- running: mouse.enabled && !button.timerConstraints
- repeat: false
- onTriggered: button.close();
- }
-
- MouseArea {
- id: mouse
- parent: button.parent
- anchors.fill: parent
- enabled: button.checked
- onClicked: button.close();
-
- Label {
- id: label
- y: button.y
- x: button.x + button.width + 20
- visible: button.checked
- }
-
- Item {
- id: __widget
- anchors.top: label.bottom
- anchors.topMargin: 10
-// y: button.y
- x: button.x + button.width + 20
- visible: button.checked
- }
- }
-}
--- /dev/null
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import QtCamera 1.0
+import "data.js" as Data
+
+ToolIcon {
+ id: button
+
+ iconSource: "image://theme/" + Data.cfIcon(settings.videoColorFilter);
+
+ property list<Item> items: [
+ Label {
+ height: parent ? parent.height : 0
+ text: qsTr("Filter");
+ verticalAlignment: Text.AlignVCenter
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Normal
+ savedValue: settings.videoColorFilter
+ onClicked: settings.videoColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.GrayScale
+ savedValue: settings.videoColorFilter
+ onClicked: settings.videoColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Sepia
+ savedValue: settings.videoColorFilter
+ onClicked: settings.videoColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Vivid
+ savedValue: settings.videoColorFilter
+ onClicked: settings.videoColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Negative
+ savedValue: settings.videoColorFilter
+ onClicked: settings.videoColorFilter = value;
+ },
+ CheckButton {
+ normalIcon: "image://theme/" + Data.cfIcon(value);
+ checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
+ value: ColorTone.Solarize
+ savedValue: settings.videoColorFilter
+ onClicked: settings.videoColorFilter = value;
+ }]
+}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-import QtCamera 1.0
-import CameraPlus 1.0
-import "data.js" as Data
-
-CameraPage {
- id: page
-
- controlsVisible: false
- policyMode: CameraResources.Video
- needsPipeline: true
-
- Rectangle {
- color: "black"
- width: parent.width
- height: row.height + title.height + 30
- anchors.bottom: toolBar.top
- opacity: 0.5
-
- SectionHeader {
- id: title
- anchors.top: parent.top
- anchors.topMargin: 10
- text: qsTr("Color filter");
- }
-
- Row {
- id: row
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 20
- anchors.rightMargin: 20
- anchors.top: title.bottom
- anchors.topMargin: 10
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Normal
- savedValue: settings.videoColorFilter
- onClicked: settings.videoColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.GrayScale
- savedValue: settings.videoColorFilter
- onClicked: settings.videoColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Sepia
- savedValue: settings.videoColorFilter
- onClicked: settings.videoColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Vivid
- savedValue: settings.videoColorFilter
- onClicked: settings.videoColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Negative
- savedValue: settings.videoColorFilter
- onClicked: settings.videoColorFilter = value;
- text: Data.cfName(value);
- }
-
- IconButton {
- width: parent.width / 6
- normalIcon: "image://theme/" + Data.cfIcon(value);
- checkedIcon: "image://theme/" + Data.cfSelectedIcon(value);
- value: ColorTone.Solarize
- savedValue: settings.videoColorFilter
- onClicked: settings.videoColorFilter = value;
- text: Data.cfName(value);
- }
- }
- }
-
- ToolBar {
- id: toolBar
- anchors.bottom: parent.bottom
- tools: ToolBarLayout {
- id: layout
- ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
- }
- }
-}
import com.nokia.meego 1.1
import QtCamera 1.0
-Selector {
+ToolIcon {
id: button
iconSource: settings.videoEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : ""
- text: settings.videoEvComp == 0 ? "" : settings.videoEvComp.toFixed(1);
- font.pixelSize: 19
- timerConstraints: slider.pressed
- title: qsTr("Exposure compensation");
-
- widget: Slider {
- id: slider
- width: 500
- orientation: Qt.Horizontal
- minimumValue: cam.evComp.minimum
- maximumValue: cam.evComp.maximum
- value: settings.videoEvComp
- stepSize: 0.1
- onValueChanged: settings.videoEvComp = value.toFixed(1);
- Component.onCompleted: { slider.value = settings.videoEvComp.toFixed(1); }
+ Label {
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ visible: settings.videoEvComp != 0
+ text: settings.videoEvComp == 0 ? "" : settings.videoEvComp.toFixed(1);
}
+
+ property list<Item> 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); }
+ }]
}
}
}
- VideoTorchButton {
- id: torch
- camera: cam
- visible: controlsVisible
+ Rectangle {
anchors.top: parent.top
- anchors.left: parent.left
anchors.topMargin: 20
- anchors.leftMargin: 20
- opacity: 0.5
- }
-
- VideoSceneButton {
- id: scene
- visible: controlsVisible
- anchors.top: torch.bottom
- anchors.left: parent.left
- anchors.topMargin: 10
- anchors.leftMargin: 20
- }
-
- VideoEvCompButton {
- id: evComp
- visible: controlsVisible
- anchors.top: scene.bottom
- anchors.left: parent.left
- anchors.topMargin: 10
- anchors.leftMargin: 20
- }
-
- MouseArea {
- id: indicators
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
width: 48
height: col.height
- onClicked: openFile("VideoSettingsPage.qml");
+ color: "black"
+ border.color: "gray"
+ radius: 20
+ opacity: 0.5
visible: controlsVisible
- BorderImage {
- id: image
- anchors.fill: parent
- smooth: true
- source: indicators.pressed ? "image://theme/meegotouch-camera-settings-indicators-background-pressed" : "image://theme/meegotouch-camera-settings-indicators-background"
- }
-
Column {
id: col
width: parent.width
onClicked: openFile("PostCapturePage.qml");
visible: controlsVisible
}
+
+ CameraToolBar {
+ id: toolBar
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ opacity: 0.5
+ targetWidth: parent.width - (anchors.leftMargin * 2) - (66 * 1.5)
+ visible: controlsVisible
+ expanded: settings.showToolBar
+ onExpandedChanged: settings.showToolBar = expanded;
+
+ items: [
+ VideoTorchButton {
+ camera: cam
+ },
+ VideoSceneButton {
+ onClicked: toolBar.push(items);
+ },
+ VideoEvCompButton {
+ onClicked: toolBar.push(items);
+ },
+ VideoWhiteBalanceButton {
+ onClicked: toolBar.push(items);
+ },
+ VideoColorFilterButton {
+ onClicked: toolBar.push(items);
+ },
+ ToolIcon {
+ iconSource: "image://theme/icon-m-toolbar-view-menu-white"
+ onClicked: openFile("VideoSettingsPage.qml");
+ }
+ ]
+ }
}
import QtCamera 1.0
import "data.js" as Data
-Selector {
+ToolIcon {
id: button
- iconSource: sceneIcon(settings.videoSceneMode);
-
- title: qsTr("Scene mode");
-
- function sceneIcon(val) {
- var x = row.children.length;
- var i = 0;
- for (i = 0; i < x; i++) {
- if (row.children[i].value == val) {
- return row.children[i].normalIcon;
- }
- }
- }
-
- widget: Row {
- id: row
- height: button.checked ? 64 : 0
- width: button.checked ? (children.length * height) + (children.length - 1) * spacing : 0
- spacing: 10
-
- Behavior on width {
- // TODO: seems animation is not working
- PropertyAnimation { duration: 250; }
- }
-
+ iconSource: "image://theme/" + Data.vsmIcon(settings.videoSceneMode);
+ property list<Item> items: [
+ Label {
+ height: parent ? parent.height : 0
+ text: qsTr("Scene");
+ verticalAlignment: Text.AlignVCenter
+ },
CheckButton {
normalIcon: "image://theme/" + Data.vsmIcon(value);
checkedIcon: "image://theme/" + Data.vsmSelectedIcon(value);
savedValue: settings.videoSceneMode
onClicked: settings.videoSceneMode = value;
value: Scene.Auto
- }
-
+ },
CheckButton {
normalIcon: "image://theme/" + Data.vsmIcon(value);
checkedIcon: "image://theme/" + Data.vsmSelectedIcon(value);
savedValue: settings.videoSceneMode
onClicked: settings.videoSceneMode = value;
value: Scene.Night
- }
- }
+ }]
}
text: qsTr("Video settings");
}
- Row {
- width: parent.width
-
- ListItem {
- id: wb
- width: parent.width / 2
- title: qsTr("White balance");
- subtitle: Data.wbName(settings.videoWhiteBalance);
- iconId: Data.wbSelectedIcon(settings.videoWhiteBalance);
- onClicked: openFile("VideoWhiteBalancePage.qml");
- }
-
- ListItem {
- id: cf
- width: parent.width / 2
- title: qsTr("Color filter");
- subtitle: Data.cfName(settings.videoColorFilter);
- iconId: Data.cfSelectedIcon(settings.videoColorFilter);
- onClicked: openFile("VideoColorFilterPage.qml");
- }
- }
-
SectionHeader {
text: qsTr("Resolution");
}
import com.nokia.meego 1.1
import QtCamera 1.0
-Button {
+ToolIcon {
id: button
- width: 56
- height: 56
- opacity: 0.5
-
property Camera camera: null
iconSource: settings.videoTorchOn ? "image://theme/icon-m-camera-torch-on" : "image://theme/icon-m-camera-torch-off"
--- /dev/null
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import QtCamera 1.0
+import "data.js" as Data
+
+ToolIcon {
+ id: button
+
+ iconSource: "image://theme/" + 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;
+ }]
+}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-import QtCamera 1.0
-import CameraPlus 1.0
-import "data.js" as Data
-
-CameraPage {
- id: page
-
- controlsVisible: false
- policyMode: CameraResources.Video
- needsPipeline: true
-
- Rectangle {
- color: "black"
- width: parent.width
- height: row.height + title.height + 30
- anchors.bottom: toolBar.top
- opacity: 0.5
-
- SectionHeader {
- id: title
- anchors.top: parent.top
- anchors.topMargin: 10
- text: qsTr("White balance");
- }
-
- Row {
- id: row
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 20
- anchors.rightMargin: 20
- anchors.top: title.bottom
- anchors.topMargin: 10
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Auto
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Sunset
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Cloudy
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Flourescent
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- text: Data.wbName(value);
- }
-
- IconButton {
- width: parent.width / 5
- normalIcon: "image://theme/" + Data.wbIcon(value);
- checkedIcon: "image://theme/" + Data.wbSelectedIcon(value);
- value: WhiteBalance.Tungsten
- savedValue: settings.videoWhiteBalance
- onClicked: settings.videoWhiteBalance = value;
- text: Data.wbName(value);
- }
- }
- }
-
- ToolBar {
- id: toolBar
- anchors.bottom: parent.bottom
- tools: ToolBarLayout {
- id: layout
- ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
- }
- }
-}
];
var __flash = [
- [Flash.Auto,"icon-m-camera-flash-auto-pressed", "icon-m-camera-flash-auto"],
- [Flash.On, "icon-m-camera-flash-always-pressed", "icon-m-camera-flash-always"],
- [Flash.Off, "icon-m-camera-flash-off-pressed", "icon-m-camera-flash-off"],
- [Flash.RedEye, "icon-m-camera-flash-red-eye-pressed", "icon-m-camera-flash-red-eye"]
+ [Flash.Auto,"icon-m-camera-flash-auto-selected", "icon-m-camera-flash-auto"],
+ [Flash.On, "icon-m-camera-flash-always-selected", "icon-m-camera-flash-always"],
+ [Flash.Off, "icon-m-camera-flash-off-selected", "icon-m-camera-flash-off"],
+ [Flash.RedEye, "icon-m-camera-flash-red-eye-selected", "icon-m-camera-flash-red-eye"]
];
// ISO
#define DEFAULT_VIDEO_RESOLUTION "high"
#define DEFAULT_SOUND_ENABLED true
#define DEFAULT_VIDEO_TORCH_ON false
+#define DEFAULT_SHOW_TOOL_BAR false
Settings::Settings(QObject *parent) :
QObject(parent),
emit videoTorchOnChanged();
}
}
+
+bool Settings::isToolBarShown() const {
+ return m_settings->value("camera/showToolBar", DEFAULT_SHOW_TOOL_BAR).toBool();
+}
+
+void Settings::setToolBarShown(bool shown) {
+ if (isToolBarShown() != shown) {
+ m_settings->setValue("camera/showToolBar", shown);
+
+ emit toolBarShownChanged();
+ }
+}
Q_PROPERTY(bool soundEnabled READ isSoundEnabled WRITE setSoundEnabled NOTIFY soundEnabledChanged);
Q_PROPERTY(bool videoTorchOn READ isVideoTorchOn WRITE setVideoTorchOn NOTIFY videoTorchOnChanged);
+ Q_PROPERTY(bool showToolBar READ isToolBarShown WRITE setToolBarShown NOTIFY toolBarShownChanged);
+
public:
Settings(QObject *parent = 0);
~Settings();
bool isVideoTorchOn() const;
void setVideoTorchOn(bool on);
+ bool isToolBarShown() const;
+ void setToolBarShown(bool shown);
+
signals:
void modeChanged();
void creatorNameChanged();
void videoResolutionChanged();
void soundEnabledChanged();
void videoTorchOnChanged();
+ void toolBarShownChanged();
private:
QSettings *m_settings;