From: Mohammed Sameer Date: Mon, 26 Aug 2013 23:21:33 +0000 (+0300) Subject: Convert TextSwitch to a platform specific component and rename it to CameraTextSwitch X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=commitdiff_plain;h=a52464d477e5a9bf9c75d5d3b4e7db978a78686e Convert TextSwitch to a platform specific component and rename it to CameraTextSwitch Sailfish Silica has a native TextSwitch which can be used directly --- diff --git a/qml/CameraSettings.qml b/qml/CameraSettings.qml index 993c262..cf17969 100644 --- a/qml/CameraSettings.qml +++ b/qml/CameraSettings.qml @@ -60,7 +60,7 @@ Column { } } - TextSwitch { + CameraTextSwitch { text: qsTr("Show grid lines") // We have to do it that way because QML complains about a binding @@ -82,7 +82,7 @@ Column { onTextChanged: settings.creatorName = text } - TextSwitch { + CameraTextSwitch { text: qsTr("Use zoom keys for capture") // We have to do it that way because QML complains about a binding @@ -91,7 +91,7 @@ Column { onCheckedChanged: settings.zoomAsShutter = checked } - TextSwitch { + CameraTextSwitch { text: qsTr("Use proximity sensor for capture") // We have to do it that way because QML complains about a binding @@ -100,7 +100,7 @@ Column { onCheckedChanged: settings.proximityAsShutter = checked } - TextSwitch { + CameraTextSwitch { text: qsTr("Enable camera sounds") // We have to do it that way because QML complains about a binding @@ -109,7 +109,7 @@ Column { onCheckedChanged: settings.soundEnabled = checked } - TextSwitch { + CameraTextSwitch { id: useGps text: qsTr("Use GPS") @@ -119,7 +119,7 @@ Column { onCheckedChanged: settings.useGps = checked } - TextSwitch { + CameraTextSwitch { // TODO: transition when hiding/showing and we should scroll a bit to show it visible: useGps.checked diff --git a/qml/ImageModeSettings.qml b/qml/ImageModeSettings.qml index 66bbf7d..a0ef4aa 100644 --- a/qml/ImageModeSettings.qml +++ b/qml/ImageModeSettings.qml @@ -47,7 +47,7 @@ Flickable { width: parent.width } - TextSwitch { + CameraTextSwitch { text: qsTr("Enable face detection") // We have to do it that way because QML complains about a binding // loop for checked if we bind the checked property to the settings value. diff --git a/qml/TextSwitch.qml b/qml/harmattan/CameraTextSwitch.qml similarity index 98% rename from qml/TextSwitch.qml rename to qml/harmattan/CameraTextSwitch.qml index 4d95d8b..de664ac 100644 --- a/qml/TextSwitch.qml +++ b/qml/harmattan/CameraTextSwitch.qml @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -import QtQuick 2.0 +import QtQuick 1.1 Item { property alias text: label.text diff --git a/qml/harmattan/harmattan.qrc b/qml/harmattan/harmattan.qrc index be7d401..f4d4ac1 100644 --- a/qml/harmattan/harmattan.qrc +++ b/qml/harmattan/harmattan.qrc @@ -16,5 +16,6 @@ CameraPositionSource.qml CameraPage.qml CameraProximitySensor.qml + CameraTextSwitch.qml diff --git a/qml/qml.qrc b/qml/qml.qrc index 3875f11..64101e9 100644 --- a/qml/qml.qrc +++ b/qml/qml.qrc @@ -32,7 +32,6 @@ SectionHeader.qml SettingsView.qml Standby.qml - TextSwitch.qml ToolsModelItem.qml VideoColorFilterButton.qml VideoEvCompButton.qml diff --git a/qml/sailfish/CameraTextSwitch.qml b/qml/sailfish/CameraTextSwitch.qml new file mode 100644 index 0000000..13ef8eb --- /dev/null +++ b/qml/sailfish/CameraTextSwitch.qml @@ -0,0 +1,28 @@ +// -*- qml -*- + +/*! + * This file is part of CameraPlus. + * + * 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 + * 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 2.0 +import Sailfish.Silica 1.0 + +TextSwitch { + +} diff --git a/qml/sailfish/sailfish.qrc b/qml/sailfish/sailfish.qrc index bbe0dfe..cf3b131 100644 --- a/qml/sailfish/sailfish.qrc +++ b/qml/sailfish/sailfish.qrc @@ -15,5 +15,6 @@ FullScreenThumbnail.qml CameraPositionSource.qml CameraPage.qml + CameraTextSwitch.qml