From 9ab931da4d9edb7ac9d9b32fef987d68c79b665e Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 20 Apr 2022 17:17:27 +0200 Subject: [PATCH] Backup --- .../assistant/create-app-sip-account.rc | 1 + .../assets/assistant/use-app-sip-account.rc | 1 + .../images/conference_layout_grid_custom.svg | 307 +++++++ linphone-app/resources.qrc | 8 +- .../src/components/calls/CallsListModel.cpp | 18 +- .../src/components/calls/CallsListModel.hpp | 5 +- linphone-app/src/components/camera/Camera.cpp | 33 + linphone-app/src/components/camera/Camera.hpp | 71 +- .../conference/ConferenceListener.cpp | 35 +- .../conference/ConferenceListener.hpp | 2 + .../components/conference/ConferenceModel.cpp | 19 +- .../components/conference/ConferenceModel.hpp | 2 + .../src/components/core/CoreManager.cpp | 4 + .../ParticipantDeviceListModel.cpp | 39 +- .../ParticipantDeviceListModel.hpp | 1 + .../participant/ParticipantDeviceModel.cpp | 41 +- .../participant/ParticipantDeviceModel.hpp | 8 +- linphone-app/src/utils/Constants.hpp | 3 +- .../ui/modules/Common/Form/Mosaic.qml | 49 +- .../Linphone}/Calls/IncallAvatar.qml | 0 .../ui/modules/Linphone/Camera/CameraItem.qml | 139 +++ .../ui/modules/Linphone/Camera/CameraView.qml | 59 ++ .../Linphone/Chat/ChatCalendarMessage.qml | 2 +- .../modules/Linphone/Codecs/CodecsViewer.qml | 6 +- .../Styles/Camera/CameraViewStyle.qml | 36 + .../ui/modules/Linphone/Styles/qmldir | 2 + linphone-app/ui/modules/Linphone/qmldir | 4 + linphone-app/ui/scripts/Utils/utils.js | 8 + .../ui/views/App/Calls/CallsWindow.js | 22 +- .../ui/views/App/Calls/CallsWindow.qml | 21 +- linphone-app/ui/views/App/Calls/EndedCall.qml | 3 +- linphone-app/ui/views/App/Calls/Incall.js | 6 - linphone-app/ui/views/App/Calls/Incall.qml | 3 +- .../ui/views/App/Calls/VideoConference.qml | 854 ++++++++---------- .../ui/views/App/Calls/WaitingRoom.qml | 196 ++++ .../ui/views/App/Main/Dialogs/NewChatRoom.qml | 16 +- .../Settings/Dialogs/SettingsVideoPreview.qml | 37 +- .../App/Styles/Calls/VideoConferenceStyle.qml | 6 +- .../App/Styles/Calls/WaitingRoomStyle.qml | 472 ++++++++++ linphone-app/ui/views/App/Styles/qmldir | 1 + linphone-sdk | 2 +- 41 files changed, 1913 insertions(+), 629 deletions(-) create mode 100644 linphone-app/assets/images/conference_layout_grid_custom.svg rename linphone-app/ui/{views/App => modules/Linphone}/Calls/IncallAvatar.qml (100%) create mode 100644 linphone-app/ui/modules/Linphone/Camera/CameraItem.qml create mode 100644 linphone-app/ui/modules/Linphone/Camera/CameraView.qml create mode 100644 linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml create mode 100644 linphone-app/ui/views/App/Calls/WaitingRoom.qml create mode 100644 linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml diff --git a/linphone-app/assets/assistant/create-app-sip-account.rc b/linphone-app/assets/assistant/create-app-sip-account.rc index a97f878b2..6faef5be2 100644 --- a/linphone-app/assets/assistant/create-app-sip-account.rc +++ b/linphone-app/assets/assistant/create-app-sip-account.rc @@ -19,6 +19,7 @@ message-expires=604800 sip:conference-factory@sip.linphone.org 1 + 1
stun.linphone.org diff --git a/linphone-app/assets/assistant/use-app-sip-account.rc b/linphone-app/assets/assistant/use-app-sip-account.rc index faebe3684..55fc8d60b 100644 --- a/linphone-app/assets/assistant/use-app-sip-account.rc +++ b/linphone-app/assets/assistant/use-app-sip-account.rc @@ -19,6 +19,7 @@ message-expires=604800 sip:conference-factory@sip.linphone.org 1 + 1
stun.linphone.org diff --git a/linphone-app/assets/images/conference_layout_grid_custom.svg b/linphone-app/assets/images/conference_layout_grid_custom.svg new file mode 100644 index 000000000..1b03172e4 --- /dev/null +++ b/linphone-app/assets/images/conference_layout_grid_custom.svg @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc index 6fab7e243..ceb60e381 100644 --- a/linphone-app/resources.qrc +++ b/linphone-app/resources.qrc @@ -53,6 +53,7 @@ assets/images/close_custom.svg assets/images/collapsed_custom.svg assets/images/conference_custom.svg + assets/images/conference_layout_grid_custom.svg assets/images/contact_add_custom.svg assets/images/contact_card_photo_custom.svg assets/images/contact_custom.svg @@ -287,6 +288,9 @@ ui/modules/Linphone/Calls/Calls.qml ui/modules/Linphone/Calls/CallStatistics.qml ui/modules/Linphone/Calls/ConferenceControls.qml + ui/modules/Linphone/Calls/IncallAvatar.qml + ui/modules/Linphone/Camera/CameraItem.qml + ui/modules/Linphone/Camera/CameraView.qml ui/modules/Linphone/Chat/Chat.js ui/modules/Linphone/Chat/Chat.qml ui/modules/Linphone/Chat/ChatContent.qml @@ -341,6 +345,7 @@ ui/modules/Linphone/Styles/Calls/CallsStyle.qml ui/modules/Linphone/Styles/Calls/CallStatisticsStyle.qml ui/modules/Linphone/Styles/Calls/ConferenceControlsStyle.qml + ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml ui/modules/Linphone/Styles/Chat/ChatStyle.qml ui/modules/Linphone/Styles/Chat/ChatAudioMessageStyle.qml ui/modules/Linphone/Styles/Chat/ChatAudioPreviewStyle.qml @@ -391,12 +396,12 @@ ui/views/App/Calls/Dialogs/ConferenceManager.qml ui/views/App/Calls/Dialogs/MultimediaParameters.qml ui/views/App/Calls/EndedCall.qml - ui/views/App/Calls/IncallAvatar.qml ui/views/App/Calls/IncallFullscreenWindow.qml ui/views/App/Calls/Incall.js ui/views/App/Calls/Incall.qml ui/views/App/Calls/IncomingCall.qml ui/views/App/Calls/OutgoingCall.qml + ui/views/App/Calls/WaitingRoom.qml ui/views/App/Calls/ZrtpTokenAuthentication.qml ui/views/App/Main/Assistant/ActivateAppSipAccountWithEmail.qml ui/views/App/Main/Assistant/ActivateAppSipAccountWithPhoneNumber.qml @@ -459,6 +464,7 @@ ui/views/App/Styles/Calls/CallsWindowStyle.qml ui/views/App/Styles/Calls/ConferenceStyle.qml ui/views/App/Styles/Calls/VideoConferenceStyle.qml + ui/views/App/Styles/Calls/WaitingRoomStyle.qml ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index 691e7db5e..af5c853a1 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -168,7 +168,7 @@ void CallsListModel::launchSecureAudioCall (const QString &sipAddress, LinphoneE CallModel::prepareTransfert(core->inviteAddressWithParams(address, params), prepareTransfertAddress); } -void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress, const bool& autoSelectAfterCreation) const { +void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress, const bool& autoSelectAfterCreation, QVariantMap options) const { CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = autoSelectAfterCreation; shared_ptr core = CoreManager::getInstance()->getCore(); if (!core->videoSupported()) { @@ -182,9 +182,14 @@ void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& return; shared_ptr params = core->createCallParams(nullptr); - params->enableVideo(true); - params->setVideoDirection(linphone::MediaDirection::SendRecv); - params->setConferenceVideoLayout(linphone::ConferenceLayout::Grid); + bool enableVideo = options.contains("video") ? options["video"].toBool() : true; + params->enableVideo(enableVideo); + if( enableVideo ){ + params->setVideoDirection(linphone::MediaDirection::SendRecv); + params->setConferenceVideoLayout(linphone::ConferenceLayout::Grid); + } + params->enableMic(options.contains("micro") ? options["micro"].toBool() : true); + params->enableAudio(options.contains("audio") ? options["audio"].toBool() : true); // ??? params->setAccount(core->getDefaultAccount()); CallModel::setRecordFile(params, Utils::coreStringToAppString(address->getUsername())); CallModel::prepareTransfert(core->inviteAddressWithParams(address, params), prepareTransfertAddress); @@ -373,6 +378,11 @@ QVariantMap CallsListModel::createConference(ConferenceInfoModel * conferenceInf return result; } +void CallsListModel::prepareConferenceCall(ConferenceInfoModel * model){ + auto app = App::getInstance(); + app->smartShowWindow(app->getCallsWindow()); + emit callConferenceAsked(model); +} // ----------------------------------------------------------------------------- diff --git a/linphone-app/src/components/calls/CallsListModel.hpp b/linphone-app/src/components/calls/CallsListModel.hpp index 78406bc07..1b5c91f92 100644 --- a/linphone-app/src/components/calls/CallsListModel.hpp +++ b/linphone-app/src/components/calls/CallsListModel.hpp @@ -46,7 +46,7 @@ public: Q_INVOKABLE void launchAudioCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const QHash &headers = {}) const; Q_INVOKABLE void launchSecureAudioCall (const QString &sipAddress, LinphoneEnums::MediaEncryption encryption, const QHash &headers = {}, const QString& prepareTransfertAddress = "") const; - Q_INVOKABLE void launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const bool& autoSelectAfterCreation = true) const; + Q_INVOKABLE void launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const bool& autoSelectAfterCreation = true, QVariantMap options = QVariantMap()) const; Q_INVOKABLE ChatRoomModel* launchSecureChat (const QString &sipAddress) const; Q_INVOKABLE QVariantMap launchChat(const QString &sipAddress, const int& securityLevel) const; Q_INVOKABLE ChatRoomModel* createChat (const QString &participantAddress) const; @@ -57,6 +57,7 @@ public: Q_INVOKABLE QVariantMap createChatRoom(const QString& subject, const int& securityLevel, const QVariantList& participants, const bool& selectAfterCreation) const; //Q_INVOKABLE QVariantMap createConference(const QString& subject, const int& securityLevel, const QVariantList& participants, const int& inviteMode, const bool& selectAfterCreation); Q_INVOKABLE QVariantMap createConference(ConferenceInfoModel * conferenceInfo, const int& securityLevel, const int& inviteMode, const bool& selectAfterCreation); + Q_INVOKABLE void prepareConferenceCall(ConferenceInfoModel * model); Q_INVOKABLE int getRunningCallsNumber () const; @@ -70,9 +71,11 @@ signals: void callRunning (int index, CallModel *callModel); void callTransferAsked (CallModel *callModel); void callAttendedTransferAsked (CallModel *callModel); + void callConferenceAsked(ConferenceInfoModel * conferenceInfoModel); void callMissed (CallModel *callModel); + private: void handleCallStateChanged (const std::shared_ptr &call, linphone::Call::State state); diff --git a/linphone-app/src/components/camera/Camera.cpp b/linphone-app/src/components/camera/Camera.cpp index 56cf28337..440ef7f90 100644 --- a/linphone-app/src/components/camera/Camera.cpp +++ b/linphone-app/src/components/camera/Camera.cpp @@ -38,8 +38,12 @@ namespace { constexpr int MaxFps = 30; } +QMutex Camera::mPreviewCounterMutex; +int Camera::mPreviewCounter; + // ============================================================================= Camera::Camera (QQuickItem *parent) : QQuickFramebufferObject(parent) { + // The fbo content must be y-mirrored because the ms rendering is y-inverted. setMirrorVertically(true); @@ -55,11 +59,18 @@ Camera::Camera (QQuickItem *parent) : QQuickFramebufferObject(parent) { mRefreshTimer->start(); } +Camera::~Camera(){ + if(mIsPreview) + deactivatePreview(); +} + void Camera::resetWindowId() { if(mIsPreview) CoreManager::getInstance()->getCore()->setNativePreviewWindowId(NULL); else if( mCallModel && mCallModel->getCall()) mCallModel->getCall()->setNativeVideoWindowId(NULL); + else if(mParticipantDeviceModel) + mParticipantDeviceModel->getDevice()->setNativeVideoWindowId(NULL); else CoreManager::getInstance()->getCore()->setNativeVideoWindowId(NULL); } @@ -143,6 +154,10 @@ void Camera::setCallModel (CallModel *callModel) { void Camera::setIsPreview (bool status) { if (mIsPreview != status) { mIsPreview = status; + if(mIsPreview) + activatePreview(); + else + deactivatePreview(); update(); emit isPreviewChanged(status); @@ -155,4 +170,22 @@ if (mParticipantDeviceModel != participantDeviceModel) { update(); emit participantDeviceModelChanged(mParticipantDeviceModel); } +} + +void Camera::activatePreview(){ + mPreviewCounterMutex.lock(); + if (++mPreviewCounter == 1) + CoreManager::getInstance()->getCore()->enableVideoPreview(true); + mPreviewCounterMutex.unlock(); +} + +void Camera::deactivatePreview(){ + auto core = CoreManager::getInstance()->getCore(); + if(core){ + mPreviewCounterMutex.lock(); + if (--mPreviewCounter == 0) + core->enableVideoPreview(false); + mPreviewCounterMutex.unlock(); + core->setNativePreviewWindowId(NULL); + } } \ No newline at end of file diff --git a/linphone-app/src/components/camera/Camera.hpp b/linphone-app/src/components/camera/Camera.hpp index a2fab4825..6e9908442 100644 --- a/linphone-app/src/components/camera/Camera.hpp +++ b/linphone-app/src/components/camera/Camera.hpp @@ -25,11 +25,12 @@ #include #include +#include // ============================================================================= namespace linphone { - class Call; + class Call; } class CallModel; @@ -37,40 +38,46 @@ class ParticipantDeviceModel; // ----------------------------------------------------------------------------- class Camera : public QQuickFramebufferObject { - - Q_OBJECT; - - Q_PROPERTY(CallModel * call READ getCallModel WRITE setCallModel NOTIFY callChanged); - Q_PROPERTY(ParticipantDeviceModel * participantDeviceModel READ getParticipantDeviceModel WRITE setParticipantDeviceModel NOTIFY participantDeviceModelChanged) - Q_PROPERTY(bool isPreview READ getIsPreview WRITE setIsPreview NOTIFY isPreviewChanged); - + Q_OBJECT + + Q_PROPERTY(CallModel * call READ getCallModel WRITE setCallModel NOTIFY callChanged); + Q_PROPERTY(ParticipantDeviceModel * participantDeviceModel READ getParticipantDeviceModel WRITE setParticipantDeviceModel NOTIFY participantDeviceModelChanged) + Q_PROPERTY(bool isPreview READ getIsPreview WRITE setIsPreview NOTIFY isPreviewChanged); + public: - Camera (QQuickItem *parent = Q_NULLPTR); - - QQuickFramebufferObject::Renderer *createRenderer () const override; - - Q_INVOKABLE void resetWindowId(); - + Camera (QQuickItem *parent = Q_NULLPTR); + virtual ~Camera(); + + QQuickFramebufferObject::Renderer *createRenderer () const override; + + Q_INVOKABLE void resetWindowId(); + + static QMutex mPreviewCounterMutex; + static int mPreviewCounter; + signals: - void callChanged (CallModel *callModel); - void isPreviewChanged (bool isPreview); - void participantDeviceModelChanged(ParticipantDeviceModel *participantDeviceModel); - void requestNewRenderer(); - + void callChanged (CallModel *callModel); + void isPreviewChanged (bool isPreview); + void participantDeviceModelChanged(ParticipantDeviceModel *participantDeviceModel); + void requestNewRenderer(); + private: - CallModel *getCallModel () const; - bool getIsPreview () const; - ParticipantDeviceModel * getParticipantDeviceModel() const; - - void setCallModel (CallModel *callModel); - void setIsPreview (bool status); - void setParticipantDeviceModel(ParticipantDeviceModel * participantDeviceModel); - - bool mIsPreview = false; - CallModel *mCallModel = nullptr; - ParticipantDeviceModel *mParticipantDeviceModel = nullptr; - - QTimer *mRefreshTimer = nullptr; + CallModel *getCallModel () const; + bool getIsPreview () const; + ParticipantDeviceModel * getParticipantDeviceModel() const; + + void setCallModel (CallModel *callModel); + void setIsPreview (bool status); + void setParticipantDeviceModel(ParticipantDeviceModel * participantDeviceModel); + + void activatePreview(); + void deactivatePreview(); + + bool mIsPreview = false; + CallModel *mCallModel = nullptr; + ParticipantDeviceModel *mParticipantDeviceModel = nullptr; + + QTimer *mRefreshTimer = nullptr; }; #endif // CAMERA_H_ diff --git a/linphone-app/src/components/conference/ConferenceListener.cpp b/linphone-app/src/components/conference/ConferenceListener.cpp index cbe88e091..a02488686 100644 --- a/linphone-app/src/components/conference/ConferenceListener.cpp +++ b/linphone-app/src/components/conference/ConferenceListener.cpp @@ -42,51 +42,54 @@ ConferenceListener::~ConferenceListener(){ // LINPHONE LISTENERS //----------------------------------------------------------------------------------------------------------------------- void ConferenceListener::onParticipantAdded(const std::shared_ptr & conference, const std::shared_ptr & participant){ - qWarning() << "onParticipantAdded"; + qDebug() << "onParticipantAdded"; emit participantAdded(participant); } void ConferenceListener::onParticipantRemoved(const std::shared_ptr & conference, const std::shared_ptr & participant){ - qWarning() << "onParticipantRemoved"; + qDebug() << "onParticipantRemoved"; emit participantRemoved(participant); } void ConferenceListener::onParticipantDeviceAdded(const std::shared_ptr & conference, const std::shared_ptr & participantDevice){ - qWarning() << "onParticipantDeviceAdded"; - qWarning() << "Me devices : " << conference->getMe()->getDevices().size(); + qDebug() << "onParticipantDeviceAdded"; + qDebug() << "Me devices : " << conference->getMe()->getDevices().size(); emit participantDeviceAdded(participantDevice); } void ConferenceListener::onParticipantDeviceRemoved(const std::shared_ptr & conference, const std::shared_ptr & participantDevice){ - qWarning() << "onParticipantDeviceRemoved"; - qWarning() << "Me devices : " << conference->getMe()->getDevices().size(); + qDebug() << "onParticipantDeviceRemoved"; + qDebug() << "Me devices : " << conference->getMe()->getDevices().size(); emit participantDeviceRemoved(participantDevice); } void ConferenceListener::onParticipantAdminStatusChanged(const std::shared_ptr & conference, const std::shared_ptr & participant){ - qWarning() << "onParticipantAdminStatusChanged"; + qDebug() << "onParticipantAdminStatusChanged"; } void ConferenceListener::onParticipantDeviceLeft(const std::shared_ptr & conference, const std::shared_ptr & participantDevice){ - qWarning() << "onParticipantDeviceLeft"; - qWarning() << "Me devices : " << conference->getMe()->getDevices().size(); + qDebug() << "onParticipantDeviceLeft"; + qDebug() << "Me devices : " << conference->getMe()->getDevices().size(); emit participantDeviceLeft(participantDevice); } void ConferenceListener::onParticipantDeviceJoined(const std::shared_ptr & conference, const std::shared_ptr & participantDevice){ - qWarning() << "onParticipantDeviceJoined"; - qWarning() << "Me devices : " << conference->getMe()->getDevices().size(); + qDebug() << "onParticipantDeviceJoined"; + qDebug() << "Me devices : " << conference->getMe()->getDevices().size(); emit participantDeviceJoined(participantDevice); } +void ConferenceListener::onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & conference, const std::shared_ptr & participantDevice){ + qDebug() << "onParticipantDeviceMediaCapabilityChanged: " << (int)participantDevice->getStreamCapability(linphone::StreamType::Video) << ". Device: " << participantDevice->getAddress()->asString().c_str(); + emit participantDeviceMediaCapabilityChanged(participantDevice); +} void ConferenceListener::onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & conference, const std::shared_ptr & participantDevice){ - qWarning() << "onParticipantDeviceMediaAvailabilityChanged"; - qWarning() << "ConferenceListener::onParticipantDeviceMediaAvailabilityChanged: " << (int)participantDevice->getStreamAvailability(linphone::StreamType::Video) << ". Me devices : " << conference->getMe()->getDevices().size(); + qDebug() << "onParticipantDeviceMediaAvailabilityChanged: " << (int)participantDevice->getStreamAvailability(linphone::StreamType::Video) << ". Device: " << participantDevice->getAddress()->asString().c_str(); emit participantDeviceMediaAvailabilityChanged(participantDevice); } void ConferenceListener::onStateChanged(const std::shared_ptr & conference, linphone::Conference::State newState){ - qWarning() << "onStateChanged"; + qDebug() << "onStateChanged"; emit conferenceStateChanged(newState); } void ConferenceListener::onSubjectChanged(const std::shared_ptr & conference, const std::string & subject){ - qWarning() << "onSubjectChanged"; + qDebug() << "onSubjectChanged"; emit subjectChanged(subject); } void ConferenceListener::onAudioDeviceChanged(const std::shared_ptr & conference, const std::shared_ptr & audioDevice){ - qWarning() << "onAudioDeviceChanged is not yet implemented."; + qDebug() << "onAudioDeviceChanged is not yet implemented."; } diff --git a/linphone-app/src/components/conference/ConferenceListener.hpp b/linphone-app/src/components/conference/ConferenceListener.hpp index 7a274d952..1ce633f47 100644 --- a/linphone-app/src/components/conference/ConferenceListener.hpp +++ b/linphone-app/src/components/conference/ConferenceListener.hpp @@ -42,6 +42,7 @@ public: virtual void onParticipantAdminStatusChanged(const std::shared_ptr & conference, const std::shared_ptr & participant) override; virtual void onParticipantDeviceLeft(const std::shared_ptr & conference, const std::shared_ptr & device) override; virtual void onParticipantDeviceJoined(const std::shared_ptr & conference, const std::shared_ptr & device) override; + virtual void onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & conference, const std::shared_ptr & device) override; virtual void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & conference, const std::shared_ptr & device) override; virtual void onStateChanged(const std::shared_ptr & conference, linphone::Conference::State newState) override; virtual void onSubjectChanged(const std::shared_ptr & conference, const std::string & subject) override; @@ -55,6 +56,7 @@ signals: void participantDeviceRemoved(const std::shared_ptr & participantDevice); void participantDeviceLeft(const std::shared_ptr & participantDevice); void participantDeviceJoined(const std::shared_ptr & participantDevice); + void participantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice); void participantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice); void conferenceStateChanged(linphone::Conference::State newState); void subjectChanged(const std::string & subject); diff --git a/linphone-app/src/components/conference/ConferenceModel.cpp b/linphone-app/src/components/conference/ConferenceModel.cpp index ec5488c82..0f7f932ed 100644 --- a/linphone-app/src/components/conference/ConferenceModel.cpp +++ b/linphone-app/src/components/conference/ConferenceModel.cpp @@ -43,6 +43,7 @@ void ConferenceModel::connectTo(ConferenceListener * listener){ connect(listener, &ConferenceListener::participantDeviceRemoved, this, &ConferenceModel::onParticipantDeviceRemoved); connect(listener, &ConferenceListener::participantDeviceLeft, this, &ConferenceModel::onParticipantDeviceLeft); connect(listener, &ConferenceListener::participantDeviceJoined, this, &ConferenceModel::onParticipantDeviceJoined); + connect(listener, &ConferenceListener::participantDeviceMediaCapabilityChanged, this, &ConferenceModel::onParticipantDeviceMediaCapabilityChanged); connect(listener, &ConferenceListener::participantDeviceMediaAvailabilityChanged, this, &ConferenceModel::onParticipantDeviceMediaAvailabilityChanged); connect(listener, &ConferenceListener::conferenceStateChanged, this, &ConferenceModel::onConferenceStateChanged); connect(listener, &ConferenceListener::subjectChanged, this, &ConferenceModel::onSubjectChanged); @@ -86,31 +87,35 @@ qint64 ConferenceModel::getElapsedSeconds() const { // LINPHONE LISTENERS //----------------------------------------------------------------------------------------------------------------------- void ConferenceModel::onParticipantAdded(const std::shared_ptr & participant){ - qWarning() << "Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); emit participantAdded(participant); } void ConferenceModel::onParticipantRemoved(const std::shared_ptr & participant){ - qWarning() << "Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); emit participantRemoved(participant); } void ConferenceModel::onParticipantDeviceAdded(const std::shared_ptr & participantDevice){ - qWarning() << "Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); emit participantDeviceAdded(participantDevice); } void ConferenceModel::onParticipantDeviceRemoved(const std::shared_ptr & participantDevice){ - qWarning() << "Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); emit participantDeviceRemoved(participantDevice); } void ConferenceModel::onParticipantDeviceLeft(const std::shared_ptr & participantDevice){ - qWarning() << "Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); emit participantDeviceLeft(participantDevice); } void ConferenceModel::onParticipantDeviceJoined(const std::shared_ptr & participantDevice){ - qWarning() << "Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "Me devices : " << mConference->getMe()->getDevices().size(); emit participantDeviceJoined(participantDevice); } +void ConferenceModel::onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice){ + qDebug() << "ConferenceModel::onParticipantDeviceMediaCapabilityChanged: " << (int)participantDevice->getStreamCapability(linphone::StreamType::Video) << ". Me devices : " << mConference->getMe()->getDevices().size(); + emit participantDeviceMediaCapabilityChanged(participantDevice); +} void ConferenceModel::onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice){ - qWarning() << "ConferenceModel::onParticipantDeviceMediaAvailabilityChanged: " << (int)participantDevice->getStreamAvailability(linphone::StreamType::Video) << ". Me devices : " << mConference->getMe()->getDevices().size(); + qDebug() << "ConferenceModel::onParticipantDeviceMediaAvailabilityChanged: " << (int)participantDevice->getStreamAvailability(linphone::StreamType::Video) << ". Me devices : " << mConference->getMe()->getDevices().size(); emit participantDeviceMediaAvailabilityChanged(participantDevice); } void ConferenceModel::onConferenceStateChanged(linphone::Conference::State newState){ diff --git a/linphone-app/src/components/conference/ConferenceModel.hpp b/linphone-app/src/components/conference/ConferenceModel.hpp index 49d1a716f..85c9a462c 100644 --- a/linphone-app/src/components/conference/ConferenceModel.hpp +++ b/linphone-app/src/components/conference/ConferenceModel.hpp @@ -53,6 +53,7 @@ public: virtual void onParticipantDeviceRemoved(const std::shared_ptr & participantDevice); virtual void onParticipantDeviceLeft(const std::shared_ptr & device); virtual void onParticipantDeviceJoined(const std::shared_ptr & device); + virtual void onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & device); virtual void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & device); virtual void onConferenceStateChanged(linphone::Conference::State newState); virtual void onSubjectChanged(const std::string& subject); @@ -65,6 +66,7 @@ signals: void participantDeviceRemoved(const std::shared_ptr & participantDevice); void participantDeviceLeft(const std::shared_ptr & participantDevice); void participantDeviceJoined(const std::shared_ptr & participantDevice); + void participantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice); void participantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice); void conferenceStateChanged(linphone::Conference::State newState); void subjectChanged(); diff --git a/linphone-app/src/components/core/CoreManager.cpp b/linphone-app/src/components/core/CoreManager.cpp index abdf97df7..e636c755c 100644 --- a/linphone-app/src/components/core/CoreManager.cpp +++ b/linphone-app/src/components/core/CoreManager.cpp @@ -331,6 +331,10 @@ void CoreManager::migrate () { newParams->enableCpimInBasicChatRoom(true); qInfo() << "Migrating " << accountIdentity << " for version 3. enable Cpim in basic chat rooms"; } + if( rcVersion < 4){ + newParams->enableRtpBundle(true); + qInfo() << "Migrating " << accountIdentity << " for version 4. enable RTP bundle mode"; + } account->setParams(newParams); } } diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp index 903358cae..ec0da514d 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp @@ -34,8 +34,9 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (std::shared_ptr> devices = participant->getDevices() ; //auto previewModel = ParticipantDeviceModel::create(nullptr, true); //mList << previewModel; + mCallModel = nullptr; for(auto device : devices){ - auto deviceModel = ParticipantDeviceModel::create(device, isMe(device)); + auto deviceModel = ParticipantDeviceModel::create(mCallModel, device, isMe(device)); connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged); mList << deviceModel; } @@ -49,7 +50,7 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (CallModel * callModel, Q //mList << previewModel; std::list> devices = conferenceModel->getConference()->getParticipantDeviceList(); for(auto device : devices){ - auto deviceModel = ParticipantDeviceModel::create(device, isMe(device)); + auto deviceModel = ParticipantDeviceModel::create(mCallModel, device, isMe(device)); connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged); mList << deviceModel; } @@ -70,6 +71,7 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (CallModel * callModel, Q connect(conferenceModel.get(), &ConferenceModel::participantDeviceJoined, this, &ParticipantDeviceListModel::onParticipantDeviceJoined); connect(conferenceModel.get(), &ConferenceModel::participantDeviceLeft, this, &ParticipantDeviceListModel::onParticipantDeviceLeft); connect(conferenceModel.get(), &ConferenceModel::conferenceStateChanged, this, &ParticipantDeviceListModel::onConferenceStateChanged); + connect(conferenceModel.get(), &ConferenceModel::participantDeviceMediaCapabilityChanged, this, &ParticipantDeviceListModel::onParticipantDeviceMediaCapabilityChanged); connect(conferenceModel.get(), &ConferenceModel::participantDeviceMediaAvailabilityChanged, this, &ParticipantDeviceListModel::onParticipantDeviceMediaAvailabilityChanged); } } @@ -82,7 +84,7 @@ void ParticipantDeviceListModel::updateDevices(std::shared_ptr(deviceModel); qWarning() << "Device added. Count=" << mList.count(); @@ -189,12 +191,14 @@ void ParticipantDeviceListModel::onSecurityLevelChanged(std::shared_ptr & participant){ +void ParticipantDeviceListModel::onParticipantAdded(const std::shared_ptr & participant){ std::list> devices = participant->getDevices() ; - for(auto device : devices) - add(device); + if(devices.size() == 0) + qWarning() << "Participant has no device. It will not be added : " << participant->getAddress()->asString().c_str(); + else + for(auto device : devices) + add(device); } void ParticipantDeviceListModel::onParticipantRemoved(const std::shared_ptr & participant){ @@ -275,8 +279,25 @@ void ParticipantDeviceListModel::onConferenceStateChanged(linphone::Conference:: } } -void ParticipantDeviceListModel::onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice){ +void ParticipantDeviceListModel::onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice){ auto device = get(participantDevice); if(device) emit device->videoEnabledChanged(); + else + onParticipantDeviceAdded(participantDevice); + device = get(participantDevice); + if( device && device->isMe()){ // Capability change for me. Update all videos. + for(auto item : mList) { + auto device = item.objectCast(); + device->updateVideoEnabled(); + } + } +} + +void ParticipantDeviceListModel::onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice){ + auto device = get(participantDevice); + if(device) + device->updateVideoEnabled(); + else + onParticipantDeviceAdded(participantDevice); } \ No newline at end of file diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp index 595c71099..ff28f52e5 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp @@ -58,6 +58,7 @@ public slots: void onParticipantDeviceJoined(const std::shared_ptr & participantDevice); void onParticipantDeviceLeft(const std::shared_ptr & participantDevice); void onConferenceStateChanged(linphone::Conference::State newState); + void onParticipantDeviceMediaCapabilityChanged(const std::shared_ptr & participantDevice); void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr & participantDevice); signals: diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp index 6fa5320b7..11ef378b9 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp @@ -37,14 +37,18 @@ void ParticipantDeviceModel::connectTo(ParticipantDeviceListener * listener){ // ============================================================================= -ParticipantDeviceModel::ParticipantDeviceModel (std::shared_ptr device, const bool& isMe, QObject *parent) : QObject(parent) { +ParticipantDeviceModel::ParticipantDeviceModel (CallModel * callModel, std::shared_ptr device, const bool& isMe, QObject *parent) : QObject(parent) { App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE mIsMe = isMe; mParticipantDevice = device; mParticipantDeviceListener = std::make_shared(nullptr); if( device) device->addListener(mParticipantDeviceListener); - mCall = nullptr; + mCall = callModel; + if(mCall) + connect(mCall, &CallModel::statusChanged, this, &ParticipantDeviceModel::onCallStatusChanged); + mIsVideoEnabled = false; + updateVideoEnabled(); } /* ParticipantDeviceModel::ParticipantDeviceModel (CallModel * call, const bool& isMe, QObject *parent) : QObject(parent) { @@ -60,8 +64,8 @@ ParticipantDeviceModel::~ParticipantDeviceModel(){ mParticipantDevice->removeListener(mParticipantDeviceListener); } -QSharedPointer ParticipantDeviceModel::create(std::shared_ptr device, const bool& isMe, QObject *parent){ - QSharedPointer model = QSharedPointer::create(device, isMe, parent); +QSharedPointer ParticipantDeviceModel::create(CallModel * callModel, std::shared_ptr device, const bool& isMe, QObject *parent){ + QSharedPointer model = QSharedPointer::create(callModel, device, isMe, parent); if(model){ model->mSelf = model; return model; @@ -110,9 +114,20 @@ std::shared_ptr ParticipantDeviceModel::getDevice( } bool ParticipantDeviceModel::isVideoEnabled() const{ - bool enabled = mParticipantDevice && mParticipantDevice->getStreamAvailability(linphone::StreamType::Video) || isMe();// && mCall && mCall->getVideoEnabled(); - qWarning() << "VideoEnabled: " << enabled; - return enabled; + return mIsVideoEnabled; +} + +void ParticipantDeviceModel::updateVideoEnabled(){ + bool enabled = mParticipantDevice && mParticipantDevice->getStreamAvailability(linphone::StreamType::Video) && + ( mParticipantDevice->getStreamCapability(linphone::StreamType::Video) == linphone::MediaDirection::SendRecv + || mParticipantDevice->getStreamCapability(linphone::StreamType::Video) == linphone::MediaDirection::SendOnly + ) + || isMe(); + if( mIsVideoEnabled != enabled && mCall && mCall->getCall()->getState() == linphone::Call::State::StreamsRunning) { + qWarning() << "VideoEnabled: " << enabled << ", old=" << mIsVideoEnabled << (mParticipantDevice ? mParticipantDevice->getAddress()->asString().c_str() : "") << ", me=" << isMe() << ", CallState=" << (mCall ? (int)mCall->getCall()->getState() : -1); + mIsVideoEnabled = enabled; + emit videoEnabledChanged(); + } } bool ParticipantDeviceModel::isMe() const{ @@ -124,18 +139,26 @@ void ParticipantDeviceModel::onSecurityLevelChanged(std::shared_ptrgetCall()->getState() == linphone::Call::State::StreamsRunning){ + updateVideoEnabled(); + } +} + //-------------------------------------------------------------------- void ParticipantDeviceModel::onIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking) { } void ParticipantDeviceModel::onIsMuted(const std::shared_ptr & participantDevice, bool isMuted) { } void ParticipantDeviceModel::onConferenceJoined(const std::shared_ptr & participantDevice) { + updateVideoEnabled(); } void ParticipantDeviceModel::onConferenceLeft(const std::shared_ptr & participantDevice) { + updateVideoEnabled(); } void ParticipantDeviceModel::onStreamCapabilityChanged(const std::shared_ptr & participantDevice, linphone::MediaDirection direction, linphone::StreamType streamType) { - emit videoEnabledChanged(); + updateVideoEnabled(); } void ParticipantDeviceModel::onStreamAvailabilityChanged(const std::shared_ptr & participantDevice, bool available, linphone::StreamType streamType) { - emit videoEnabledChanged(); + updateVideoEnabled(); } \ No newline at end of file diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceModel.hpp index 1919df8ac..46082b724 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceModel.hpp +++ b/linphone-app/src/components/participant/ParticipantDeviceModel.hpp @@ -37,11 +37,11 @@ class ParticipantDeviceModel : public QObject { public: - ParticipantDeviceModel (std::shared_ptr device, const bool& isMe = false, QObject *parent = nullptr); + ParticipantDeviceModel (CallModel * callModel, std::shared_ptr device, const bool& isMe = false, QObject *parent = nullptr); virtual ~ParticipantDeviceModel(); //ParticipantDeviceModel (CallModel * call, const bool& isMe = true, QObject *parent = nullptr); - static QSharedPointer create(std::shared_ptr device, const bool& isMe = false, QObject *parent = nullptr); + static QSharedPointer create(CallModel* callModel, std::shared_ptr device, const bool& isMe = false, QObject *parent = nullptr); //static std::shared_ptr create(CallModel * call, const bool& isMe = true, QObject *parent = nullptr); Q_PROPERTY(QString displayName READ getDisplayName CONSTANT) @@ -71,8 +71,11 @@ public: virtual void onStreamAvailabilityChanged(const std::shared_ptr & participantDevice, bool available, linphone::StreamType streamType); void connectTo(ParticipantDeviceListener * listener); + void updateVideoEnabled(); + public slots: void onSecurityLevelChanged(std::shared_ptr device); + void onCallStatusChanged(); signals: void securityLevelChanged(); void videoEnabledChanged(); @@ -80,6 +83,7 @@ signals: private: bool mIsMe = false; + bool mIsVideoEnabled; std::shared_ptr mParticipantDevice; std::shared_ptr mParticipantDeviceListener; // This is passed to linpĥone object and must be in shared_ptr diff --git a/linphone-app/src/utils/Constants.hpp b/linphone-app/src/utils/Constants.hpp index 47893ff93..f42163154 100644 --- a/linphone-app/src/utils/Constants.hpp +++ b/linphone-app/src/utils/Constants.hpp @@ -136,8 +136,9 @@ public: static constexpr char VcardScheme[] = EXECUTABLE_NAME "-desktop:/"; static constexpr int CbsCallInterval = 20; static constexpr char RcVersionName[] = "rc_version"; - static constexpr int RcVersionCurrent = 3; // 2 = Conference URI + static constexpr int RcVersionCurrent = 4; // 2 = Conference URI // 3 = CPIM on basic chat rooms + // 4 = RTP bundle mode //-------------------------------------------------------------------------------- // CISCO diff --git a/linphone-app/ui/modules/Common/Form/Mosaic.qml b/linphone-app/ui/modules/Common/Form/Mosaic.qml index 4115100fa..74fa09767 100644 --- a/linphone-app/ui/modules/Common/Form/Mosaic.qml +++ b/linphone-app/ui/modules/Common/Form/Mosaic.qml @@ -1,4 +1,4 @@ -import QtQuick 2.7 +import QtQuick 2.15 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.0 import QtQml.Models 2.12 @@ -12,6 +12,7 @@ ColumnLayout{ property alias delegateModel: grid.model property alias cellHeight: grid.cellHeight property alias cellWidth: grid.cellWidth + property bool squaredDisplay: false function appendItem(item){ console.log("Adding "+item) @@ -77,31 +78,41 @@ ColumnLayout{ } } - - + /* + Item{// Spacer + Layout.fillWidth: true + Layout.fillHeight: true + }*/ GridView{ id: grid property int itemCount: model.count ? model.count :( model.length ? model.length : 0) - property int columns: getColumnCount(itemCount) - property int rows: getRowCount(itemCount) + property int columns: 1 + property int rows: 1 + function updateLayout(){ + columns = getColumnCount(itemCount) + rows = getRowCount(itemCount) + } function getColumnCount(itemCount){ return itemCount > 0 ? Math.sqrt(itemCount-1) + 1 : 1 } function getRowCount(itemCount){ return columns > 1 ? (itemCount-1) / columns + 1 : 1 } - - cellWidth: (mainLayout.width - 5 ) / columns - cellHeight: (mainLayout.height - 5 ) / rows + property int computedWidth: (mainLayout.width - 5 ) / columns + property int computedHeight: (mainLayout.height - 5 ) / rows + cellWidth: ( squaredDisplay ? Math.min(computedWidth, computedHeight) : computedWidth) + cellHeight: ( squaredDisplay ? Math.min(computedWidth, computedHeight) : computedHeight) function isLayoutWillChanged(){ return columns !== getColumnCount(itemCount+1) || rows !== getRowCount(itemCount+1) } - Layout.fillHeight: true - Layout.fillWidth: true + //Layout.fillHeight: true + //Layout.fillWidth: true + Layout.preferredWidth: cellWidth * columns + Layout.preferredHeight: cellHeight * rows Layout.alignment: Qt.AlignCenter interactive: false @@ -131,6 +142,7 @@ ColumnLayout{ } } } + add: Transition { SequentialAnimation { ScriptAction { @@ -144,6 +156,7 @@ ColumnLayout{ } } } + addDisplaced: defaultTransition displaced: defaultTransition move: defaultTransition @@ -164,9 +177,21 @@ ColumnLayout{ removeDisplaced: defaultTransition populate:defaultTransition - onItemCountChanged: console.log("Mosaic "+model+" itemCount: " +itemCount +" => " + (model.count ? " count="+model.count :( model.length ? " length":" no" ))) + Timer{ // if cell sizes change while adding/removing an item the animation will not end at the right position. + id: updateLayoutDelay + interval: mainLayout.maxTransitionTime + onTriggered: grid.updateLayout() + } + onItemCountChanged: { + updateLayoutDelay.restart() + console.log("Mosaic "+model+" itemCount: " +itemCount +" => " + (model.count ? " count="+model.count :( model.length ? " length":" no" ))) + } - } + }/* + Item{// Spacer + Layout.fillWidth: true + Layout.fillHeight: true + }*/ /* ListView{ id: bottomRowList diff --git a/linphone-app/ui/views/App/Calls/IncallAvatar.qml b/linphone-app/ui/modules/Linphone/Calls/IncallAvatar.qml similarity index 100% rename from linphone-app/ui/views/App/Calls/IncallAvatar.qml rename to linphone-app/ui/modules/Linphone/Calls/IncallAvatar.qml diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml b/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml new file mode 100644 index 000000000..0dd2feea3 --- /dev/null +++ b/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml @@ -0,0 +1,139 @@ +import QtQuick 2.7 +import QtQuick.Layouts 1.3 +import QtGraphicalEffects 1.12 + +import App.Styles 1.0 +import Common 1.0 +import Common.Styles 1.0 +import Linphone 1.0 +import Linphone.Styles 1.0 +import LinphoneUtils 1.0 + +import UtilsCpp 1.0 + +import 'qrc:/ui/scripts/Utils/utils.js' as Utils + +// ============================================================================= +Item { + id: container + property ParticipantDeviceModel currentDevice + property bool isPreview: !container.currentDevice || container.currentDevice.isMe + property bool isFullscreen: false + property bool hideCamera: false //callModel.pausedByUser + property bool showCloseButton: true + signal closeRequested() + + function resetActive(){ + resetTimer.resetActive() + } + Component { + id: avatar + + IncallAvatar { + participantDeviceModel: container.currentDevice + height: Utils.computeAvatarSize(container, CallStyle.container.avatar.maxSize) + width: height + } + } + Loader { + anchors.centerIn: parent + + active: container.currentDevice && !container.currentDevice.isMe && (!container.currentDevice.videoEnabled || container.isFullscreen) + sourceComponent: avatar + } + Loader { + id: cameraLoader + + property bool isVideoEnabled: !container.currentDevice || (container.currentDevice && container.currentDevice.videoEnabled) + property bool resetActive: false + + property int cameraMode: isVideoEnabled ? container.isPreview ? 1 : 2 : 0 + onCameraModeChanged: console.log(cameraMode) + + anchors.fill: parent + + active: !resetActive && isVideoEnabled //avatarCell.currentDevice && (avatarCell.currentDevice.videoEnabled && !conference._fullscreen) + sourceComponent: cameraMode == 1 ? cameraPreview : cameraMode == 2 ? camera : null + + Timer{ + id: resetTimer + interval: 100 + repeat: false + onTriggered: if(!cameraLoader.active){ + cameraLoader.resetActive = false + }else{ + start() // Let some more time to propagate active event + } + function resetActive(){ + start()// Do it first to avoid deleting caller while processing + cameraLoader.resetActive = true + } + } + + Component { + id: camera + Camera { + participantDeviceModel: container.currentDevice + anchors.fill: parent + onRequestNewRenderer: {resetTimer.resetActive()} + Component.onDestruction: {resetWindowId()} + Component.onCompleted: console.log("Completed Camera") + Text{ + id: username + anchors.right: parent.right + anchors.left: parent.left + anchors.bottom: parent.bottom + anchors.margins: 10 + elide: Text.ElideRight + maximumLineCount: 1 + text: container.currentDevice.displayName + font.pointSize: CameraViewStyle.contactDescription.pointSize + font.weight: CameraViewStyle.contactDescription.weight + color: CameraViewStyle.contactDescription.color + }/* + DropShadow { + anchors.fill: username + source: username + verticalOffset: 2 + color: "#80000000" + radius: 1 + samples: 3 + }*/ + Glow { + anchors.fill: username + //spread: 1 + radius: 12 + samples: 25 + color: "#80000000" + source: username + } + } + } + + Component { + id: cameraPreview + Camera { + anchors.fill: parent + isPreview: true + onRequestNewRenderer: {resetTimer.resetActive()} + Component.onDestruction: {resetWindowId();} + Component.onCompleted: console.log("Completed Preview") + Rectangle{ + anchors.fill: parent + color: 'black' + visible: container.hideCamera + } + ActionButton{ + visible: container.showCloseButton + anchors.right: parent.right + anchors.top: parent.top + anchors.rightMargin: 15 + anchors.topMargin: 15 + isCustom: true + colorSet: CameraViewStyle.closePreview + onClicked: container.closeRequested() + } + } + } + } +} diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml new file mode 100644 index 000000000..2baba42e3 --- /dev/null +++ b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml @@ -0,0 +1,59 @@ +import QtQuick 2.7 +import QtQuick.Layouts 1.3 +import QtGraphicalEffects 1.12 + +import Common 1.0 +import Common.Styles 1.0 +import Linphone 1.0 +import Linphone.Styles 1.0 + +// ============================================================================= +Item{ + id: mainItem + property alias currentDevice: camera.currentDevice + property alias hideCamera: camera.hideCamera + property alias showCloseButton: camera.showCloseButton + signal closeRequested() + + MouseArea{ + anchors.fill: parent + onClicked: {camera.resetActive()} + } + Rectangle{ + id: showArea + anchors.fill: parent + radius: CameraViewStyle.radius + visible: false + color: 'red' + } + CameraItem{ + id: camera + anchors.fill: parent + visible: false + onCloseRequested: mainItem.closeRequested() + } + OpacityMask{ + anchors.fill: parent + source: camera + maskSource: showArea + invert:false + visible: true + + /* In case we need transformations. + property Matrix4x4 mirroredRotationMatrix : Matrix4x4 {// 180 rotation + mirror + matrix: Qt.matrix4x4(-Math.cos(Math.PI), -Math.sin(Math.PI), 0, 0, + Math.sin(Math.PI), Math.cos(Math.PI), 0, camera.height, + 0, 0, 1, 0, + 0, 0, 0, 1) + } + property Matrix4x4 rotationMatrix : Matrix4x4 {// 180 rotation only + matrix: Qt.matrix4x4(Math.cos(Math.PI), -Math.sin(Math.PI), 0, camera.width, + Math.sin(Math.PI), Math.cos(Math.PI), 0, camera.height, + 0, 0, 1, 0, + 0, 0, 0, 1) + } + + //transform: ( camera.isPreview ? mirroredRotationMatrix : rotationMatrix) + */ + } +} diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml index 549ebb38d..101e97bd3 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml @@ -50,7 +50,7 @@ Loader{ clip: false hoverEnabled: true - onClicked: CallsListModel.launchVideoCall(mainItem.conferenceInfoModel.uri, '', 0) + onClicked: CallsListModel.prepareConferenceCall(mainItem.conferenceInfoModel) onHoveredChanged: mainItem.containsMouse = loadedItem.containsMouse ColumnLayout{ diff --git a/linphone-app/ui/modules/Linphone/Codecs/CodecsViewer.qml b/linphone-app/ui/modules/Linphone/Codecs/CodecsViewer.qml index a9adb9692..5927aad2b 100644 --- a/linphone-app/ui/modules/Linphone/Codecs/CodecsViewer.qml +++ b/linphone-app/ui/modules/Linphone/Codecs/CodecsViewer.qml @@ -92,11 +92,7 @@ Column { cursorShape: Qt.ArrowCursor property bool held: false - - anchors { - left: parent.left - right: parent.right - } + width: view.width drag { axis: Drag.YAxis diff --git a/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml b/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml new file mode 100644 index 000000000..8aee4aaf8 --- /dev/null +++ b/linphone-app/ui/modules/Linphone/Styles/Camera/CameraViewStyle.qml @@ -0,0 +1,36 @@ +pragma Singleton +import QtQml 2.2 +import QtQuick 2.7 + +import Units 1.0 +import ColorsList 1.0 + + +// ============================================================================= + +QtObject { + property string sectionName: 'CameraView' + property color backgroundColor: ColorsList.add(sectionName+'_description', '', '', '#798791').color + property int radius : 8 + + property QtObject contactDescription: QtObject { + property color color: ColorsList.add(sectionName+'_username', 'q').color + property int pointSize: Units.dp * 12 + property int weight: Font.Bold + } + + //------------------------------------------------------------------------------ + property QtObject closePreview: QtObject { + property int iconSize: 40 + property string icon : 'close_custom' + property string name : 'close_preview' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_inv_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_inv_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_inv_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_inv_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_inv_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_inv_fg').color + } + //------------------------------------------------------------------------------ + +} diff --git a/linphone-app/ui/modules/Linphone/Styles/qmldir b/linphone-app/ui/modules/Linphone/Styles/qmldir index 246137b5e..67fab4607 100644 --- a/linphone-app/ui/modules/Linphone/Styles/qmldir +++ b/linphone-app/ui/modules/Linphone/Styles/qmldir @@ -9,6 +9,8 @@ singleton AccountStatusStyle 1.0 Account/AccountStatusStyle.qm singleton CardBlockStyle 1.0 Blocks/CardBlockStyle.qml singleton RequestBlockStyle 1.0 Blocks/RequestBlockStyle.qml +singleton CameraViewStyle 1.0 Camera/CameraViewStyle.qml + singleton ChatStyle 1.0 Chat/ChatStyle.qml singleton ChatAudioMessageStyle 1.0 Chat/ChatAudioMessageStyle.qml singleton ChatAudioPreviewStyle 1.0 Chat/ChatAudioPreviewStyle.qml diff --git a/linphone-app/ui/modules/Linphone/qmldir b/linphone-app/ui/modules/Linphone/qmldir index 95f2a6b98..5b712677e 100644 --- a/linphone-app/ui/modules/Linphone/qmldir +++ b/linphone-app/ui/modules/Linphone/qmldir @@ -13,6 +13,10 @@ RequestBlock 1.0 Blocks/RequestBlock.qml Calls 1.0 Calls/Calls.qml CallStatistics 1.0 Calls/CallStatistics.qml +IncallAvatar 1.0 Calls/IncallAvatar.qml + +CameraItem 1.0 Camera/CameraItem.qml +CameraView 1.0 Camera/CameraView.qml Chat 1.0 Chat/Chat.qml ChatAudioMessage 1.0 Chat/ChatAudioMessage.qml diff --git a/linphone-app/ui/scripts/Utils/utils.js b/linphone-app/ui/scripts/Utils/utils.js index 53085ae58..63ac539ad 100644 --- a/linphone-app/ui/scripts/Utils/utils.js +++ b/linphone-app/ui/scripts/Utils/utils.js @@ -693,3 +693,11 @@ function write (fileName, text) { request.open('PUT', getUriFromSystemPath(fileName), false) request.send(text) } + +function computeAvatarSize (container, maxSize) { + var height = container.height + var width = container.width + + var size = height < maxSize && height > 0 ? height : maxSize + return size < width ? size : width +} \ No newline at end of file diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.js b/linphone-app/ui/views/App/Calls/CallsWindow.js index 6cf3cac7e..95370e274 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.js +++ b/linphone-app/ui/views/App/Calls/CallsWindow.js @@ -58,13 +58,22 @@ function openConferenceManager (params, exitHandler) { window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/ConferenceManager.qml'), params, exitHandler) } +function openWaitingRoom(model){ + if(window.conferenceInfoModel) + window.conferenceInfoModel = null; + window.conferenceInfoModel = model + console.log('set : '+window.conferenceInfoModel) +} + // ----------------------------------------------------------------------------- // Used to get Component based from Call Status -function getContent () { - var call = window.call +function getContent (call, conferenceInfoModel) { + console.log('getContent call') if (call == null) { - //return conference - return videoConference + if(conferenceInfoModel) + return waitingRoom + else + return videoConference } var status = call.status @@ -84,8 +93,13 @@ function getContent () { if (status === CallModel.CallStatusEnded) { return endedCall } + if(call.isConference) return videoConference + + if(!call && window.conferenceInfoModel) + return waitingRoom; + return incall } diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.qml b/linphone-app/ui/views/App/Calls/CallsWindow.qml index c53301f11..e7db1b14b 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.qml +++ b/linphone-app/ui/views/App/Calls/CallsWindow.qml @@ -29,15 +29,12 @@ Window { videoEnabled: false, chatRoomModel:null }); - + property ConferenceInfoModel conferenceInfoModel readonly property bool chatIsOpened: !rightPaned.isClosed() readonly property bool callsIsOpened: !mainPaned.isClosed() // --------------------------------------------------------------------------- - function openConference(){ - middlePane.sourceComponent = videoConference - } function openChat () { rightPaned.open() @@ -249,6 +246,12 @@ Window { } } + Component { + id: waitingRoom + WaitingRoom{ + conferenceInfoModel: window.conferenceInfoModel + } + } Component { id: videoConference VideoConference { @@ -263,8 +266,13 @@ Window { childA: Loader { id: middlePane anchors.fill: parent - sourceComponent: Logic.getContent() - onSourceComponentChanged: {rightPaned.childAItem.update()}// Force update when loading a new Content. It's just to be sure + sourceComponent: Logic.getContent(calls.selectedCall, window.conferenceInfoModel) + onSourceComponentChanged: { + if( sourceComponent == waitingRoom) + mainPaned.close() + rightPaned.childAItem.update() + }// Force update when loading a new Content. It's just to be sure + active: calls.selectedCall || window.conferenceInfoModel } childB: Loader { @@ -283,6 +291,7 @@ Window { target: CallsListModel onCallTransferAsked: Logic.handleCallTransferAsked(callModel) onCallAttendedTransferAsked: Logic.handleCallAttendedTransferAsked(callModel) + onCallConferenceAsked: {console.log('Openning : '+conferenceInfoModel);Logic.openWaitingRoom(conferenceInfoModel)} onRowsRemoved: Logic.tryToCloseWindow() } } diff --git a/linphone-app/ui/views/App/Calls/EndedCall.qml b/linphone-app/ui/views/App/Calls/EndedCall.qml index 128694ccb..46070aab0 100644 --- a/linphone-app/ui/views/App/Calls/EndedCall.qml +++ b/linphone-app/ui/views/App/Calls/EndedCall.qml @@ -9,6 +9,7 @@ import UtilsCpp 1.0 import App.Styles 1.0 import 'Incall.js' as Logic +import 'qrc:/ui/scripts/Utils/utils.js' as Utils // ============================================================================= @@ -68,7 +69,7 @@ Rectangle { image: _sipAddressObserver.contact && _sipAddressObserver.contact.vcard.avatar username: contactDescription.username - height: Logic.computeAvatarSize(container, CallStyle.container.avatar.maxSize) + height: Utils.computeAvatarSize(container, CallStyle.container.avatar.maxSize) width: height } } diff --git a/linphone-app/ui/views/App/Calls/Incall.js b/linphone-app/ui/views/App/Calls/Incall.js index 6377bc736..9093e80bd 100644 --- a/linphone-app/ui/views/App/Calls/Incall.js +++ b/linphone-app/ui/views/App/Calls/Incall.js @@ -28,13 +28,7 @@ // ============================================================================= -function computeAvatarSize (container, maxSize) { - var height = container.height - var width = container.width - var size = height < maxSize && height > 0 ? height : maxSize - return size < width ? size : width -} function handleCallStatisticsClosed () { // Prevent many clicks on call statistics button. diff --git a/linphone-app/ui/views/App/Calls/Incall.qml b/linphone-app/ui/views/App/Calls/Incall.qml index c06edc4f6..8f7d5f0a6 100644 --- a/linphone-app/ui/views/App/Calls/Incall.qml +++ b/linphone-app/ui/views/App/Calls/Incall.qml @@ -12,6 +12,7 @@ import UtilsCpp 1.0 import App.Styles 1.0 import 'Incall.js' as Logic +import 'qrc:/ui/scripts/Utils/utils.js' as Utils // ============================================================================= @@ -239,7 +240,7 @@ Rectangle { IncallAvatar { call: incall.call - height: Logic.computeAvatarSize(container, CallStyle.container.avatar.maxSize) + height: Utils.computeAvatarSize(container, CallStyle.container.avatar.maxSize) width: height } } diff --git a/linphone-app/ui/views/App/Calls/VideoConference.qml b/linphone-app/ui/views/App/Calls/VideoConference.qml index c6be77eda..41daa60bc 100644 --- a/linphone-app/ui/views/App/Calls/VideoConference.qml +++ b/linphone-app/ui/views/App/Calls/VideoConference.qml @@ -1,485 +1,369 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.3 -import QtQml.Models 2.12 -import QtGraphicalEffects 1.12 - -import Common 1.0 -import Common.Styles 1.0 -import Linphone 1.0 -import LinphoneUtils 1.0 - -import UtilsCpp 1.0 - -import App.Styles 1.0 - - -// Temp -import 'Incall.js' as Logic -import 'qrc:/ui/scripts/Utils/utils.js' as Utils - -// ============================================================================= - -Rectangle { - id: conference - - property CallModel callModel - property ConferenceModel conferenceModel: callModel && callModel.getConferenceModel() - property var _fullscreen: null - property bool listCallsOpened: true - - signal openListCallsRequest() - // --------------------------------------------------------------------------- - - color: VideoConferenceStyle.backgroundColor - - Connections { - target: callModel - - onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height) - onStatusChanged: Logic.handleStatusChanged (status) - onVideoRequested: Logic.handleVideoRequested(callModel) - } - - // --------------------------------------------------------------------------- - ColumnLayout { - anchors.fill: parent - spacing: 0 - - // ------------------------------------------------------------------------- - // Conference info. - // ------------------------------------------------------------------------- - RowLayout{ -// Aux features - Layout.topMargin: 10 - Layout.leftMargin: 25 - Layout.rightMargin: 25 - spacing: 10 - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.callsList - visible: !listCallsOpened - onClicked: openListCallsRequest() - } - ActionButton{ - id: keypadButton - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.dialpad - onClicked: telKeypad.visible = !telKeypad.visible - } -// Title - Text{ - Timer{ - id: elapsedTimeRefresher - running: true - interval: 1000 - repeat: true - onTriggered: parent.elaspedTime = ' - ' +Utils.formatElapsedTime(conferenceModel.getElapsedSeconds()) - } - property string elaspedTime - horizontalAlignment: Qt.AlignHCenter - Layout.fillWidth: true - text: conferenceModel.subject+ elaspedTime - color: VideoConferenceStyle.title.color - font.pointSize: VideoConferenceStyle.title.pointSize - } -// Mode buttons - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.screenSharing - } - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.recordOff - } - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.screenshot - } - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.fullscreen - } - - } - - // ------------------------------------------------------------------------- - // Contacts visual. - // ------------------------------------------------------------------------- - - MouseArea{ - id: mainGrid - Layout.fillHeight: true - Layout.fillWidth: true - Layout.leftMargin: 70 - Layout.rightMargin: 70 - Layout.topMargin: 15 - Layout.bottomMargin: 20 - onClicked: { - if(!conference.callModel) - grid.add({color: '#'+ Math.floor(Math.random()*255).toString(16) - +Math.floor(Math.random()*255).toString(16) - +Math.floor(Math.random()*255).toString(16)}) - } - /* - ParticipantDeviceProxyModel{ - id: participantDevices - callModel: conference.callModel - }*/ - Mosaic { - id: grid - anchors.fill: parent - - - property int radius : 8 - function setTestMode(){ - grid.clear() - gridModel.model = gridModel.defaultList - for(var i = 0 ; i < 5 ; ++i) - grid.add({color: '#'+ Math.floor(Math.random()*255).toString(16) - +Math.floor(Math.random()*255).toString(16) - +Math.floor(Math.random()*255).toString(16)}) - console.log("Setting test mode : count=" + gridModel.defaultList.count) - } - function setParticipantDevicesMode(){ - console.log("Setting participant mode : count=" + gridModel.participantDevices.count) - grid.clear() - gridModel.model = gridModel.participantDevices - } - - delegateModel: DelegateModel{ - id: gridModel - property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel { - id: participantDevices - callModel: conference.callModel - showMe: true - } - /* - property ListModel defaultList : ListModel{} - Component.onCompleted: { - if( conference.callModel ){ - grid.clear() - gridModel.model = participantDevices - } - } - model: defaultList - */ - model: participantDevices - onCountChanged: {console.log("Delegate count = "+count+"/"+participantDevices.count)} - delegate: Rectangle{ - id: avatarCell - property ParticipantDeviceModel currentDevice: gridModel.participantDevices.getAt(index) - onCurrentDeviceChanged: console.log("currentDevice changed: " +currentDevice + (currentDevice?", me:"+currentDevice.isMe:'')+" ["+index+"]") - color: /*!conference.callModel && gridModel.defaultList.get(index).color ? gridModel.defaultList.get(index).color : */'#AAAAAAAA' - //color: gridModel.model.get(index) && gridModel.model.get(index).color ? gridModel.model.get(index).color : '' // modelIndex is a custom index because by Mosaic modelisation, it is not accessible. - //color: $modelData.color ? $modelData.color : '' - radius: 50//grid.radius - height: grid.cellHeight - 5 - width: grid.cellWidth - 5 - Component.onCompleted: console.log("Completed: ["+index+"] " +(currentDevice?currentDevice.peerAddress+", isMe:"+currentDevice.isMe : '') ) - - Rectangle{ - id: showArea - anchors.fill: parent - radius: 50 - visible:false - color: 'red' - } - - Item { - id: container - anchors.fill: parent - //anchors.margins: CallStyle.container.margins - //visible: conference.callModel - visible: false - //Layout.fillWidth: true - //Layout.fillHeight: true - //Layout.margins: CallStyle.container.margins - - Component { - id: avatar - - IncallAvatar { - //call: gridModel.participantDevices.get(index).call - participantDeviceModel: avatarCell.currentDevice - height: Logic.computeAvatarSize(container, CallStyle.container.avatar.maxSize) - width: height - Component.onCompleted: console.log("Avatar completed"+ " ["+index+"]") - Component.onDestruction: console.log("Avatar destroyed"+ " ["+index+"]") - } - } - Loader { - anchors.centerIn: parent - - active: avatarCell.currentDevice && !avatarCell.currentDevice.isMe && (!avatarCell.currentDevice.videoEnabled || conference._fullscreen) - sourceComponent: avatar - } - Loader { - id: cameraLoader - - //anchors.centerIn: parent - anchors.fill: parent - property bool isVideoEnabled : avatarCell.currentDevice && avatarCell.currentDevice.videoEnabled - property bool t_fullscreen: conference._fullscreen - property bool tCallModel: conference.callModel - property bool resetActive: false - onIsVideoEnabledChanged: console.log("Video is enabled : " +isVideoEnabled + " ["+index+"]") - onT_fullscreenChanged: console.log("_fullscreen changed: " +t_fullscreen+ " ["+index+"]") - onTCallModelChanged: console.log("CallModel changed: " +tCallModel+ " ["+index+"]") - - active: !resetActive && avatarCell.currentDevice && (avatarCell.currentDevice.videoEnabled && !conference._fullscreen) - - property int cameraMode: isVideoEnabled ? - avatarCell.currentDevice.isMe ? 1 - : 2 - : 0 - sourceComponent: cameraMode == 1 ? cameraPreview : cameraMode == 2 ? camera : null - onSourceComponentChanged: console.log("SourceComponent Changed: "+cameraMode+ " ["+index+"]") - - - Component { - id: camera - - Camera { - //call: grid.get(modelIndex).call - participantDeviceModel: avatarCell.currentDevice - //height: container.height - //width: container.width - anchors.fill: parent - onRequestNewRenderer: {cameraLoader.resetActive = true; cameraLoader.resetActive = false} - - Component.onCompleted: console.log("Camera completed"+ " ["+index+"]") - Component.onDestruction: console.log("Camera destroyed"+ " ["+index+"]") - Text{ - anchors.right: parent.right - anchors.left: parent.left - anchors.bottom: parent.bottom - anchors.margins: 10 - elide: Text.ElideRight - maximumLineCount: 1 - text: avatarCell.currentDevice.displayName - color: 'white' - } - } - } - Component { - id: cameraPreview - - Camera { - anchors.fill: parent - //participantDeviceModel: avatarCell.currentDevice - isPreview: true - onRequestNewRenderer: {cameraLoader.resetActive = true; cameraLoader.resetActive = false} - - Component.onCompleted: console.log("Preview completed"+ " ["+index+"]") - Component.onDestruction: console.log("Preview destroyed"+ " ["+index+"]") - ActionButton{ - anchors.right: parent.right - anchors.top: parent.top - anchors.rightMargin: 15 - anchors.topMargin: 15 - isCustom: true - colorSet: VideoConferenceStyle.buttons.closePreview - onClicked: grid.remove( index) - } - } - } - } - } - - OpacityMask{ - anchors.fill: parent - source: container - maskSource: showArea - invert:false - - visible: conference.callModel -// rotation: 180 - } - - /* - MouseArea{ - anchors.fill: parent - onClicked: {grid.remove( index)} - } - */ - } - } - } - } - // ------------------------------------------------------------------------- - // Action Buttons. - // ------------------------------------------------------------------------- - RowLayout{ - Layout.fillWidth: true - Layout.bottomMargin: 40 - Layout.leftMargin: 25 - Layout.rightMargin: 25 -// Security - ActionButton{ - //Layout.preferredHeight: VideoConferenceStyle.buttons.buttonSize - //Layout.preferredWidth: VideoConferenceStyle.buttons.buttonSize - height: VideoConferenceStyle.buttons.secure.buttonSize - width: height - isCustom: true - iconIsCustom: false - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.secure - - icon: 'secure_level_1' - } - Item{ - Layout.fillWidth: true - } -// Action buttons - RowLayout{ - Layout.alignment: Qt.AlignCenter - spacing: 30 - RowLayout{ - spacing: 10 - Row { - spacing: 2 - visible: SettingsModel.muteMicrophoneEnabled - property bool microMuted: callModel.microMuted - - VuMeter { - enabled: !parent.microMuted - Timer { - interval: 50 - repeat: true - running: parent.enabled - - onTriggered: parent.value = callModel.microVu - } - } - ActionSwitch { - id: micro - isCustom: true - backgroundRadius: 90 - colorSet: parent.microMuted ? VideoConferenceStyle.buttons.microOff : VideoConferenceStyle.buttons.microOn - onClicked: callModel.microMuted = !parent.microMuted - } - } - Row { - spacing: 2 - property bool speakerMuted: callModel.speakerMuted - VuMeter { - enabled: !parent.speakerMuted - Timer { - interval: 50 - repeat: true - running: parent.enabled - onTriggered: parent.value = callModel.speakerVu - } - } - ActionSwitch { - id: speaker - isCustom: true - backgroundRadius: 90 - colorSet: parent.speakerMuted ? VideoConferenceStyle.buttons.speakerOff : VideoConferenceStyle.buttons.speakerOn - onClicked: callModel.speakerMuted = !parent.speakerMuted - } - } - ActionSwitch { - id: camera - isCustom: true - backgroundRadius: 90 - colorSet: callModel && callModel.videoEnabled ? VideoConferenceStyle.buttons.cameraOn : VideoConferenceStyle.buttons.cameraOff - updating: callModel.videoEnabled && callModel.updating - onClicked: if(callModel) callModel.videoEnabled = !callModel.videoEnabled - } - } - RowLayout{ - spacing: 10 - ActionButton{ - isCustom: true - backgroundRadius: width/2 - visible: SettingsModel.callPauseEnabled - updating: callModel.updating - colorSet: callModel.pausedByUser ? VideoConferenceStyle.buttons.play : VideoConferenceStyle.buttons.pause - onClicked: callModel.pausedByUser = !callModel.pausedByUser - } - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.hangup - - onClicked: callModel.terminate() - } - } - } - Item{ - Layout.fillWidth: true - } -// Panel buttons - RowLayout{ - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.chat - visible: false // TODO for next version - } - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.participants - } - ActionButton { - id: callQuality - - isCustom: true - backgroundRadius: 4 - colorSet: VideoConferenceStyle.buttons.callQuality - percentageDisplayed: 0 - - onClicked: {console.log("opening stats");Logic.openCallStatistics();console.log("Stats should be opened")} - Timer { - interval: 500 - repeat: true - running: true - triggeredOnStart: true - onTriggered: { - // Note: `quality` is in the [0, 5] interval and -1. - var quality = callModel.quality - if(quality >= 0) - callQuality.percentageDisplayed = quality * 100 / 5 - else - callQuality.percentageDisplayed = 0 - } - } - - CallStatistics { - id: callStatistics - - call: callModel - width: conference.width - relativeTo: keypadButton - relativeY: CallStyle.header.stats.relativeY - onClosed: Logic.handleCallStatisticsClosed() - onOpened: console.log("Stats Opened: " +call+", " +width +", "+relativeY) - } - } - ActionButton{ - isCustom: true - backgroundRadius: width/2 - colorSet: VideoConferenceStyle.buttons.options - } - } - } - } - // --------------------------------------------------------------------------- - // TelKeypad. - // --------------------------------------------------------------------------- - - TelKeypad { - id: telKeypad - - call: callModel - visible: SettingsModel.showTelKeypadAutomatically - } -} +import QtQuick 2.7 +import QtQuick.Layouts 1.3 +import QtQml.Models 2.12 +import QtGraphicalEffects 1.12 + +import Common 1.0 +import Common.Styles 1.0 +import Linphone 1.0 +import LinphoneUtils 1.0 + +import UtilsCpp 1.0 + +import App.Styles 1.0 + + +// Temp +import 'Incall.js' as Logic +import 'qrc:/ui/scripts/Utils/utils.js' as Utils + +// ============================================================================= + +Rectangle { + id: conference + + property CallModel callModel + property ConferenceModel conferenceModel: callModel && callModel.getConferenceModel() + property var _fullscreen: null + property bool listCallsOpened: true + + signal openListCallsRequest() + // --------------------------------------------------------------------------- + + color: VideoConferenceStyle.backgroundColor + + Connections { + target: callModel + + onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height) + onStatusChanged: Logic.handleStatusChanged (status) + onVideoRequested: Logic.handleVideoRequested(callModel) + } + + // --------------------------------------------------------------------------- + ColumnLayout { + anchors.fill: parent + spacing: 0 + + // ------------------------------------------------------------------------- + // Conference info. + // ------------------------------------------------------------------------- + RowLayout{ + // Aux features + Layout.topMargin: 10 + Layout.leftMargin: 25 + Layout.rightMargin: 25 + spacing: 10 + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.callsList + visible: !listCallsOpened + onClicked: openListCallsRequest() + } + ActionButton{ + id: keypadButton + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.dialpad + onClicked: telKeypad.visible = !telKeypad.visible + } + // Title + Text{ + Timer{ + id: elapsedTimeRefresher + running: true + interval: 1000 + repeat: true + onTriggered: parent.elaspedTime = ' - ' +Utils.formatElapsedTime(conferenceModel.getElapsedSeconds()) + } + property string elaspedTime + horizontalAlignment: Qt.AlignHCenter + Layout.fillWidth: true + text: conferenceModel.subject+ elaspedTime + color: VideoConferenceStyle.title.color + font.pointSize: VideoConferenceStyle.title.pointSize + } + // Mode buttons + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.screenSharing + } + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.recordOff + } + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.screenshot + } + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.fullscreen + } + + } + + // ------------------------------------------------------------------------- + // Contacts visual. + // ------------------------------------------------------------------------- + + MouseArea{ + id: mainGrid + Layout.fillHeight: true + Layout.fillWidth: true + Layout.leftMargin: 70 + Layout.rightMargin: 70 + Layout.topMargin: 15 + Layout.bottomMargin: 20 + onClicked: { + if(!conference.callModel) + grid.add({color: '#'+ Math.floor(Math.random()*255).toString(16) + +Math.floor(Math.random()*255).toString(16) + +Math.floor(Math.random()*255).toString(16)}) + } + /* + ParticipantDeviceProxyModel{ + id: participantDevices + callModel: conference.callModel + }*/ + Mosaic { + id: grid + anchors.fill: parent + //anchors.centerIn: parent + //width: parent.width + //height: parent.height + squaredDisplay: true + + property int radius : 8 + function setTestMode(){ + grid.clear() + gridModel.model = gridModel.defaultList + for(var i = 0 ; i < 5 ; ++i) + grid.add({color: '#'+ Math.floor(Math.random()*255).toString(16) + +Math.floor(Math.random()*255).toString(16) + +Math.floor(Math.random()*255).toString(16)}) + console.log("Setting test mode : count=" + gridModel.defaultList.count) + } + function setParticipantDevicesMode(){ + console.log("Setting participant mode : count=" + gridModel.participantDevices.count) + grid.clear() + gridModel.model = gridModel.participantDevices + } + + delegateModel: DelegateModel{ + id: gridModel + property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel { + id: participantDevices + callModel: conference.callModel + showMe: true + } + /* + property ListModel defaultList : ListModel{} + Component.onCompleted: { + if( conference.callModel ){ + grid.clear() + gridModel.model = participantDevices + } + } + model: defaultList + */ + model: participantDevices + onCountChanged: {console.log("Delegate count = "+count+"/"+participantDevices.count)} + delegate: Rectangle{ + id: avatarCell + property ParticipantDeviceModel currentDevice: gridModel.participantDevices.getAt(index) + onCurrentDeviceChanged: console.log("currentDevice changed: " +currentDevice + (currentDevice?", me:"+currentDevice.isMe:'')+" ["+index+"]") + color: /*!conference.callModel && gridModel.defaultList.get(index).color ? gridModel.defaultList.get(index).color : */'#AAAAAAAA' + //color: gridModel.model.get(index) && gridModel.model.get(index).color ? gridModel.model.get(index).color : '' // modelIndex is a custom index because by Mosaic modelisation, it is not accessible. + //color: $modelData.color ? $modelData.color : '' + radius: grid.radius + height: grid.cellHeight - 5 + width: grid.cellWidth - 5 + Component.onCompleted: console.log("Completed: ["+index+"] " +(currentDevice?currentDevice.peerAddress+", isMe:"+currentDevice.isMe : '') ) + + CameraView{ + anchors.fill: parent + currentDevice: avatarCell.currentDevice + hideCamera: callModel.pausedByUser + onCloseRequested: grid.remove( index) + } + } + } + } + } + // ------------------------------------------------------------------------- + // Action Buttons. + // ------------------------------------------------------------------------- + RowLayout{ + Layout.fillWidth: true + Layout.bottomMargin: 40 + Layout.leftMargin: 25 + Layout.rightMargin: 25 + // Security + ActionButton{ + //Layout.preferredHeight: VideoConferenceStyle.buttons.buttonSize + //Layout.preferredWidth: VideoConferenceStyle.buttons.buttonSize + height: VideoConferenceStyle.buttons.secure.buttonSize + width: height + isCustom: true + iconIsCustom: false + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.secure + + icon: 'secure_level_1' + } + Item{ + Layout.fillWidth: true + } + // Action buttons + RowLayout{ + Layout.alignment: Qt.AlignCenter + spacing: 30 + RowLayout{ + spacing: 10 + Row { + spacing: 2 + visible: SettingsModel.muteMicrophoneEnabled + property bool microMuted: callModel.microMuted + + VuMeter { + enabled: !parent.microMuted + Timer { + interval: 50 + repeat: true + running: parent.enabled + + onTriggered: parent.value = callModel.microVu + } + } + ActionSwitch { + id: micro + isCustom: true + backgroundRadius: 90 + colorSet: parent.microMuted ? VideoConferenceStyle.buttons.microOff : VideoConferenceStyle.buttons.microOn + onClicked: callModel.microMuted = !parent.microMuted + } + } + Row { + spacing: 2 + property bool speakerMuted: callModel.speakerMuted + VuMeter { + enabled: !parent.speakerMuted + Timer { + interval: 50 + repeat: true + running: parent.enabled + onTriggered: parent.value = callModel.speakerVu + } + } + ActionSwitch { + id: speaker + isCustom: true + backgroundRadius: 90 + colorSet: parent.speakerMuted ? VideoConferenceStyle.buttons.speakerOff : VideoConferenceStyle.buttons.speakerOn + onClicked: callModel.speakerMuted = !parent.speakerMuted + } + } + ActionSwitch { + id: camera + isCustom: true + backgroundRadius: 90 + colorSet: callModel && callModel.videoEnabled ? VideoConferenceStyle.buttons.cameraOn : VideoConferenceStyle.buttons.cameraOff + updating: callModel.videoEnabled && callModel.updating + onClicked: if(callModel) callModel.videoEnabled = !callModel.videoEnabled + } + } + RowLayout{ + spacing: 10 + ActionButton{ + isCustom: true + backgroundRadius: width/2 + visible: SettingsModel.callPauseEnabled + updating: callModel.updating + colorSet: callModel.pausedByUser ? VideoConferenceStyle.buttons.play : VideoConferenceStyle.buttons.pause + onClicked: callModel.pausedByUser = !callModel.pausedByUser + } + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.hangup + + onClicked: callModel.terminate() + } + } + } + Item{ + Layout.fillWidth: true + } + // Panel buttons + RowLayout{ + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.chat + visible: false // TODO for next version + } + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.participants + } + ActionButton { + id: callQuality + + isCustom: true + backgroundRadius: 4 + colorSet: VideoConferenceStyle.buttons.callQuality + percentageDisplayed: 0 + + onClicked: {console.log("opening stats");Logic.openCallStatistics();console.log("Stats should be opened")} + Timer { + interval: 500 + repeat: true + running: true + triggeredOnStart: true + onTriggered: { + // Note: `quality` is in the [0, 5] interval and -1. + var quality = callModel.quality + if(quality >= 0) + callQuality.percentageDisplayed = quality * 100 / 5 + else + callQuality.percentageDisplayed = 0 + } + } + + CallStatistics { + id: callStatistics + + call: callModel + width: conference.width + relativeTo: keypadButton + relativeY: CallStyle.header.stats.relativeY + onClosed: Logic.handleCallStatisticsClosed() + onOpened: console.log("Stats Opened: " +call+", " +width +", "+relativeY) + } + } + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: VideoConferenceStyle.buttons.options + } + } + } + } + // --------------------------------------------------------------------------- + // TelKeypad. + // --------------------------------------------------------------------------- + + TelKeypad { + id: telKeypad + + call: callModel + visible: SettingsModel.showTelKeypadAutomatically + } +} diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml new file mode 100644 index 000000000..0d36f801b --- /dev/null +++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml @@ -0,0 +1,196 @@ +import QtQuick 2.7 +import QtQuick.Layouts 1.3 +import QtGraphicalEffects 1.12 + +import Common 1.0 +import Linphone 1.0 + +import Common.Styles 1.0 +import App.Styles 1.0 + +// ============================================================================= + +Rectangle { + color: WaitingRoomStyle.backgroundColor + property ConferenceInfoModel conferenceInfoModel + ColumnLayout { + anchors.fill: parent + Text{ + Layout.alignment: Qt.AlignCenter + Layout.preferredHeight: 60 + Layout.topMargin: 15 + text: conferenceInfoModel.subject + color: WaitingRoomStyle.title.color + font.pointSize: WaitingRoomStyle.title.pointSize + horizontalAlignment: Qt.AlignCenter + } + Item{ + Layout.fillWidth: true + Layout.fillHeight: true + CameraView{ + id: previewLoader + showCloseButton: false + anchors.centerIn: parent + height: parent.height + width : height + } + } + /* + Loader{ + id: previewLoader + Layout.fillWidth: true + Layout.fillHeight: true + sourceComponent: Item{ + anchors.top:parent.top + anchors.bottom: parent.bottom + width : height + + Rectangle{ + id: showArea + anchors.fill: parent + radius: 10 + visible:false + color: 'red' + } + CameraPreview { + id: preview + anchors.fill: parent + onRequestNewRenderer: {previewLoader.active = false; previewLoader.active = true} + visible: false + } + + OpacityMask{ + anchors.fill: preview + source: preview + maskSource: showArea + + visible: true + rotation: 180 + + } + } + active: true + }*/ + // ------------------------------------------------------------------------- + // Action Buttons. + // ------------------------------------------------------------------------- + RowLayout{ + Layout.fillWidth: true + Layout.bottomMargin: 40 + Layout.leftMargin: 25 + Layout.rightMargin: 25 + Item{ + Layout.fillWidth: true + } + // Action buttons + RowLayout{ + Layout.alignment: Qt.AlignCenter + spacing: 30 + RowLayout{ + spacing: 10 + ActionSwitch { + id: micro + visible: SettingsModel.muteMicrophoneEnabled + property bool microMuted: false + isCustom: true + backgroundRadius: 90 + colorSet: microMuted ? WaitingRoomStyle.buttons.microOff : WaitingRoomStyle.buttons.microOn + onClicked: microMuted = !microMuted + } + ActionSwitch { + id: speaker + property bool speakerMuted: false + isCustom: true + backgroundRadius: 90 + colorSet: speakerMuted ? WaitingRoomStyle.buttons.speakerOff : WaitingRoomStyle.buttons.speakerOn + onClicked: speakerMuted = !speakerMuted + } + ActionSwitch { + id: camera + property bool cameraEnabled: true + isCustom: true + backgroundRadius: 90 + colorSet: cameraEnabled ? WaitingRoomStyle.buttons.cameraOn : WaitingRoomStyle.buttons.cameraOff + //updating: cameraEnabled && callModel.updating + onClicked: cameraEnabled = !cameraEnabled + } + } + RowLayout{ + ActionButton{ + isCustom: true + backgroundRadius: width/2 + colorSet: WaitingRoomStyle.buttons.gridLayout + /* + colorSet: callModel.pausedByUser ? WaitingRoomStyle.buttons.play : WaitingRoomStyle.buttons.pause + onClicked: callModel.pausedByUser = !callModel.pausedByUser + */ + } + } + } + Item{ + Layout.fillWidth: true + } + } + RowLayout{ + Layout.alignment: Qt.AlignCenter + Layout.bottomMargin: 15 + TextButtonA { + text: 'CANCEL' + + onClicked: console.log('cancel') + } + TextButtonB { + text: 'DEMARRER' + + onClicked: CallsListModel.launchVideoCall(conferenceInfoModel.uri, '', 0, {video: camera.cameraEnabled, micro:!micro.microMuted, audio:!speaker.speakerMuted}) + } + } + + /* + GridLayout { + columns: parent.width < CallStyle.actionArea.lowWidth && call.videoEnabled ? 1 : 2 + rowSpacing: ActionBarStyle.spacing + + anchors { + left: parent.left + leftMargin: CallStyle.actionArea.leftButtonsGroupMargin + verticalCenter: parent.verticalCenter + } + + ActionSwitch { + isCustom: true + backgroundRadius: 90 + colorSet: enabled ? CallStyle.buttons.microOn : CallStyle.buttons.microOff + enabled: !call.microMuted + + onClicked: call.microMuted = enabled + } + } + + Item { + anchors.centerIn: parent + height: CallStyle.actionArea.userVideo.height + width: CallStyle.actionArea.userVideo.width + + visible: call.videoEnabled + } + + ActionBar { + anchors { + right: parent.right + rightMargin: CallStyle.actionArea.rightButtonsGroupMargin + verticalCenter: parent.verticalCenter + } + iconSize: CallStyle.actionArea.iconSize + + ActionButton { + isCustom: true + backgroundRadius: 90 + colorSet: CallStyle.buttons.hangup + + onClicked: call.terminate() + } + } + */ + } +} diff --git a/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml b/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml index a56c53545..d706fda24 100644 --- a/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml +++ b/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml @@ -216,13 +216,13 @@ DialogPlus { Layout.preferredHeight: 50 Layout.preferredWidth: 50 Layout.alignment: Qt.AlignCenter - username: $modelData.username - image:$modelData.avatar + username: modelData.username + image:modelData.avatar Icon{ property int securityLevel : 2 anchors.top:parent.top anchors.horizontalCenter: parent.right - visible: UtilsCpp.hasCapability($modelData.sipAddress, LinphoneEnums.FriendCapabilityLimeX3Dh) + visible: UtilsCpp.hasCapability(modelData.sipAddress, LinphoneEnums.FriendCapabilityLimeX3Dh) icon: 'secure_on' iconSize: parent.height/2 } @@ -233,7 +233,7 @@ DialogPlus { Layout.alignment: Qt.AlignVCenter | Qt.AlignTop maximumLineCount: 5 wrapMode:Text.Wrap - text: $modelData.username + text: modelData.username verticalAlignment: Text.AlignTop horizontalAlignment: Text.AlignHCenter @@ -251,11 +251,11 @@ DialogPlus { anchors.topMargin: -5 color:'white' opacity: 0.5 - visible: smartSearchBar.isIgnored($modelData.sipAddress) + visible: smartSearchBar.isIgnored(modelData.sipAddress) Connections{// Workaround for refreshing data on events target:lastContacts onReloadCountChanged: { - mask.visible=smartSearchBar.isIgnored($modelData.sipAddress) + mask.visible=smartSearchBar.isIgnored(modelData.sipAddress) } } } @@ -263,8 +263,8 @@ DialogPlus { anchors.fill:parent visible:!mask.visible onClicked: { - selectedParticipants.addAddress($modelData.sipAddress) - smartSearchBar.addAddressToIgnore($modelData.sipAddress); + selectedParticipants.addAddress(modelData.sipAddress) + smartSearchBar.addAddressToIgnore(modelData.sipAddress); ++lastContacts.reloadCount } } diff --git a/linphone-app/ui/views/App/Settings/Dialogs/SettingsVideoPreview.qml b/linphone-app/ui/views/App/Settings/Dialogs/SettingsVideoPreview.qml index ebdd70e64..8960778fa 100644 --- a/linphone-app/ui/views/App/Settings/Dialogs/SettingsVideoPreview.qml +++ b/linphone-app/ui/views/App/Settings/Dialogs/SettingsVideoPreview.qml @@ -24,40 +24,47 @@ DialogPlus { width: SettingsVideoPreviewStyle.width // --------------------------------------------------------------------------- + Item{ + anchors.fill: parent + CameraView{ + id: previewLoader + anchors.centerIn: parent + height: parent.height + width: height + } + } + + + /* Loader{ id: previewLoader anchors.fill: parent sourceComponent: Item{ anchors.fill: parent - Rectangle{ id: showArea anchors.fill: parent - radius: 50 + radius: 10 visible:false color: 'red' } - Rectangle{ - id: test - anchors.fill: parent - visible:false - color: 'green' - } CameraPreview { id: camera anchors.fill: parent - onRequestNewRenderer: previewLoader.active = false + onRequestNewRenderer: {previewLoader.active = false;previewLoader.active = true} visible: false } OpacityMask{ - anchors.fill: camera + anchors.fill: parent source: camera maskSource: showArea - invert:false - - visible: true - rotation: 180 + transform: Matrix4x4 {// 180 rotation + mirror + matrix: Qt.matrix4x4(-Math.cos(Math.PI), -Math.sin(Math.PI), 0, 0, + Math.sin(Math.PI), Math.cos(Math.PI), 0, camera.height, + 0, 0, 1, 0, + 0, 0, 0, 1) + } } } active: true @@ -65,5 +72,5 @@ DialogPlus { console.log("Active changed : " +active) if(!active) active = true } - } + }*/ } diff --git a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml index 3aadd2740..d5a37cd3a 100644 --- a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml @@ -12,7 +12,7 @@ QtObject { property QtObject title: QtObject { property color color: ColorsList.add(sectionName+'_title', 'q').color - property int pointSize: Units.dp * 11 + property int pointSize: Units.dp * 12 } property QtObject grid: QtObject { @@ -24,7 +24,9 @@ QtObject { property int width: 154 property QtObject contactDescription: QtObject { - property int height: 35 + property color color: ColorsList.add(sectionName+'_username', 'q').color + property int pointSize: Units.dp * 12 + property int weight: Font.Bold } } } diff --git a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml new file mode 100644 index 000000000..e483817f6 --- /dev/null +++ b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml @@ -0,0 +1,472 @@ +pragma Singleton +import QtQml 2.2 + +import Units 1.0 +import ColorsList 1.0 + +// ============================================================================= + +QtObject { + property string sectionName: 'WaitingRoom' + property color backgroundColor: ColorsList.add(sectionName+'_description', '', '', '#798791').color + + property QtObject title: QtObject { + property color color: ColorsList.add(sectionName+'_title', 'q').color + property int pointSize: Units.dp * 12 + } + + + + + + /* + property QtObject grid: QtObject { + property int spacing: 5 + + property QtObject cell: QtObject { + property int height: 145 + property int spacing: 5 + property int width: 154 + + property QtObject contactDescription: QtObject { + property color color: ColorsList.add(sectionName+'_username', 'q').color + property int pointSize: Units.dp * 12 + property int weight: Font.Bold + } + } + } + property QtObject actionArea: QtObject { + property int height: 100 + property int iconSize: 40 + property int leftButtonsGroupMargin: 50 + property int lowWidth: 650 + property int rightButtonsGroupMargin: 50 + + property QtObject userVideo: QtObject { + property int height: 200 + property int width: 130 + property int heightReference: 1200 // height and width are fixed from these references + property int widthReference: 780 + } + + property QtObject vu: QtObject { + property int spacing: 5 + } + + property QtObject callError: QtObject { + property color color: ColorsList.add(sectionName+'_action_error', 'i').color + property int pointSize: Units.dp * 12 + } + } + + property QtObject container: QtObject { + property int margins: 15 + + property QtObject avatar: QtObject { + property color backgroundColor: ColorsList.add(sectionName+'_container_avatar_bg', 'n').color + property int maxSize: 300 + } + + property QtObject pause: QtObject { + property color color: ColorsList.add(sectionName+'_container_pause', 'g90').color + + property QtObject text: QtObject { + property color color: ColorsList.add(sectionName+'_container_pause_text', 'q').color + property int pointSizeFactor: 5 + } + } + } + + property QtObject header: QtObject { + property int buttonIconSize: 40 + property int iconSize: 16 + property int leftMargin: 20 + property int rightMargin: 20 + property int spacing: 10 + property int topMargin: 26 + + property QtObject busyIndicator: QtObject { + property color color: ColorsList.add(sectionName+'_header_busy', 'g').color + property int height: 30 + property int width: 30 + } + + property QtObject contactDescription: QtObject { + property int height: 50 + property int width: 150 + } + + property QtObject elapsedTime: QtObject { + property color color: ColorsList.add(sectionName+'_header_elapsed_time', 'j').color + property int pointSize: Units.dp * 10 + + property QtObject fullscreen: QtObject { + property int pointSize: Units.dp * 12 + } + } + + property QtObject stats: QtObject { + property int relativeY: 90 + } + } + + property QtObject zrtpArea: QtObject { + property int height: 50 + + property QtObject buttons: QtObject { + property int spacing: 10 + } + + property QtObject text: QtObject { + property color colorA: ColorsList.add(sectionName+'_zrtp_text_a', 'j').color + property color colorB: ColorsList.add(sectionName+'_zrtp_text_b', 'i').color + property int pointSize: Units.dp * 10 + property int wordsSpacing: 5 + } + } + */ + // Button colors + property QtObject buttons: QtObject { + property QtObject microOn: QtObject { + property int iconSize: 40 + property string icon : 'micro_on_custom' + property string name : 'microOn' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_h_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_n_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_h_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + property QtObject microOff: QtObject { + property int iconSize: 40 + property string icon : 'micro_off_custom' + property string name : 'microOff' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_h_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_n_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_h_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + property QtObject speakerOn: QtObject { + property int iconSize: 40 + property string icon : 'speaker_on_custom' + property string name : 'speakerOn' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_h_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_n_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_h_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + property QtObject speakerOff: QtObject { + property int iconSize: 40 + property string icon : 'speaker_off_custom' + property string name : 'speakerOff' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_h_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_n_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_h_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + property QtObject cameraOn: QtObject { + property int iconSize: 40 + property string icon : 'camera_on_custom' + property string name : 'cameraOn' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_h_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_n_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_h_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color + } + property QtObject cameraOff: QtObject { + property int iconSize: 40 + property string icon : 'camera_off_custom' + property string name : 'cameraOff' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_h_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_n_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_h_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color + } + property QtObject gridLayout: QtObject { + property int iconSize: 40 + property string icon : 'conference_layout_grid_custom' + property string name : 'gridLayout' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color + } + /* + property QtObject callsList: QtObject { + property int iconSize: 40 + property string name : 'callsList' + property string icon : 'call_menu_custom' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + property QtObject dialpad: QtObject { + property int iconSize: 40 + property string name : 'dialpad' + property string icon : 'dialpad_custom' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + property QtObject screenSharing: QtObject { + property int iconSize: 40 + property string icon : 'screen_sharing_custom' + property string name : 'screenSharing' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color + } + property QtObject recordOn: QtObject { + property int iconSize: 40 + property string icon : 'record_custom' + property string name : 'recordOn' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color + } + property QtObject recordOff: QtObject { + property int iconSize: 40 + property string icon : 'record_custom' + property string name : 'recordOff' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color + } + property QtObject screenshot: QtObject { + property int iconSize: 40 + property string icon : 'screenshot_custom' + property string name : 'screenshot' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color + } + property QtObject fullscreen: QtObject { + property int iconSize: 40 + property string icon : 'fullscreen_custom' + property string name : 'fullscreen' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color + } + property QtObject stopFullscreen: QtObject { + property int iconSize: 40 + property string icon : 'stop_fullscreen_custom' + property string name : 'stopFullscreen' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'sc_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'sc_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'sc_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'sc_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'sc_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'sc_p_b_fg').color + } +//------------------------------------------------------------------------------ + property QtObject secure: QtObject { + property int buttonSize: 40 + property int iconSize: 20 + property string icon : '' + property string name : 'secure' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, '', '', '#66727B').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, '', '', '#66727B').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, '', '', '#66727B').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, '', '', 'transparent').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, '', '', 'transparent').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, '', '', 'transparent').color + } + property QtObject unsecure: QtObject { + property int iconSize: 16 + property string icon : 'call_chat_unsecure_custom' + property string name : 'unsecure' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, '', '', 'transparent').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, '', '', 'transparent').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, '', '', 'transparent').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, '', '', '#ff0000').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, '', '', '#ff0000').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, '', '', '#ff0000').color + } + + property QtObject pause: QtObject { + property int iconSize: 40 + property string icon : 'pause_custom' + property string name : 'pause' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color + } + property QtObject play: QtObject { + property int iconSize: 40 + property string icon : 'play_custom' + property string name : 'play' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_n_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color + } + property QtObject hangup: QtObject { + property int iconSize: 40 + property string icon : 'hangup_custom' + property string name : 'hangup' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'r_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'r_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'r_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'r_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'r_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'r_p_b_fg').color + } +//------------------------------------------------------------------------------ + property QtObject chat: QtObject { + property int iconSize: 40 + property string icon : 'chat_custom' + property string name : 'chat' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_inv_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_inv_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_inv_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_inv_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_inv_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_inv_fg').color + } + property QtObject participants: QtObject { + property int iconSize: 40 + property string icon : 'participants_custom' + property string name : 'participants' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_inv_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_inv_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_inv_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_inv_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_inv_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_inv_fg').color + } + property QtObject callQuality: QtObject { + property int iconSize: 20 + property string name : 'quality' + property string icon : 'call_quality_custom' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_bg').color + property color backgroundDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_d', icon, 'me_d_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_fg').color + property color foregroundDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_d', icon, 'me_d_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_fg').color + + property color backgroundHiddenPartNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_bg_n', icon, 'me_n_b_inv_bg').color + property color backgroundHiddenPartDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_bg_d', icon, 'me_d_b_inv_bg').color + property color backgroundHiddenPartHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_bg_h', icon, 'me_h_b_inv_bg').color + property color backgroundHiddenPartPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_bg_p', icon, 'me_p_b_inv_bg').color + property color foregroundHiddenPartNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_fg_n', icon, 'me_n_b_inv_fg').color + property color foregroundHiddenPartDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_fg_d', icon, 'me_d_b_inv_fg').color + property color foregroundHiddenPartHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_fg_h', icon, 'me_h_b_inv_fg').color + property color foregroundHiddenPartPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_hidden_fg_p', icon, 'me_p_b_inv_fg').color + } + property QtObject options: QtObject { + property int iconSize: 40 + property string icon : 'options_custom' + property string name : 'options' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_inv_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_inv_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_inv_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_inv_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_inv_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_inv_fg').color + } +//------------------------------------------------------------------------------ + property QtObject closePreview: QtObject { + property int iconSize: 40 + property string icon : 'close_custom' + property string name : 'close_preview' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_inv_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_inv_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'me_p_b_inv_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'me_n_b_inv_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'me_h_b_inv_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'me_p_b_inv_fg').color + } +//------------------------------------------------------------------------------ + + + property QtObject history: QtObject { + property int iconSize: 40 + property string icon : 'history_custom' + property string name : 'history' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + } + + + property QtObject acceptVideoCall: QtObject { + property int iconSize: 40 + property string icon : 'video_call_accept_custom' + property string name : 'videoCallAccept' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'a_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'a_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'a_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'a_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'a_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'a_p_b_fg').color + } + property QtObject acceptCall: QtObject { + property int iconSize: 40 + property string icon : 'call_accept_custom' + property string name : 'callAccept' + property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'a_n_b_bg').color + property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'a_h_b_bg').color + property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'a_p_b_bg').color + property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'a_n_b_fg').color + property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'a_h_b_fg').color + property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'a_p_b_fg').color + } + */ + } +} diff --git a/linphone-app/ui/views/App/Styles/qmldir b/linphone-app/ui/views/App/Styles/qmldir index 834213e25..0862d1391 100644 --- a/linphone-app/ui/views/App/Styles/qmldir +++ b/linphone-app/ui/views/App/Styles/qmldir @@ -9,6 +9,7 @@ module App.Styles singleton CallFullscreenStyle 1.0 Calls/CallFullscreenStyle.qml singleton CallStyle 1.0 Calls/CallStyle.qml singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml +singleton WaitingRoomStyle 1.0 Calls/WaitingRoomStyle.qml singleton ConferenceStyle 1.0 Calls/ConferenceStyle.qml singleton VideoConferenceStyle 1.0 Calls/VideoConferenceStyle.qml diff --git a/linphone-sdk b/linphone-sdk index 9791a5bc6..e1f89e97b 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 9791a5bc6cdce83db83c11af9b4c0e29bf9805a5 +Subproject commit e1f89e97bc75f297a5cb485e4ae91e0c81fa9add