diff --git a/CMakeLists.txt b/CMakeLists.txt index abe45bf..a86b173 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,29 +1,29 @@ project(plasma-camera) cmake_minimum_required(VERSION 2.8.12) include(CPack) include(FeatureSummary) find_package(PkgConfig) ################# set KDE specific information ################# find_package(ECM 0.0.8 REQUIRED NO_MODULE) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) # find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui) set (QT_MIN_VERSION "5.9.0") find_package(KF5Kirigami2 REQUIRED) find_package(KF5 REQUIRED COMPONENTS Package) -kpackage_install_bundled_package(package org.kde.phone.camera genericqml) +kpackage_install_package(package org.kde.phone.camera genericqml) install(FILES package/metadata.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME org.kde.phone.camera.desktop) diff --git a/package/contents/ui/GlobalDrawer.qml b/package/contents/ui/GlobalDrawer.qml index 67a3c90..0f3af92 100644 --- a/package/contents/ui/GlobalDrawer.qml +++ b/package/contents/ui/GlobalDrawer.qml @@ -1,121 +1,121 @@ /**************************************************************************** ** ** Copyright (C) 2018 Jonah BrĂ¼chert ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ import org.kde.kirigami 2.0 as Kirigami import QtQuick 2.7 import QtQml.Models 2.2 import QtMultimedia 5.8 Kirigami.GlobalDrawer { actions: [ Kirigami.Action { text: qsTr("Camera") iconName: "camera-photo" DelegateModel { model: QtMultimedia.availableCameras delegate: Kirigami.Action { text: model.displayName onTriggered: settings.cameraDeviceId = model.deviceId } } }, Kirigami.Action { text: qsTr("Video resolution") iconName: "ratiocrop" DelegateModel { model: applicationWindow().cameraPage.camera.videoRecorder.supportedResolutions delegate: Kirigami.Action { text: model onTriggered: settings.videoResolution = text; } } }, Kirigami.Action { text: qsTr("Photo resolution") iconName: "ratiocrop" DelegateModel { model: applicationWindow().cameraPage.camera.imageCapture.supportedResolutions delegate: Kirigami.Action { text: model - onTriggered: settings.videoResolution = text; + onTriggered: settings.photoResolution = text; } } }, Kirigami.Action { text: qsTr("White balance") iconName: "whitebalance" DelegateModel { model: ListModel { ListElement { icon: "images/camera_auto_mode.png" value: CameraImageProcessing.WhiteBalanceAuto text: "Auto" } ListElement { icon: "images/camera_white_balance_sunny.png" value: CameraImageProcessing.WhiteBalanceSunlight text: "Sunlight" } ListElement { icon: "images/camera_white_balance_cloudy.png" value: CameraImageProcessing.WhiteBalanceCloudy text: "Cloudy" } ListElement { icon: "images/camera_white_balance_incandescent.png" value: CameraImageProcessing.WhiteBalanceTungsten text: "Tungsten" } ListElement { icon: "images/camera_white_balance_flourescent.png" value: CameraImageProcessing.WhiteBalanceFluorescent text: "Fluorescent" } } delegate: Kirigami.Action { text: model.text iconName: model.icon onTriggered: { applicationWindow().cameraPage.camera.imageProcessing.whiteBalanceMode = value } } } } ] } diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index 3858431..319fb6a 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -1,61 +1,62 @@ /**************************************************************************** ** ** Copyright (C) 2018 Jonah BrĂ¼chert ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ import QtQuick 2.7 import org.kde.kirigami 2.2 as Kirigami import Qt.labs.settings 1.0 Kirigami.ApplicationWindow { Settings { id: settings // Default settings property string videoResolution: "640x480" + property string photoResolution property string cameraDeviceId } Component {id: cameraPage; CameraPage {}} id: root title: qsTr("Camera") globalDrawer: GlobalDrawer {} Component.onCompleted: pageStack.push(cameraPage) }