diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6257c7e3..7e29bf33 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,337 +1,341 @@ IF(POLICY CMP0017) CMAKE_POLICY(SET CMP0017 NEW) ENDIF(POLICY CMP0017) IF(POLICY CMP0022) CMAKE_POLICY(SET CMP0022 NEW) ENDIF(POLICY CMP0022) IF(POLICY CMP0063) CMAKE_POLICY(SET CMP0063 NEW) ENDIF(POLICY CMP0063) SET(QT_MIN_VERSION "5.2.0") ADD_DEFINITIONS( ${KF5_DEFINITIONS} ${QT_DEFINITIONS} -fexceptions -Wno-error -Wno-reorder -Wno-error=deprecated-declarations ) # It doesn't work in sandboxes IF (NOT ENABLE_SINGLE_INSTANCE) ADD_DEFINITIONS(-DDISABLE_KDBUS_SERVICE=1) ENDIF() # Enable some useful warnings ADD_DEFINITIONS( -Wall -Wextra -Wmissing-declarations -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wundef -Wmissing-format-attribute -Wno-reorder -Wunused -Wuninitialized -Woverloaded-virtual -Wunused-value -pedantic -Wnonnull -Wsequence-point #-Wsystem-headers -Wsizeof-pointer-memaccess #-Wuseless-cast -Wvarargs ) #Add more warnings for compilers that support it. I used this command: #curl https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Warning-Options.html | \ #grep -E "^[\t ]+
-W[a-zA-Z=-]*" -o | grep -E "\-W[a-zA-Z=-]*" -o > #cat /tmp/48 /tmp/49 | sort | uniq -u # IF (CMAKE_COMPILER_IS_GNUCC) IF (CMAKE_COMPILER_IS_GNUCC) IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9) ADD_DEFINITIONS( -Wunused-but-set-parameter -Wconditionally-supported -Wno-cpp # -Wdouble-promotion -Wdate-time -Wdelete-incomplete # -Wfloat-conversion ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9) ADD_DEFINITIONS( -Wno-pragmas ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.0) ADD_DEFINITIONS( -Wsuggest-override -Wsuggest-final-types -Wsuggest-final-methods -Wbool-compare -Wformat-signedness -Wlogical-not-parentheses -Wnormalized -Wshift-count-negative -Wshift-count-overflow -Wsized-deallocation -Wsizeof-array-argument ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.0) ADD_DEFINITIONS( -Wnull-dereference -Wtautological-compare -Wduplicated-cond -Wmisleading-indentation ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0) ADD_DEFINITIONS( -Wimplicit-fallthrough -Wduplicated-branches -Wswitch-unreachable -Wformat-overflow -Wformat-truncation -Wnonnull ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0) ADD_DEFINITIONS( -Wmultistatement-macros -Wstringop-truncation -Wif-not-aligned -Wmissing-attributes ) ENDIF() ENDIF() IF (CMAKE_COMPILER_IS_GNUCC) EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION) IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6) #GCC 4.6 version of those warnings does detect valid C++0x/C++11 as invalid. ADD_DEFINITIONS( -Wno-error=pragmas -Wno-pragmas -Wno-error ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.7 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.7) ADD_DEFINITIONS( -Wmaybe-uninitialized -Wunused-local-typedefs -pedantic ) ENDIF() IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.8) # ADD_DEFINITIONS("-Wzero-as-null-pointer-constant") # ADD_DEFINITIONS( -DENABLE_IGNORE_NULL=true ) ENDIF() ELSE() ADD_DEFINITIONS(-Wno-unknown-pragmas -Wno-unknown-warning-option) ENDIF() ADD_DEFINITIONS("-std=c++0x") #Make sure it can access DBUS autogenerated files INCLUDE_DIRECTORIES(SYSTEM ${KF5_INCLUDES} ${Qt5Widgets_INCLUDES} ${Qt5PrintSupport_INCLUDES} ${Qt5Core_INCLUDES} ${CMAKE_BINARY_DIR} ${ringqt_INCLUDE_DIR} ${LIB_TIP_INCLUDE} ${LIB_CONFIG_INCLUDE} ${LIB_CONFIG_WIDGETS} ) # Shared C++ QML components ADD_SUBDIRECTORY( qmlwidgets ) #Build KDE specific files ADD_SUBDIRECTORY( jamikdeintegration ) # Build the QML based first run Wizard ADD_SUBDIRECTORY( wizard ) # Build the QML based interactive video canvas ADD_SUBDIRECTORY( callview ) # Build the advanced phone dialer ADD_SUBDIRECTORY( dialview ) # Build the views and widgets related to the social timeline feature ADD_SUBDIRECTORY( timeline ) # Build the contact and profile photo editor dialog ADD_SUBDIRECTORY( photoselector ) # Build the elements used to notify the users of events ADD_SUBDIRECTORY( canvasindicators ) # Build the contact manager subsystem ADD_SUBDIRECTORY( contactview ) # Build the account manager subsystem ADD_SUBDIRECTORY( accountview ) # Build the account manager subsystem ADD_SUBDIRECTORY( jaminotification ) +# Build the main desktop component +ADD_SUBDIRECTORY( jamivideoview ) + # Build the main desktop component ADD_SUBDIRECTORY( desktopview ) # ADD_DEPENDENCIES(desktopview DEPENDS jamikdeintegration) IF(${CMAKE_BUILD_TYPE} MATCHES Release) MESSAGE("NO DEBUG OUTPUT") ADD_DEFINITIONS( -DQT_NO_DEBUG_OUTPUT) ELSE() ENDIF(${CMAKE_BUILD_TYPE} MATCHES Release) SET( ring_kde_SRCS main.cpp cmd.cpp ringapplication.cpp ) # generate rules for building source files from the resources SET(QtApp_RCCS qrc/resources.qrc # conf/confresources.qrc ../data/appicon.qrc ) QT5_ADD_RESOURCES(QtApp_RCC_SRCS ${QtApp_RCCS}) # add_subdirectory( test ) #Enable again some day, it cause compile problems for some users IF(NOT (${ENABLE_VIDEO} MATCHES false)) SET(ENABLE_VIDEO 1 CACHE BOOLEAN "Enable video") ADD_DEFINITIONS( -DENABLE_VIDEO=true ) SET ( config_ui_files ${config_ui_files} conf/dlgvideobase.ui ) ENDIF(NOT (${ENABLE_VIDEO} MATCHES false)) IF(${DISABLE_UNIQUE_APPLICATION} MATCHES true) MESSAGE("KUniqueApplication disabled") SET(DISABLE_UNIQUE_APPLICATION 1 CACHE BOOLEAN "Disable KUniqueApplication") ADD_DEFINITIONS( -DDISABLE_UNIQUE_APPLICATION=true ) ENDIF(${DISABLE_UNIQUE_APPLICATION} MATCHES true) ki18n_wrap_ui(ring_kde_SRCS ${config_ui_files} ) IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ADD_EXECUTABLE(ring-kde MACOSX_BUNDLE ${ring_kde_SRCS} ${QtApp_RCC_SRCS}) set_source_files_properties( ../data/ring-kdeui.rc PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) file( COPY ../data/ring-kdeui.rc DESTINATION "ring-kde.app/Contents/Resources/" ) ELSE() ADD_EXECUTABLE(ring-kde ${ring_kde_SRCS} ${QtApp_RCC_SRCS}) ENDIF() IF(NOT ${ENABLE_STATIC} MATCHES false) FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED DBus) INCLUDE_DIRECTORIES(SYSTEM ${Qt5DBus_INCLUDE_DIRS} ) LINK_DIRECTORIES(${Qt5DBus_LIBRARY_DIRS} ) ADD_DEFINITIONS(${Qt5DBus_CFLAGS}) IF(NOT DEFINED OS_ANDROID) TARGET_LINK_LIBRARIES(ring-kde -lpthread ) ENDIF() TARGET_LINK_LIBRARIES(ring-kde ${ringqt_LIBRARY_STATIC} ) IF(NOT ${ENABLE_LIBWRAP}) TARGET_LINK_LIBRARIES(ring-kde ${Qt5DBus_LIBRARIES} ) ENDIF() ELSE() TARGET_LINK_LIBRARIES(ring-kde ${ringqt_LIBRARY_DYNAMIC}) ENDIF() QT5_ADD_DBUS_ADAPTOR(ring_kde_SRCS ../data/org.kde.kuiserver.xml cmd.h Cmd ) TARGET_LINK_LIBRARIES(ring-kde jamiwizard jamicallview jamidialview jamitimelineview jamiphotoselector jamicanvasindicator desktopview jamicontactview jamiaccountview jaminotification libqmlwidgets kquickitemviews jamikdeintegration + jamivideoview # RingQt ringqtquick # Qt5 Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::PrintSupport # KF5 KF5::I18n KF5::WidgetsAddons KF5::ConfigCore KF5::ConfigGui KF5::DBusAddons KF5::XmlGui KF5::Notifications KF5::IconThemes KF5::Crash KF5::NotifyConfig KF5::GlobalAccel KF5::Declarative KF5::Kirigami2 ) IF (Qt5TextToSpeech_FOUND) TARGET_LINK_LIBRARIES(ring-kde Qt5::TextToSpeech ) ENDIF() ########### install files ############### INSTALL( TARGETS ring-kde DESTINATION ${BIN_INSTALL_DIR} ) INSTALL( FILES wizard/assets/beta_logo.svg DESTINATION ${DATA_INSTALL_DIR}/ring-kde ) diff --git a/src/callview/CMakeLists.txt b/src/callview/CMakeLists.txt index 87f4fc7f..a4773476 100644 --- a/src/callview/CMakeLists.txt +++ b/src/callview/CMakeLists.txt @@ -1,122 +1,119 @@ cmake_minimum_required(VERSION 3.0) project(jamicallview) if(POLICY CMP0063) CMAKE_POLICY(SET CMP0063 NEW) endif(POLICY CMP0063) find_package(ECM 1.1.0 REQUIRED NO_MODULE) list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}") include(ECMInstallIcons) include(ECMOptionalAddSubdirectory) include(CMakePackageConfigHelpers) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) SET(CMAKE_C_VISIBILITY_PRESET hidden) SET(CMAKE_CXX_VISIBILITY_PRESET hidden) SET(CMAKE_VISIBILITY_INLINES_HIDDEN 1) # When used with `add_subdirectory`, assume it is a static Qt plugin get_directory_property(USES_ADD_SUBDIRECTORY PARENT_DIRECTORY) if(USES_ADD_SUBDIRECTORY) set(BUILD_SHARED_LIBS OFF) endif() set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 14) if(NOT BUILD_SHARED_LIBS) set(ENABLE_STATIC_PLUGIN 1) # Used in Config.cmake.in add_definitions(-DQT_PLUGIN) add_definitions(-DQT_STATICPLUGIN=1) add_definitions(-DJAMICALLVIEW_USE_STATIC_PLUGIN=1) endif() find_package(Qt5 CONFIG REQUIRED Core Gui Quick QuickControls2 ) set(GENERIC_LIB_VERSION "1.0.0") #File to compile set( jamicallview_LIB_SRCS - imageprovider.cpp -# videowidget.cpp - snapshotadapter.cpp callviewplugin.cpp ) qt5_add_resources(jamicallview_LIB_SRCS callview.qrc ) set(AUTOMOC_MOC_OPTIONS -Muri=org.kde.ringkde.jamicallview) add_library(jamicallview ${jamicallview_LIB_SRCS} ) target_link_libraries( jamicallview # Project ringqt ringqtquick # Qt Qt5::Core Qt5::Gui Qt5::Quick Qt5::QuickControls2 ) # Configure the target config set(jamicallview_CONFIG_PATH "${CMAKE_CURRENT_BINARY_DIR}/JamiCallViewConfig.cmake") if(USES_ADD_SUBDIRECTORY) set(JamiCallView_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) endif() configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/JamiCallViewConfig.cmake.in" ${jamicallview_CONFIG_PATH} INSTALL_DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/JamiCallView/ PATH_VARS INCLUDE_INSTALL_DIR ) install( FILES ${jamicallview_CONFIG_PATH} DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/JamiCallView/ COMPONENT Devel ) # Create the target target_include_directories(jamicallview PUBLIC $ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ ) set_target_properties(jamicallview PROPERTIES PUBLIC_HEADER "${jamicallview_EXPORT_HDRS}" ) export(TARGETS jamicallview FILE "${PROJECT_BINARY_DIR}/cmake/JamiCallViewTargets.cmake" ) install(TARGETS jamicallview EXPORT JamiCallViewTargets LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" COMPONENT jamicallview ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin COMPONENT Devel ) install(EXPORT JamiCallViewTargets DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/JamiCallView COMPONENT Devel ) diff --git a/src/callview/callview.qrc b/src/callview/callview.qrc index c05822b8..340b5bf7 100644 --- a/src/callview/callview.qrc +++ b/src/callview/callview.qrc @@ -1,16 +1,9 @@ qml/callview.qml - qml/videowidget.qml - qml/videocontroltoolbar.qml qml/callbackground.qml - qml/devicesetting.qml - qml/videosource.qml - qml/canvaspopup.qml - qml/screensharing.qml - qml/streaming.qml qml/cmselector.qml qml/troubleshoot.qml qml/recordingicon.qml diff --git a/src/callview/callviewplugin.cpp b/src/callview/callviewplugin.cpp index ecebee34..c65d2d82 100644 --- a/src/callview/callviewplugin.cpp +++ b/src/callview/callviewplugin.cpp @@ -1,62 +1,46 @@ /************************************************************************************ * Copyright (C) 2018 by BlueSystems GmbH * * Author : Emmanuel Lepage Vallee * * * * 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 * ***********************************************************************************/ #include "callviewplugin.h" // Qt #include #include #include // QRC #include -// CallView -#include "snapshotadapter.h" -#include "imageprovider.h" - void JamiCallViewPlugin::registerTypes(const char *uri) { Q_ASSERT(uri == QByteArray("org.kde.ringkde.jamicallview")); - qmlRegisterType(uri, 1, 0, "SnapshotAdapter"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/callview.qml"), uri, 1, 0, "CallView"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/videowidget.qml"), uri, 1, 0, "VideoWidget"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/videocontroltoolbar.qml"), uri, 1, 0, "VideoControlToolbar"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/callbackground.qml"), uri, 1, 0, "CallBackground"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/devicesetting.qml"), uri, 1, 0, "DeviceSetting"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/videosource.qml"), uri, 1, 0, "VideoSource"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/canvaspopup.qml"), uri, 1, 0, "CanvasPopup"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/screensharing.qml"), uri, 1, 0, "ScreenSharing"); - qmlRegisterType(QStringLiteral("qrc:/callview/qml/streaming.qml"), uri, 1, 0, "Streaming"); qmlRegisterType(QStringLiteral("qrc:/callview/qml/cmselector.qml"), uri, 1, 0, "CMSelector"); qmlRegisterType(QStringLiteral("qrc:/callview/qml/troubleshoot.qml"), uri, 1, 0, "Troubleshoot"); qmlRegisterType(QStringLiteral("qrc:/callview/qml/recordingicon.qml"), uri, 1, 0, "RecordingIcon"); + qmlRegisterType(QStringLiteral("qrc:/callview/qml/callbackground.qml"), uri, 1, 0, "CallBackground"); } void JamiCallViewPlugin::initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(engine) Q_UNUSED(uri) - - static ImageProvider p; - engine->addImageProvider( QStringLiteral("VideoFrame"), &p ); } diff --git a/src/callview/qml/callview.qml b/src/callview/qml/callview.qml index 5e03ddd8..af623cc6 100644 --- a/src/callview/qml/callview.qml +++ b/src/callview/qml/callview.qml @@ -1,283 +1,284 @@ /*************************************************************************** * Copyright (C) 2017 by Bluesystems * * Author : Emmanuel Lepage Vallee * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * **************************************************************************/ import QtQuick 2.7 import QtQuick.Layouts 1.0 -import net.lvindustries.ringqtquick 1.0 as RingQtQuick -import org.kde.ringkde.jamicallview 1.0 as JamiCallView -import org.kde.ringkde.jamidialview 1.0 as JamiDialView +import net.lvindustries.ringqtquick 1.0 as RingQtQuick +import org.kde.ringkde.jamicallview 1.0 as JamiCallView +import org.kde.ringkde.jamivideoview 1.0 as JamiVideoView +import org.kde.ringkde.jamidialview 1.0 as JamiDialView Item { id: videoDock signal callWithVideo () signal callWithAudio () signal callWithScreen() height: 480 width: 640 // C++ bindings property alias rendererName : videoWidget.rendererName property bool displayPreview : false property string mode : "PREVIEW" property bool previewRunning : false property alias peerRunning : videoWidget.started property QtObject call : null property QtObject renderer : call ? call.renderer : null property bool previewVisible: mode != "PREVIEW" && call && RingSession.previewManager.previewing Connections { target: renderer onDestroyed: { videoWidget.started = false } } // Let the animations finish before Timer { id: toolbarTimer running: false interval: 150 repeat: false onTriggered: { actionToolbar.visible = false videoSource.visible = false controlToolbar.visible = false } } function showToolbars() { actionToolbar.visible = true videoSource.visible = true // This toolbar is only useful when there is video if (videoWidget.started) controlToolbar.visible = true actionToolbar.opacity = 1 videoSource.opacity = 1 controlToolbar.opacity = 1 videoPreview.opacity = 0.8 actionToolbar.anchors.bottomMargin = 0 videoSource.anchors.rightMargin = 0 controlToolbar.anchors.topMargin = 0 } function hideToolbars() { actionToolbar.opacity = 0 videoSource.opacity = 0 controlToolbar.opacity = 0 videoPreview.opacity = 1 videoSource.anchors.rightMargin = -20 actionToolbar.anchors.bottomMargin = -20 controlToolbar.anchors.topMargin = -20 toolbarTimer.running = true } - JamiCallView.VideoWidget { + JamiVideoView.VideoWidget { id: videoWidget anchors.fill: parent z: -100 started: false visible: started && !hasFailed call: videoDock.call } - JamiCallView.VideoWidget { + JamiVideoView.VideoWidget { id: videoPreview z: -95 started: false visible: previewVisible anchors.right: parent.right anchors.bottom: parent.bottom width: 192 height: 108 } - JamiCallView.VideoControlToolbar { + JamiVideoView.VideoControlToolbar { id: controlToolbar anchors.top: parent.top visible: false Behavior on opacity { NumberAnimation {duration: 100} } Behavior on anchors.topMargin { NumberAnimation {duration: 150} } } JamiDialView.ActionToolbar { id: actionToolbar anchors.bottom: parent.bottom visible: false Behavior on opacity { NumberAnimation {duration: 100} } Behavior on anchors.bottomMargin { NumberAnimation {duration: 150} } } JamiCallView.RecordingIcon { anchors.right: videoDock.right anchors.top: controlToolbar.bottom } - JamiCallView.DeviceSetting { + JamiVideoView.DeviceSetting { id: deviceSettings visible: mode == "PREVIEW" width: parent.width z: 100 Rectangle { anchors.fill: parent color: "black" opacity: 0.5 z: -1 } } - JamiCallView.VideoSource { + JamiVideoView.VideoSource { id: videoSource z: 101 visible: false anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter Behavior on opacity { NumberAnimation {duration: 100} } Behavior on anchors.rightMargin { NumberAnimation {duration: 150} } } // The background JamiCallView.CallBackground { id: placeholderMessage z: -99 anchors.fill: parent bottomMargin: actionToolbar.visible ? actionToolbar.height : 0 } // Hide both toolbars when the mouse isn't moving //TODO keep visible if the mouse if over the toolbars MouseArea { id: mainMouseArea Timer { id: activityTimer interval: 3000 running: true repeat: false onTriggered: { hideToolbars() } } function trackActivity() { if (mode == "PREVIEW") { deviceSettings.visible = true } else if (call) { showToolbars() } activityTimer.restart() } anchors.fill: parent hoverEnabled: true propagateComposedEvents: true onMouseXChanged: trackActivity() onMouseYChanged: trackActivity() } onModeChanged: { if (mode == "PREVIEW") { hideToolbars() videoWidget.rendererName = "preview" } else if (mode == "CONVERSATION") { videoPreview.started = RingSession.previewManager.previewing videoWidget.rendererName = "peer" } placeholderMessage.mode = mode } onCallChanged: { if (call) { actionToolbar.userActionModel = call.userActionModel placeholderMessage.call = call videoSource.call = call controlToolbar.call = call } videoWidget.hasFailed = false mainMouseArea.visible = call != null || mode == "PREVIEW" } Connections { target: RingSession.previewManager onPreviewingChanged: { if (mode == "PREVIEW") videoWidget.started = RingSession.previewManager.previewing videoPreview.started = RingSession.previewManager.previewing } } Connections { target: call } Connections { target: call onVideoStarted: { videoWidget.started = true } onVideoStopped: { videoWidget.started = false } onLiveMediaIssuesChanaged: { // This isn't using properties because the renderer live in their // own thread and QML doesn't support this yet videoWidget.hasFailed = call.hasIssue(RingQtQuick.Call.VIDEO_ACQUISITION_FAILED) } } Connections { target: videoWidget onStartedChanged: { placeholderMessage.visible = (!videoWidget.started) || (videoWidget.hasFailed) } onHasFailedChanged: { placeholderMessage.visible = (!videoWidget.started) || (videoWidget.hasFailed) } } Connections { target: call onStateChanged: { if (call == null || call.lifeCycleState == RingQtQuick.Call.FINISHED) { call = null hideToolbars() } } } } diff --git a/src/jamikdeintegration/src/pixmapinterface.cpp b/src/jamikdeintegration/src/pixmapinterface.cpp index 624df128..49b7dfc5 100644 --- a/src/jamikdeintegration/src/pixmapinterface.cpp +++ b/src/jamikdeintegration/src/pixmapinterface.cpp @@ -1,452 +1,452 @@ /**************************************************************************** * Copyright (C) 2013-2014 by Savoir-Faire Linux * * Author : Emmanuel Lepage Vallee * * * * 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 General Public License * * along with this program. If not, see . * ***************************************************************************/ #include "pixmapinterface.h" //Qt #include #include #include #include #include #include #include #include #include //KDE #include #include //Ring #include #include #include #include #include #include #include #include