diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt
index 1153d3405..557fa1b34 100644
--- a/linphone-app/CMakeLists.txt
+++ b/linphone-app/CMakeLists.txt
@@ -153,7 +153,6 @@ set(SOURCES
src/components/calls/CallsListProxyModel.cpp
src/components/camera/Camera.cpp
src/components/camera/CameraDummy.cpp
- src/components/camera/CameraPreview.cpp
src/components/chat/ChatModel.cpp
src/components/chat-events/ChatCallModel.cpp
src/components/chat-events/ChatEvent.cpp
@@ -172,7 +171,6 @@ set(SOURCES
src/components/conference/ConferenceModel.cpp
src/components/conference/ConferenceProxyModel.cpp
src/components/conferenceInfo/ConferenceInfoModel.cpp
- src/components/conferenceInfo/ConferenceInfoListModel.cpp
src/components/conferenceInfo/ConferenceInfoMapModel.cpp
src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp
src/components/conferenceInfo/ConferenceInfoProxyModel.cpp
@@ -287,7 +285,6 @@ set(HEADERS
src/components/calls/CallsListProxyModel.hpp
src/components/camera/Camera.hpp
src/components/camera/CameraDummy.hpp
- src/components/camera/CameraPreview.hpp
src/components/chat/ChatModel.hpp
src/components/chat-events/ChatCallModel.hpp
src/components/chat-events/ChatEvent.hpp
@@ -307,7 +304,6 @@ set(HEADERS
src/components/conference/ConferenceModel.hpp
src/components/conference/ConferenceProxyModel.hpp
src/components/conferenceInfo/ConferenceInfoModel.hpp
- src/components/conferenceInfo/ConferenceInfoListModel.hpp
src/components/conferenceInfo/ConferenceInfoMapModel.hpp
src/components/conferenceInfo/ConferenceInfoProxyListModel.hpp
src/components/conferenceInfo/ConferenceInfoProxyModel.hpp
diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc
index 70f03291f..320a3ef38 100644
--- a/linphone-app/resources.qrc
+++ b/linphone-app/resources.qrc
@@ -416,7 +416,6 @@
ui/views/App/Calls/Dialogs/CallSipAddress.qml
ui/views/App/Calls/Dialogs/CallTransfer.qml
ui/views/App/Calls/Dialogs/ConferenceManager.qml
- ui/views/App/Calls/Dialogs/MultimediaParameters.qml
ui/views/App/Calls/EndedCall.qml
ui/views/App/Calls/IncallFullscreenWindow.qml
ui/views/App/Calls/Incall.js
@@ -490,7 +489,6 @@
ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml
ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml
ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml
- ui/views/App/Styles/Calls/Dialogs/MultimediaParametersStyle.qml
ui/views/App/Styles/Dialog/NewConferenceStyle.qml
ui/views/App/Styles/Main/Assistant/ActivateAppSipAccountWithEmailStyle.qml
ui/views/App/Styles/Main/Assistant/ActivateAppSipAccountWithPhoneNumberStyle.qml
diff --git a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp
index b1dda3fd7..11487569c 100644
--- a/linphone-app/src/app/App.cpp
+++ b/linphone-app/src/app/App.cpp
@@ -628,7 +628,6 @@ void App::registerTypes () {
registerType("AuthenticationNotifier");
registerType("CallsListProxyModel");
registerType("Camera");
- registerType("CameraPreview");
registerType("ChatRoomProxyModel");
registerType("ConferenceHelperModel");
registerType("ConferenceProxyModel");
@@ -673,7 +672,6 @@ void App::registerTypes () {
registerUncreatableType("ImageModel");
registerUncreatableType("ConferenceAddModel");
registerUncreatableType("ConferenceModel");
- registerUncreatableType("ConferenceInfoListModel");
registerUncreatableType("ContactModel");
registerUncreatableType("ContactsImporterModel");
registerUncreatableType("ContentModel");
diff --git a/linphone-app/src/app/proxyModel/ProxyAbstractMapModel.hpp b/linphone-app/src/app/proxyModel/ProxyAbstractMapModel.hpp
index 3e8ffc2a0..93ebb90ba 100644
--- a/linphone-app/src/app/proxyModel/ProxyAbstractMapModel.hpp
+++ b/linphone-app/src/app/proxyModel/ProxyAbstractMapModel.hpp
@@ -46,6 +46,7 @@ public:
roles[Qt::DisplayRole+1] = "$modelKey";
return roles;
}
+
virtual QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override{
int row = index.row();
auto it = mMappedList.begin() + row;
@@ -57,50 +58,6 @@ public:
return QVariant();
}
- /*
- virtual Y getAt(const int& index) const{
-
- mList.
- return mList[index];
- }*/
-
-// Add functions
-/*
- virtual void add(T item){
- int row = mList.count();
- beginInsertRows(QModelIndex(), row, row);
- mList << item;
- endInsertRows();
- }
-
- virtual void prepend(T item){
- beginInsertRows(QModelIndex(), 0, 0);
- mList.prepend(item);
- endInsertRows();
- }
-
- virtual void prepend(QList items){
- beginInsertRows(QModelIndex(), 0, items.size()-1);
- items << mList;
- mList = items;
- endInsertRows();
- }
-
-// Remove functions
- virtual bool removeRow (int row, const QModelIndex &parent = QModelIndex()){
- return removeRows(row, 1, parent);
- }
- virtual bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex()) override{
- int limit = row + count - 1;
- if (row < 0 || count < 0 || limit >= mList.count())
- return false;
- beginRemoveRows(parent, row, limit);
- for (int i = 0; i < count; ++i)
- mList.takeAt(row);
- endRemoveRows();
- return true;
- }
- */
virtual void resetData() override{
beginResetModel();
mMappedList.clear();
diff --git a/linphone-app/src/app/proxyModel/ProxyListModel.cpp b/linphone-app/src/app/proxyModel/ProxyListModel.cpp
index 4161922e2..c2152547b 100644
--- a/linphone-app/src/app/proxyModel/ProxyListModel.cpp
+++ b/linphone-app/src/app/proxyModel/ProxyListModel.cpp
@@ -43,20 +43,3 @@ QSharedPointer ProxyListModel::get(QObject * itemToGet, int * index) co
}
// -----------------------------------------------------------------------------
-/*
-bool ProxyListModel::remove(QObject *itemToRemove) {
- bool removed = false;
- qInfo() << QStringLiteral("Removing ") << itemToRemove->metaObject()->className() << QStringLiteral(" : ") << itemToRemove;
- int index = 0;
- for(auto item : mList)
- if( item.get() == itemToRemove) {
- removed = removeRow(index);
- break;
- }else
- ++index;
- if( !removed)
- qWarning() << QStringLiteral("Unable to remove ") << itemToRemove->metaObject()->className() << QStringLiteral(" : ") << itemToRemove;
- return removed;
-}*/
-
-// -----------------------------------------------------------------------------
diff --git a/linphone-app/src/app/proxyModel/ProxyModel.hpp b/linphone-app/src/app/proxyModel/ProxyModel.hpp
index 0ebe9d3fa..d85e950b8 100644
--- a/linphone-app/src/app/proxyModel/ProxyModel.hpp
+++ b/linphone-app/src/app/proxyModel/ProxyModel.hpp
@@ -41,9 +41,9 @@ public:
Q_INVOKABLE QVariant getAt(int row);
QAbstractItemModel *getModel();
+
void setModel(QAbstractItemModel * model);
- //void add(std::shared_ptr model);
public slots:
void add(std::shared_ptr model);
diff --git a/linphone-app/src/components/Components.hpp b/linphone-app/src/components/Components.hpp
index a8618b035..52268068a 100644
--- a/linphone-app/src/components/Components.hpp
+++ b/linphone-app/src/components/Components.hpp
@@ -27,7 +27,6 @@
#include "calls/CallsListModel.hpp"
#include "calls/CallsListProxyModel.hpp"
#include "camera/Camera.hpp"
-#include "camera/CameraPreview.hpp"
#include "components/chat-events/ChatCallModel.hpp"
#include "components/chat-events/ChatMessageModel.hpp"
#include "components/chat-events/ChatNoticeModel.hpp"
@@ -38,7 +37,6 @@
#include "conference/ConferenceModel.hpp"
#include "conference/ConferenceProxyModel.hpp"
#include "conferenceInfo/ConferenceInfoModel.hpp"
-#include "conferenceInfo/ConferenceInfoListModel.hpp"
#include "conferenceInfo/ConferenceInfoProxyModel.hpp"
#include "conferenceScheduler/ConferenceScheduler.hpp"
#include "contact/ContactModel.hpp"
diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp
index 17296d54d..41e17cc50 100644
--- a/linphone-app/src/components/call/CallModel.cpp
+++ b/linphone-app/src/components/call/CallModel.cpp
@@ -430,7 +430,7 @@ void CallModel::handleCallStateChanged (const shared_ptr &call,
break;
case linphone::Call::State::UpdatedByRemote:
- qWarning() << "UpdatedByRemote :" << (mCall ? mCall->getCurrentParams()->videoEnabled() + QString(" ")+mCall->getRemoteParams()->videoEnabled() : " call NULL");
+ qDebug() << "UpdatedByRemote : " << (mCall ? QString( "Video enabled ? CurrentParams:") + mCall->getCurrentParams()->videoEnabled() + QString(", RemoteParams:")+mCall->getRemoteParams()->videoEnabled() : " call NULL");
if (mCall && !mCall->getCurrentParams()->videoEnabled() && mCall->getRemoteParams()->videoEnabled()) {
mCall->deferUpdate();
emit videoRequested();
@@ -448,6 +448,7 @@ void CallModel::handleCallStateChanged (const shared_ptr &call,
case linphone::Call::State::Updating:
case linphone::Call::State::EarlyUpdatedByRemote:
case linphone::Call::State::EarlyUpdating:
+ case linphone::Call::State::PushIncomingReceived:
break;
}
@@ -712,9 +713,7 @@ bool CallModel::getRemoteVideoEnabled () const {
bool CallModel::getVideoEnabled () const {
if(mCall){
shared_ptr params = mCall->getCurrentParams();
- bool t = params && params->videoEnabled();// && getStatus() == CallStatusConnected && mCall->getState() == linphone::Call::State::StreamsRunning;
- qWarning() << t << " => " << (params && params->videoEnabled()) << ", " << (int)getStatus() << ", " << (int)mCall->getState();
- return t;
+ return params && params->videoEnabled();
}else
return true;
}
diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp
index a15cdffd2..ef6a64e25 100644
--- a/linphone-app/src/components/calls/CallsListModel.cpp
+++ b/linphone-app/src/components/calls/CallsListModel.cpp
@@ -198,7 +198,7 @@ void CallsListModel::launchVideoCall (const QString &sipAddress, const QString&
auto call = core->inviteAddressWithParams(address, params);
call->setSpeakerMuted(!enableSpeaker);
- qWarning() << "Launch " << (enableVideo ? "video" : "audio") << " call; camera: " << enableCamera<< " speaker:" << enableSpeaker << ", micro:" << params->micEnabled() << ", layout:" << (int)layout;
+ qInfo() << "Launch " << (enableVideo ? "video" : "audio") << " call; camera: " << enableCamera<< " speaker:" << enableSpeaker << ", micro:" << params->micEnabled() << ", layout:" << (int)layout;
CallModel::prepareTransfert(call, prepareTransfertAddress);
}
@@ -374,18 +374,6 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se
return result;
}
-QVariantMap CallsListModel::createConference(ConferenceInfoModel * conferenceInfo, const int& securityLevel, const int& inviteMode, const bool& selectAfterCreation) {
- QVariantMap result;
- CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = selectAfterCreation;
- shared_ptr core = CoreManager::getInstance()->getCore();
- std::shared_ptr conference;
- QList< std::shared_ptr> admins;
- auto timelineList = CoreManager::getInstance()->getTimelineListModel();
- qInfo() << "Conference creation of " << conferenceInfo->getSubject() << " at " << securityLevel << " security";// and with " << conferenceInfo->getConferenceInfo()->getParticipants().size();
- auto conferenceScheduler = core->createConferenceScheduler();
- conferenceScheduler->setInfo(conferenceInfo->getConferenceInfo());
- return result;
-}
void CallsListModel::prepareConferenceCall(ConferenceInfoModel * model){
auto app = App::getInstance();
diff --git a/linphone-app/src/components/calls/CallsListModel.hpp b/linphone-app/src/components/calls/CallsListModel.hpp
index 1b5c91f92..6635c8674 100644
--- a/linphone-app/src/components/calls/CallsListModel.hpp
+++ b/linphone-app/src/components/calls/CallsListModel.hpp
@@ -55,8 +55,6 @@ public:
QVariantMap createChatRoom(const QString& subject, const int& securityLevel, std::shared_ptr localAddress, const QVariantList& participants, const bool& selectAfterCreation) const;
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);
diff --git a/linphone-app/src/components/camera/Camera.cpp b/linphone-app/src/components/camera/Camera.cpp
index 5b0ab8cf9..4226d8f75 100644
--- a/linphone-app/src/components/camera/Camera.cpp
+++ b/linphone-app/src/components/camera/Camera.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ * Copyright (c) 2010-2022 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -61,7 +61,7 @@ Camera::Camera (QQuickItem *parent) : QQuickFramebufferObject(parent) {
}
Camera::~Camera(){
- qWarning() << "Camera destructor" << this;
+ qDebug() << "Camera destructor" << this;
if(mIsPreview)
deactivatePreview();
setWindowIdLocation(None);
@@ -97,7 +97,7 @@ void Camera::resetWindowId() const{
if(oldRenderer)
CoreManager::getInstance()->getCore()->setNativeVideoWindowId(NULL);
}
- qWarning() << "Removed " << oldRenderer << " at " << mWindowIdLocation << " for " << this;
+ qDebug() << "Removed " << oldRenderer << " at " << mWindowIdLocation << " for " << this;
mIsWindowIdSet = false;
}
}
@@ -141,14 +141,14 @@ QQuickFramebufferObject::Renderer *Camera::createRenderer () const {
QQuickFramebufferObject::Renderer * renderer = NULL;
if(mWindowIdLocation == CorePreview){
- qWarning() << "Setting Camera to Preview";
+ qDebug() << "Setting Camera to Preview";
renderer=(QQuickFramebufferObject::Renderer *)CoreManager::getInstance()->getCore()->createNativePreviewWindowId();
if(renderer)
CoreManager::getInstance()->getCore()->setNativePreviewWindowId(renderer);
}else if(mWindowIdLocation == Call){
auto call = mCallModel->getCall();
if(call){
- qWarning() << "Setting Camera to CallModel";
+ qDebug() << "Setting Camera to CallModel";
renderer = (QQuickFramebufferObject::Renderer *) call->createNativeVideoWindowId();
if(renderer)
call->setNativeVideoWindowId(renderer);
@@ -156,14 +156,14 @@ QQuickFramebufferObject::Renderer *Camera::createRenderer () const {
}else if( mWindowIdLocation == Device) {
auto participantDevice = mParticipantDeviceModel->getDevice();
if(participantDevice){
- qWarning() << "Setting Camera to Participant Device";
- qWarning() << "Trying to create new window ID for " << participantDevice->getName().c_str() << ", addr=" << participantDevice->getAddress()->asString().c_str();
+ qDebug() << "Setting Camera to Participant Device";
+ qDebug() << "Trying to create new window ID for " << participantDevice->getName().c_str() << ", addr=" << participantDevice->getAddress()->asString().c_str();
renderer = (QQuickFramebufferObject::Renderer *) participantDevice->createNativeVideoWindowId();
if(renderer)
participantDevice->setNativeVideoWindowId(renderer);
}
}else if( mWindowIdLocation == Core){
- qWarning() << "Setting Camera to Default Window";
+ qDebug() << "Setting Camera to Default Window";
renderer = (QQuickFramebufferObject::Renderer *) CoreManager::getInstance()->getCore()->createNativeVideoWindowId();
if(renderer)
CoreManager::getInstance()->getCore()->setNativeVideoWindowId(renderer);
@@ -176,7 +176,7 @@ QQuickFramebufferObject::Renderer *Camera::createRenderer () const {
}else{
mIsWindowIdSet = true;
- qWarning() << "Added " << renderer << " at " << mWindowIdLocation << " for " << this;
+ qDebug() << "Added " << renderer << " at " << mWindowIdLocation << " for " << this;
QTimer::singleShot(1, this, &Camera::isReady);// Workaround for const createRenderer
}
return renderer;
diff --git a/linphone-app/src/components/camera/CameraPreview.cpp b/linphone-app/src/components/camera/CameraPreview.cpp
deleted file mode 100644
index 7e253a5ca..000000000
--- a/linphone-app/src/components/camera/CameraPreview.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2010-2020 Belledonne Communications SARL.
- *
- * This file is part of linphone-desktop
- * (see https://www.linphone.org).
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include
-#include
-#include
-#include
-
-#include "components/core/CoreManager.hpp"
-
-#include "CameraPreview.hpp"
-#include "CameraDummy.hpp"
-
-// =============================================================================
-
-using namespace std;
-
-namespace {
-constexpr int MaxFps = 30;
-}
-// -----------------------------------------------------------------------------
-
-QMutex CameraPreview::mCounterMutex;
-int CameraPreview::mCounter;
-
-// -----------------------------------------------------------------------------
-
-CameraPreview::CameraPreview (QQuickItem *parent) : QQuickFramebufferObject(parent) {
- mCounterMutex.lock();
- if (++mCounter == 1)
- CoreManager::getInstance()->getCore()->enableVideoPreview(true);
- mCounterMutex.unlock();
-
- setTextureFollowsItemSize(true);
- // The fbo content must be y-mirrored because the ms rendering is y-inverted.
- setMirrorVertically(true);
-
- mRefreshTimer = new QTimer(this);
- mRefreshTimer->setInterval(1000 / MaxFps);
-
- QObject::connect(
- mRefreshTimer, &QTimer::timeout,
- this, &QQuickFramebufferObject::update,
- Qt::DirectConnection
- );
-
- mRefreshTimer->start();
-}
-
-CameraPreview::~CameraPreview () {
- auto core = CoreManager::getInstance()->getCore();
- if(core){
- mCounterMutex.lock();
- if (--mCounter == 0)
- core->enableVideoPreview(false);
- mCounterMutex.unlock();
- core->setNativePreviewWindowId(NULL);
- }
-}
-
-QQuickFramebufferObject::Renderer *CameraPreview::createRenderer () const {
- QQuickFramebufferObject::Renderer * renderer = (QQuickFramebufferObject::Renderer *)CoreManager::getInstance()->getCore()->getNativePreviewWindowId();
- if(renderer)
- CoreManager::getInstance()->getCore()->setNativePreviewWindowId(NULL);// Reset
- renderer = (QQuickFramebufferObject::Renderer *) CoreManager::getInstance()->getCore()->createNativePreviewWindowId();
- if( !renderer ) {
- qWarning() << "Preview stream couldn't start for Rendering. Retrying in 1s";
- renderer = new CameraDummy();
- QTimer::singleShot(1000, this, &CameraPreview::requestNewRenderer);
- }else
- CoreManager::getInstance()->getCore()->setNativePreviewWindowId(renderer);
- return renderer;
-}
diff --git a/linphone-app/src/components/camera/CameraPreview.hpp b/linphone-app/src/components/camera/CameraPreview.hpp
deleted file mode 100644
index 3411d5e0b..000000000
--- a/linphone-app/src/components/camera/CameraPreview.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2010-2020 Belledonne Communications SARL.
- *
- * This file is part of linphone-desktop
- * (see https://www.linphone.org).
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef CAMERA_PREVIEW_H_
-#define CAMERA_PREVIEW_H_
-
-#include
-#include
-
-// =============================================================================
-
-class CameraPreview : public QQuickFramebufferObject {
- Q_OBJECT
-
-public:
- CameraPreview (QQuickItem *parent = Q_NULLPTR);
- ~CameraPreview ();
-
- QQuickFramebufferObject::Renderer *createRenderer () const override;
-
-signals:
- void requestNewRenderer();
-
-private:
- QTimer *mRefreshTimer = nullptr;
-
- static QMutex mCounterMutex;
- static int mCounter;
-};
-
-#endif // CAMERA_PREVIEW_H_
diff --git a/linphone-app/src/components/chat-events/ChatCallModel.cpp b/linphone-app/src/components/chat-events/ChatCallModel.cpp
index 64c633092..8d155b000 100644
--- a/linphone-app/src/components/chat-events/ChatCallModel.cpp
+++ b/linphone-app/src/components/chat-events/ChatCallModel.cpp
@@ -47,7 +47,6 @@ QSharedPointer ChatCallModel::create(std::shared_ptr::create(callLog, isStart, parent);
if(model ){
model->update();
- model->mSelf = model;
return model;
}else
return nullptr;
diff --git a/linphone-app/src/components/chat-events/ChatCallModel.hpp b/linphone-app/src/components/chat-events/ChatCallModel.hpp
index bd4410e7f..32021a2ca 100644
--- a/linphone-app/src/components/chat-events/ChatCallModel.hpp
+++ b/linphone-app/src/components/chat-events/ChatCallModel.hpp
@@ -62,7 +62,6 @@ signals:
private:
std::shared_ptr mCallLog;
- QWeakPointer mSelf; // Used to pass to functions that need a shared_ptr
};
Q_DECLARE_METATYPE(QSharedPointer)
Q_DECLARE_METATYPE(ChatCallModel*)
diff --git a/linphone-app/src/components/chat-events/ChatNoticeModel.cpp b/linphone-app/src/components/chat-events/ChatNoticeModel.cpp
index 9b8142b82..bb3746327 100644
--- a/linphone-app/src/components/chat-events/ChatNoticeModel.cpp
+++ b/linphone-app/src/components/chat-events/ChatNoticeModel.cpp
@@ -50,7 +50,6 @@ ChatNoticeModel::~ChatNoticeModel(){
QSharedPointer ChatNoticeModel::create(std::shared_ptr eventLog, QObject * parent){
auto model = QSharedPointer::create(eventLog, parent);
if(model && model->update()){
- model->mSelf = model;
return model;
}else
return nullptr;
@@ -59,7 +58,6 @@ QSharedPointer ChatNoticeModel::create(std::shared_ptr ChatNoticeModel::create(NoticeType noticeType, const QDateTime& timestamp, const QString& txt, QObject * parent){
auto model = QSharedPointer::create(noticeType, timestamp, txt, parent);
if(model ){
- model->mSelf = model;
return model;
}else
return nullptr;
diff --git a/linphone-app/src/components/chat-events/ChatNoticeModel.hpp b/linphone-app/src/components/chat-events/ChatNoticeModel.hpp
index fd5d1d8f9..03c889a41 100644
--- a/linphone-app/src/components/chat-events/ChatNoticeModel.hpp
+++ b/linphone-app/src/components/chat-events/ChatNoticeModel.hpp
@@ -70,7 +70,6 @@ signals:
private:
std::shared_ptr mEventLog;
- QWeakPointer mSelf; // Used to pass to functions that need a shared_ptr
};
Q_DECLARE_METATYPE(QSharedPointer)
diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.hpp b/linphone-app/src/components/chat-room/ChatRoomModel.hpp
index 44f69722d..b4d9480d0 100644
--- a/linphone-app/src/components/chat-room/ChatRoomModel.hpp
+++ b/linphone-app/src/components/chat-room/ChatRoomModel.hpp
@@ -285,8 +285,6 @@ private:
void handleCallStateChanged (const std::shared_ptr &call, linphone::Call::State state);
void handleCallCreated(const std::shared_ptr &call);// Count an event call
void handlePresenceStatusReceived(std::shared_ptr contact);
- //void handleIsComposingChanged (const std::shared_ptr &chatRoom);
- //void handleMessageReceived (const std::shared_ptr &message);
std::shared_ptr mChatRoom;
std::shared_ptr mChatRoomListener; // This need to be a shared_ptr because of adding it to linphone
diff --git a/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp b/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp
index 03d7be04e..ef59ddebb 100644
--- a/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp
+++ b/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ * Copyright (c) 2010-2022 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -180,27 +180,25 @@ bool ChatRoomProxyModel::lessThan (const QModelIndex &left, const QModelIndex &r
// -----------------------------------------------------------------------------
QString ChatRoomProxyModel::getPeerAddress () const {
- return mChatRoomModel ? mChatRoomModel->getPeerAddress() : mPeerAddress;//QString("");
+ return mChatRoomModel ? mChatRoomModel->getPeerAddress() : mPeerAddress;
}
void ChatRoomProxyModel::setPeerAddress (const QString &peerAddress) {
mPeerAddress = peerAddress;
emit peerAddressChanged(mPeerAddress);
- //reload();
}
QString ChatRoomProxyModel::getLocalAddress () const {
- return mChatRoomModel ? mChatRoomModel->getLocalAddress() : mLocalAddress;//QString("");
+ return mChatRoomModel ? mChatRoomModel->getLocalAddress() : mLocalAddress;
}
void ChatRoomProxyModel::setLocalAddress (const QString &localAddress) {
mLocalAddress = localAddress;
emit localAddressChanged(mLocalAddress);
- //reload();
}
QString ChatRoomProxyModel::getFullPeerAddress () const {
- return mChatRoomModel ? mChatRoomModel->getFullPeerAddress() : mFullPeerAddress;//QString("");
+ return mChatRoomModel ? mChatRoomModel->getFullPeerAddress() : mFullPeerAddress;
}
void ChatRoomProxyModel::setFullPeerAddress (const QString &peerAddress) {
@@ -209,7 +207,7 @@ void ChatRoomProxyModel::setFullPeerAddress (const QString &peerAddress) {
}
QString ChatRoomProxyModel::getFullLocalAddress () const {
- return mChatRoomModel ? mChatRoomModel->getFullLocalAddress() : mFullLocalAddress;//QString("");
+ return mChatRoomModel ? mChatRoomModel->getFullLocalAddress() : mFullLocalAddress;
}
void ChatRoomProxyModel::setFullLocalAddress (const QString &localAddress) {
@@ -268,7 +266,6 @@ void ChatRoomProxyModel::reload (ChatRoomModel *chatRoomModel) {
mChatRoomModel->initEntries();// This way, we don't load huge chat rooms (that lead to freeze GUI)
}
}
- //invalidate();
}
void ChatRoomProxyModel::resetMessageCount(){
@@ -341,7 +338,6 @@ void ChatRoomProxyModel::handleMessageReceived (const shared_ptrisActive())
mChatRoomModel->resetMessageCount();
- //else if( message->getFromAddress()->weakEqual(CoreManager::getInstance()->getCore()->getDefaultAccount()->getParams()->getIdentityAddress()))
}
}
diff --git a/linphone-app/src/components/chat-room/ChatRoomProxyModel.hpp b/linphone-app/src/components/chat-room/ChatRoomProxyModel.hpp
index c8b5111ef..225331817 100644
--- a/linphone-app/src/components/chat-room/ChatRoomProxyModel.hpp
+++ b/linphone-app/src/components/chat-room/ChatRoomProxyModel.hpp
@@ -38,12 +38,8 @@ class ChatRoomProxyModel : public QSortFilterProxyModel {
Q_PROPERTY(QString localAddress READ getLocalAddress WRITE setLocalAddress NOTIFY localAddressChanged)
Q_PROPERTY(QString fullPeerAddress READ getFullPeerAddress WRITE setFullPeerAddress NOTIFY fullPeerAddressChanged)
Q_PROPERTY(QString fullLocalAddress READ getFullLocalAddress WRITE setFullLocalAddress NOTIFY fullLocalAddressChanged)
- //Q_PROPERTY(int isSecure READ isSecure WRITE setIsSecure NOTIFY isSecureChanged)
Q_PROPERTY(ChatRoomModel *chatRoomModel READ getChatRoomModel WRITE setChatRoomModel NOTIFY chatRoomModelChanged)
- //Q_PROPERTY(bool isSecure MEMBER mIsSecure NOTIFY isSecureChanged)
- //Q_PROPERTY(bool isRemoteComposing READ getIsRemoteComposing NOTIFY isRemoteComposingChanged)
Q_PROPERTY(QList composers READ getComposers NOTIFY isRemoteComposingChanged)
- //Q_PROPERTY(bool isSecure READ getIsSecure NOTIFY isSecureChanged)
Q_PROPERTY(QString cachedText READ getCachedText)
Q_PROPERTY(QString filterText MEMBER mFilterText WRITE setFilterText NOTIFY filterTextChanged)
@@ -54,6 +50,7 @@ public:
int getEntryTypeFilter ();
Q_INVOKABLE void setEntryTypeFilter (int type);
+ Q_INVOKABLE void setFilterText(const QString& text);
Q_INVOKABLE QString getDisplayNameComposers()const;
Q_INVOKABLE QVariant getAt(int row);
@@ -66,15 +63,10 @@ public:
Q_INVOKABLE void removeRow (int index);
Q_INVOKABLE void sendMessage (const QString &message);
-
Q_INVOKABLE void forwardMessage(ChatMessageModel * model);
-
Q_INVOKABLE void compose (const QString& text);
-
Q_INVOKABLE void resetMessageCount();
- Q_INVOKABLE void setFilterText(const QString& text);
-
Q_INVOKABLE int loadTillMessage(ChatMessageModel * message);// Load all entries till message and return its index in displayed list (-1 if not found)
public slots:
@@ -116,9 +108,6 @@ private:
bool markAsReadEnabled() const;
void enableMarkAsRead(const bool& enable);
- //bool isSecure () const;
- //void setIsSecure (const int &secure);
-
ChatRoomModel *getChatRoomModel() const;
void setChatRoomModel (ChatRoomModel *chatRoomModel);
diff --git a/linphone-app/src/components/conference/ConferenceModel.cpp b/linphone-app/src/components/conference/ConferenceModel.cpp
index 1d596c7bf..422fc1a25 100644
--- a/linphone-app/src/components/conference/ConferenceModel.cpp
+++ b/linphone-app/src/components/conference/ConferenceModel.cpp
@@ -60,7 +60,6 @@ QSharedPointer ConferenceModel::create(std::shared_ptr conference, QObject *parent) : QObject(parent) {
App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
mConference = conference;
- //updateLocalParticipant();
mParticipantListModel = QSharedPointer::create(this);
mConferenceListener = std::make_shared();
connectTo(mConferenceListener.get());
@@ -80,7 +79,7 @@ bool ConferenceModel::updateLocalParticipant(){
localParticipant = mConference->getMe();
if( localParticipant){
mLocalParticipant = QSharedPointer::create(localParticipant);
- qWarning() << "Is Admin: " << localParticipant->isAdmin() << " " << mLocalParticipant->getAdminStatus();
+ qDebug() << "Is Admin: " << localParticipant->isAdmin() << " " << mLocalParticipant->getAdminStatus();
changed = true;
}
return changed;
@@ -104,9 +103,9 @@ qint64 ConferenceModel::getElapsedSeconds() const {
ParticipantModel* ConferenceModel::getLocalParticipant() const{
if( mLocalParticipant) {
- qWarning() << "LocalParticipant admin : " << mLocalParticipant->getAdminStatus() << " " << (mLocalParticipant->getParticipant() ? mLocalParticipant->getParticipant()->isAdmin() : -1);
+ qDebug() << "LocalParticipant admin : " << mLocalParticipant->getAdminStatus() << " " << (mLocalParticipant->getParticipant() ? mLocalParticipant->getParticipant()->isAdmin() : -1);
}else
- qWarning() << "NULL";
+ qDebug() << "No LocalParticipant";
return mLocalParticipant.get();
}
@@ -137,7 +136,7 @@ void ConferenceModel::onParticipantRemoved(const std::shared_ptr & participant){
- qWarning() << "onParticipantAdminStatusChanged: " << participant->getAddress()->asString().c_str();
+ qDebug() << "onParticipantAdminStatusChanged: " << participant->getAddress()->asString().c_str();
if(participant == mLocalParticipant->getParticipant())
emit mLocalParticipant->adminStatusChanged();
emit participantAdminStatusChanged(participant);
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp
deleted file mode 100644
index 6190e1dd3..000000000
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2021 Belledonne Communications SARL.
- *
- * This file is part of linphone-desktop
- * (see https://www.linphone.org).
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include
-#include
-#include
-
-#include "app/App.hpp"
-#include "components/conference/ConferenceAddModel.hpp"
-#include "components/conference/ConferenceHelperModel.hpp"
-#include "components/core/CoreHandlers.hpp"
-#include "components/core/CoreManager.hpp"
-#include "components/settings/SettingsModel.hpp"
-#include "utils/Utils.hpp"
-
-#include "ConferenceInfoListModel.hpp"
-#include "ConferenceInfoModel.hpp"
-
-// =============================================================================
-
-ConferenceInfoListModel::ConferenceInfoListModel (QObject *parent) : ProxyListModel(parent) {
- //auto conferenceInfos = CoreManager::getInstance()->getCore()->getConferenceInformationList();
- //for(auto conferenceInfo : conferenceInfos){
- //auto conferenceInfoModel = ConferenceInfoModel::create( conferenceInfo );
- //mList << conferenceInfoModel;
- //mMappedList[conferenceInfoModel->getDateTime().date()].push_back(conferenceInfoModel.get());
- //}
-}
-/*
-ConferenceInfoModel* ConferenceInfoListModel::getAt(const int& index) const {
- return ProxyListModel::getAt(index).objectCast().get();
-}
-*/
-// -----------------------------------------------------------------------------
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.hpp
deleted file mode 100644
index 811019cbc..000000000
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2021-2022 Belledonne Communications SARL.
- *
- * This file is part of linphone-desktop
- * (see https://www.linphone.org).
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef _CONFERENCE_INFO_LIST_MODEL_H_
-#define _CONFERENCE_INFO_LIST_MODEL_H_
-
-#include
-#include "app/proxyModel/ProxyListModel.hpp"
-#include
-
-// =============================================================================
-
-class ConferenceInfoModel;
-
-class ConferenceInfoListModel : public ProxyListModel {
- Q_OBJECT
-
-public:
- ConferenceInfoListModel (QObject *parent = Q_NULLPTR);
-
- // ConferenceInfoModel* getAt(const int& index) const;
-};
-Q_DECLARE_METATYPE(QList*)
-#endif
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp
index 929cc6037..febd0b153 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.cpp
@@ -33,13 +33,12 @@
#include "utils/Utils.hpp"
#include "ConferenceInfoProxyModel.hpp"
-#include "ConferenceInfoListModel.hpp"
#include "ConferenceInfoModel.hpp"
#include "ConferenceInfoProxyListModel.hpp"
// =============================================================================
-ConferenceInfoMapModel::ConferenceInfoMapModel (QObject *parent) : ProxyAbstractMapModel*>(parent) {
+ConferenceInfoMapModel::ConferenceInfoMapModel (QObject *parent) : ProxyAbstractMapModel*>(parent) {
auto conferenceInfos = CoreManager::getInstance()->getCore()->getConferenceInformationList();
auto me = CoreManager::getInstance()->getCore()->getDefaultAccount()->getParams()->getIdentityAddress();
for(auto conferenceInfo : conferenceInfos){
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.hpp
index 050ecffec..cf53127cf 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.hpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoMapModel.hpp
@@ -25,13 +25,12 @@
#include
#include "app/proxyModel/ProxyAbstractMapModel.hpp"
+#include "app/proxyModel/ProxyListModel.hpp"
#include "app/proxyModel/SortFilterAbstractProxyModel.hpp"
-class ConferenceInfoListModel;
-
// =============================================================================
-class ConferenceInfoMapModel : public ProxyAbstractMapModel*> {
+class ConferenceInfoMapModel : public ProxyAbstractMapModel*> {
Q_OBJECT
public:
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp
index 49fdd55ce..89935164c 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp
@@ -78,8 +78,8 @@ QSharedPointer ConferenceInfoModel::create(std::shared_ptr<
return QSharedPointer::create(conferenceInfo);
}
+// Callable from QML
ConferenceInfoModel::ConferenceInfoModel (QObject * parent) : QObject(parent){
- //App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
mTimeZone = QTimeZone::systemTimeZone();
mConferenceInfo = linphone::Factory::get()->createConferenceInfo();
QDateTime currentDateTime = QDateTime::currentDateTime();
@@ -92,6 +92,7 @@ ConferenceInfoModel::ConferenceInfoModel (QObject * parent) : QObject(parent){
mConferenceInfo->setOrganizer(accountAddress);
}
+// Callable from C++
ConferenceInfoModel::ConferenceInfoModel (std::shared_ptr conferenceInfo, QObject * parent) : QObject(parent){
App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
mTimeZone = QTimeZone::systemTimeZone();
@@ -106,7 +107,6 @@ std::shared_ptr ConferenceInfoModel::getConferenceInfo
return mConferenceInfo;
}
-
//------------------------------------------------------------------------------------------------
@@ -231,14 +231,14 @@ void ConferenceInfoModel::createConference(const int& securityLevel, const int&
CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = false;
shared_ptr core = CoreManager::getInstance()->getCore();
static std::shared_ptr conference;
- qInfo() << "Conference creation of " << getSubject() << " at " << securityLevel << " security, organized by " << getOrganizer();// and with " << conferenceInfo->getConferenceInfo()->getParticipants().size();
+ qInfo() << "Conference creation of " << getSubject() << " at " << securityLevel << " security, organized by " << getOrganizer();
if( true || isScheduled()){
mConferenceScheduler = ConferenceScheduler::create();
connect(mConferenceScheduler.get(), &ConferenceScheduler::invitationsSent, this, &ConferenceInfoModel::onInvitationsSent);
connect(mConferenceScheduler.get(), &ConferenceScheduler::stateChanged, this, &ConferenceInfoModel::onStateChanged);
mConferenceScheduler->getConferenceScheduler()->setInfo(mConferenceInfo);
- }else{
+ }else{// TODO?
auto conferenceParameters = core->createConferenceParams(nullptr);
conferenceParameters->enableAudio(true);
conferenceParameters->enableVideo(true);
@@ -247,18 +247,7 @@ void ConferenceInfoModel::createConference(const int& securityLevel, const int&
conferenceParameters->setStartTime(mConferenceInfo->getDateTime());
conferenceParameters->setEndTime(mConferenceInfo->getDateTime() + (mConferenceInfo->getDuration() * 60));
conferenceParameters->enableLocalParticipant(true);
- //conferenceParameters->enableOneParticipantConference(true);
- /*
- if(true) {//Remote
- conferenceParameters->setConferenceFactoryUri(core->getDefaultAccount()->getContactAddress()->asStringUriOnly());
- }else
- conferenceParameters->setConferenceFactoryUri(nullptr);
- */
conference = core->createConferenceWithParams(conferenceParameters);
-
- //auto parameters = CoreManager::getInstance()->getCore()->createCallParams(nullptr);
- //parameters->enableVideo(true);
- //conference->inviteParticipants(mConferenceInfo->getParticipants(), parameters);
}
}
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp
index 8e8d15a52..2f45c9637 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Belledonne Communications SARL.
+ * Copyright (c) 2022 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -45,9 +45,7 @@ public:
Q_PROPERTY(QString displayNamesToString READ displayNamesToString NOTIFY participantsChanged)
Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged)
Q_PROPERTY(bool isScheduled READ isScheduled WRITE setIsScheduled NOTIFY isScheduledChanged)
-
- //Q_PROPERTY(participants READ getParticipants WRITE setParticipants NOTIFY participantsChanged)
-
+
static QSharedPointer create(std::shared_ptr conferenceInfo);
ConferenceInfoModel (QObject * parent = nullptr);
ConferenceInfoModel (std::shared_ptr conferenceInfo, QObject * parent = nullptr);
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp
index a78c23486..9c28f3298 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Belledonne Communications SARL.
+ * Copyright (c) 2022 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -17,13 +17,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+
+#include "app/proxyModel/ProxyListModel.hpp"
#include "ConferenceInfoProxyListModel.hpp"
#include "components/call/CallModel.hpp"
#include "components/core/CoreManager.hpp"
-#include "ConferenceInfoListModel.hpp"
#include "ConferenceInfoMapModel.hpp"
#include "utils/Utils.hpp"
@@ -35,13 +35,11 @@ using namespace std;
//---------------------------------------------------------------------------------------------
-ConferenceInfoProxyListModel::ConferenceInfoProxyListModel (QObject *parent) : SortFilterAbstractProxyModel(new ConferenceInfoListModel(parent), parent) {
- //setFilterType(0);
- //connect(this, &ConferenceInfoProxyListModel::filterTypeChanged, qobject_cast(sourceModel()), &ConferenceInfoListModel::filterTypeChanged);
+ConferenceInfoProxyListModel::ConferenceInfoProxyListModel (QObject *parent) : SortFilterAbstractProxyModel(new ProxyListModel(parent), parent) {
}
bool ConferenceInfoProxyListModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const {
- auto listModel = qobject_cast(sourceModel());
+ auto listModel = qobject_cast(sourceModel());
if(listModel){
QModelIndex index = listModel->index(sourceRow, 0, QModelIndex());
const ConferenceInfoModel* ics = sourceModel()->data(index).value();
@@ -58,46 +56,8 @@ bool ConferenceInfoProxyListModel::filterAcceptsRow (int sourceRow, const QModel
}
}
return true;
-/*
- bool show = false;
- QModelIndex index = sourceModel()->index(sourceRow, 0, QModelIndex());
- const ConferenceInfoListModel* ics = sourceModel()->data(index).value();
-
-
- if( mEntryTypeFilter == ConferenceType::Ended && ics->eventModel.value() != nullptr)
- show = true;
- else if( mEntryTypeFilter == ChatRoomModel::EntryType::MessageEntry && eventModel.value() != nullptr)
- show = true;
- else if( mEntryTypeFilter == ChatRoomModel::EntryType::NoticeEntry && eventModel.value() != nullptr)
- show = true;
- }
- if( show && mFilterText != ""){
- QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
- auto eventModel = sourceModel()->data(index);
- ChatMessageModel * chatModel = eventModel.value();
- if( chatModel){
- QRegularExpression search(QRegularExpression::escape(mFilterText), QRegularExpression::CaseInsensitiveOption | QRegularExpression::UseUnicodePropertiesOption);
- show = chatModel->mContent.contains(search);
- }
- }
- return show;*/
}
bool ConferenceInfoProxyListModel::lessThan (const QModelIndex &left, const QModelIndex &right) const {
return true;
-/*
- const ConferenceInfoListModel* deviceA = sourceModel()->data(left).value();
- const ConferenceInfoListModel* deviceB = sourceModel()->data(right).value();
-
- return deviceA->getAt(0)->getDateTime() < deviceB->getAt(0)->getDateTime();
- */
-}
-/*
-QVariant ConferenceInfoProxyModel::getAt(int row){
- QModelIndex sourceIndex = mapToSource(this->index(row, 0));
- return sourceModel()->data(sourceIndex);
-}
-
-void ConferenceInfoProxyModel::add(QSharedPointer conferenceInfoModel){
- qobject_cast(sourceModel())->add(conferenceInfoModel);
-}*/
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.hpp
index cd7be52a4..e204ab8c6 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.hpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyListModel.hpp
@@ -31,10 +31,10 @@
// =============================================================================
class QWindow;
-class ConferenceInfoListModel;
+class ProxyListModel;
-class ConferenceInfoProxyListModel : public SortFilterAbstractProxyModel {
+class ConferenceInfoProxyListModel : public SortFilterAbstractProxyModel {
Q_OBJECT
public:
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp
index 96e6b5946..d023fb0d0 100644
--- a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp
@@ -24,7 +24,6 @@
#include "components/core/CoreManager.hpp"
#include "components/settings/AccountSettingsModel.hpp"
-#include "ConferenceInfoListModel.hpp"
#include "ConferenceInfoMapModel.hpp"
#include "ConferenceInfoProxyListModel.hpp"
@@ -61,46 +60,8 @@ bool ConferenceInfoProxyModel::filterAcceptsRow (int sourceRow, const QModelInde
return r > 0;
}
return false;
-/*
- bool show = false;
- QModelIndex index = sourceModel()->index(sourceRow, 0, QModelIndex());
- const ConferenceInfoListModel* ics = sourceModel()->data(index).value();
-
-
- if( mEntryTypeFilter == ConferenceType::Ended && ics->eventModel.value() != nullptr)
- show = true;
- else if( mEntryTypeFilter == ChatRoomModel::EntryType::MessageEntry && eventModel.value() != nullptr)
- show = true;
- else if( mEntryTypeFilter == ChatRoomModel::EntryType::NoticeEntry && eventModel.value() != nullptr)
- show = true;
- }
- if( show && mFilterText != ""){
- QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
- auto eventModel = sourceModel()->data(index);
- ChatMessageModel * chatModel = eventModel.value();
- if( chatModel){
- QRegularExpression search(QRegularExpression::escape(mFilterText), QRegularExpression::CaseInsensitiveOption | QRegularExpression::UseUnicodePropertiesOption);
- show = chatModel->mContent.contains(search);
- }
- }
- return show;*/
}
bool ConferenceInfoProxyModel::lessThan (const QModelIndex &left, const QModelIndex &right) const {
return true;
-/*
- const ConferenceInfoListModel* deviceA = sourceModel()->data(left).value();
- const ConferenceInfoListModel* deviceB = sourceModel()->data(right).value();
-
- return deviceA->getAt(0)->getDateTime() < deviceB->getAt(0)->getDateTime();
- */
-}
-/*
-QVariant ConferenceInfoProxyModel::getAt(int row){
- QModelIndex sourceIndex = mapToSource(this->index(row, 0));
- return sourceModel()->data(sourceIndex);
-}
-
-void ConferenceInfoProxyModel::add(QSharedPointer conferenceInfoModel){
- qobject_cast(sourceModel())->add(conferenceInfoModel);
-}*/
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/linphone-app/src/components/conferenceScheduler/ConferenceScheduler.cpp b/linphone-app/src/components/conferenceScheduler/ConferenceScheduler.cpp
index 480f473d8..deff56552 100644
--- a/linphone-app/src/components/conferenceScheduler/ConferenceScheduler.cpp
+++ b/linphone-app/src/components/conferenceScheduler/ConferenceScheduler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Belledonne Communications SARL.
+ * Copyright (c) 2022 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -52,7 +52,7 @@ std::shared_ptr ConferenceScheduler::getConferenc
}
void ConferenceScheduler::onStateChanged(linphone::ConferenceSchedulerState state) {
- qWarning() << "ConferenceScheduler::onStateChanged : " << (int)state;
+ qDebug() << "ConferenceScheduler::onStateChanged : " << (int)state;
emit stateChanged(state);
if( state == linphone::ConferenceSchedulerState::Ready) {
std::shared_ptr params = CoreManager::getInstance()->getCore()->createDefaultChatRoomParams();
@@ -62,6 +62,6 @@ void ConferenceScheduler::onStateChanged(linphone::ConferenceSchedulerState stat
}
void ConferenceScheduler::onInvitationsSent( const std::list> & failedInvitations) {
- qWarning() << "ConferenceScheduler::onInvitationsSent";
+ qDebug() << "ConferenceScheduler::onInvitationsSent";
emit invitationsSent(failedInvitations);
}
diff --git a/linphone-app/src/components/conferenceScheduler/ConferenceSchedulerListener.cpp b/linphone-app/src/components/conferenceScheduler/ConferenceSchedulerListener.cpp
index 8915e98cd..a4058301d 100644
--- a/linphone-app/src/components/conferenceScheduler/ConferenceSchedulerListener.cpp
+++ b/linphone-app/src/components/conferenceScheduler/ConferenceSchedulerListener.cpp
@@ -34,11 +34,11 @@ ConferenceSchedulerListener::~ConferenceSchedulerListener () {
void ConferenceSchedulerListener::onStateChanged(const std::shared_ptr & conferenceScheduler, linphone::ConferenceSchedulerState state) {
- qWarning() << "ConferenceSchedulerListener::onStateChanged" << (int) state;
+ qDebug() << "ConferenceSchedulerListener::onStateChanged" << (int) state;
emit stateChanged(state);
}
void ConferenceSchedulerListener::onInvitationsSent(const std::shared_ptr & conferenceScheduler, const std::list> & failedInvitations) {
- qWarning() << "ConferenceSchedulerListener::onInvitationsSent";
+ qDebug() << "ConferenceSchedulerListener::onInvitationsSent";
emit invitationsSent(failedInvitations);
}
diff --git a/linphone-app/src/components/contacts/ContactsListModel.cpp b/linphone-app/src/components/contacts/ContactsListModel.cpp
index 3027e18c3..c2bf043b0 100644
--- a/linphone-app/src/components/contacts/ContactsListModel.cpp
+++ b/linphone-app/src/components/contacts/ContactsListModel.cpp
@@ -101,12 +101,6 @@ QSharedPointer ContactsListModel::findContactModelFromSipAddress (
return mOptimizedSearch[sipAddress];
else
return nullptr;
- /*
- auto it = find_if(mList.begin(), mList.end(), [&sipAddress](ContactModel *contactModel) {
- return contactModel->getVcardModel()->getSipAddresses().contains(sipAddress);
- });
- return it != mList.end() ? *it : nullptr;
- */
}
QSharedPointer ContactsListModel::findContactModelFromUsername (const QString &username) const {
diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp
index e21ceb9f3..1aefaae8d 100644
--- a/linphone-app/src/components/core/CoreHandlers.cpp
+++ b/linphone-app/src/components/core/CoreHandlers.cpp
@@ -326,62 +326,5 @@ void CoreHandlers::onEcCalibrationResult(
//------------------------------ CONFERENCE INFO
void CoreHandlers::onConferenceInfoReceived(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo) {
- qWarning() << "onConferenceInfoReceived";
-/*
- qWarning() << "onConferenceInfoReceived : sending invitation only for known participants (API fail? this should be done from SDK)";
- qWarning() << "onConferenceInfoReceived : Duration: " << conferenceInfo->getDuration();
-
- for(auto participant : conferenceInfo->getParticipants()){
- std::shared_ptr params = core->createDefaultChatRoomParams();
- std::list> participants;
- std::shared_ptr chatRoom;
- chatRoom = core->searchChatRoom(params, conferenceInfo->getOrganizer()
- , participant
- , participants);
- if(chatRoom) {
- auto timeLine = CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, true);
- if(timeLine)
- timeLine->sendMessage("Conference invitation : " +QString::fromStdString(conferenceInfo->getUri()->asString()));
- else
- qWarning() << "Cannot use a timeline for invitation";
- }else
- qWarning() << "Cannot use a chatroom for invitation";
- }
- */
+ qDebug() << "onConferenceInfoReceived (not implemented)";
}
-
-/*
-void CoreHandlers::onConferenceInfoCreated(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo){
- qWarning() << "onConferenceInfoCreated : sending invitation only for known participants (API fail? this should be done from SDK)";
- qWarning() << "onConferenceInfoCreated : Duration: " << conferenceInfo->getDuration();
-
- for(auto participant : conferenceInfo->getParticipants()){
- std::shared_ptr params = core->createDefaultChatRoomParams();
- std::list> participants;
- std::shared_ptr chatRoom;
- chatRoom = core->searchChatRoom(params, conferenceInfo->getOrganizer()
- , participant
- , participants);
- if(chatRoom) {
- auto timeLine = CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, true);
- if(timeLine)
- timeLine->sendMessage("Conference invitation : " +QString::fromStdString(conferenceInfo->getUri()->asString()));
- else
- qWarning() << "Cannot use a timeline for invitation";
- }else
- qWarning() << "Cannot use a chatroom for invitation";
- }
-}
-
-void CoreHandlers::onConferenceInfoOnSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo){
- qWarning() << "onConferenceInfoOnSent";
-}
-
-void CoreHandlers::onConferenceInfoParticipantSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant){
- qWarning() << "onConferenceInfoParticipantSent";
-}
-
-void CoreHandlers::onConferenceInfoParticipantError(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant, linphone::ConferenceInfoError error){
- qWarning() << "onConferenceInfoParticipantError";
-}
-*/
\ No newline at end of file
diff --git a/linphone-app/src/components/core/CoreHandlers.hpp b/linphone-app/src/components/core/CoreHandlers.hpp
index 99410b117..aabf7cf04 100644
--- a/linphone-app/src/components/core/CoreHandlers.hpp
+++ b/linphone-app/src/components/core/CoreHandlers.hpp
@@ -180,13 +180,6 @@ private:
// Conference Info
virtual void onConferenceInfoReceived(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo) override;
- /*
- virtual void onConferenceInfoCreated(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo);
- virtual void onConferenceInfoOnSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo);
- virtual void onConferenceInfoParticipantSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant);
- virtual void onConferenceInfoParticipantError(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant, linphone::ConferenceInfoError error);
- */
-
};
#endif // CORE_HANDLERS_H_
diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp
index 16816bbb9..156a44815 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp
@@ -32,8 +32,6 @@
ParticipantDeviceListModel::ParticipantDeviceListModel (std::shared_ptr participant, QObject *parent) : ProxyListModel(parent) {
std::list> devices = participant->getDevices() ;
- //auto previewModel = ParticipantDeviceModel::create(nullptr, true);
- //mList << previewModel;
mCallModel = nullptr;
for(auto device : devices){
auto deviceModel = ParticipantDeviceModel::create(mCallModel, device, isMe(device));
@@ -47,8 +45,6 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (CallModel * callModel, Q
if(callModel && callModel->isConference()) {
mCallModel = callModel;
auto conferenceModel = callModel->getConferenceSharedModel();
- //auto previewModel = ParticipantDeviceModel::create(nullptr, true);
- //mList << previewModel;
std::list> devices = conferenceModel->getConference()->getParticipantDeviceList();
for(auto device : devices){
auto deviceModel = ParticipantDeviceModel::create(mCallModel, device, isMe(device));
@@ -56,16 +52,6 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (CallModel * callModel, Q
connect(deviceModel.get(), &ParticipantDeviceModel::isSpeakingChanged, this, &ParticipantDeviceListModel::onParticipantDeviceSpeaking);
mList << deviceModel;
}
- /*
- mList << ParticipantDeviceModel::create(callModel, true);// Add Me in device list
- qWarning() << "Me devices : " << conferenceModel->getConference()->getMe()->getDevices().size();
-// auto meDevices = conferenceModel->getConference()->getMe()->getDevices();
- // if(meDevices.size() > 0)
-
- std::list> devices = conferenceModel->getConference()->getParticipantDeviceList();
- updateDevices(devices);
- qWarning() << "Instanciate Participant Device list model with " << mList.size() << " devices";
- */
connect(conferenceModel.get(), &ConferenceModel::participantAdded, this, &ParticipantDeviceListModel::onParticipantAdded);
connect(conferenceModel.get(), &ConferenceModel::participantRemoved, this, &ParticipantDeviceListModel::onParticipantRemoved);
connect(conferenceModel.get(), &ConferenceModel::participantDeviceAdded, this, &ParticipantDeviceListModel::onParticipantDeviceAdded);
@@ -81,11 +67,9 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (CallModel * callModel, Q
void ParticipantDeviceListModel::updateDevices(std::shared_ptr participant){
std::list> devices = participant->getDevices() ;
- //auto previewModel = ParticipantDeviceModel::create(nullptr, true);
beginResetModel();
- qWarning() << "Update devices from participant";
+ qDebug() << "Update devices from participant";
mList.clear();
- //mList << previewModel;
for(auto device : devices){
auto deviceModel = ParticipantDeviceModel::create(mCallModel, device, isMe(device));
connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
@@ -96,38 +80,10 @@ void ParticipantDeviceListModel::updateDevices(std::shared_ptr>& devices, const bool& isMe){
-/*
- QList> devicesToAdd;
- //auto meDevices = mCallModel->getConferenceSharedModel()->getConference()->getMe()->getDevices();
- for(auto device : devices){
- auto deviceAddress = device->getAddress();
- //bool isMe = false;
- //for(auto meDevice : meDevices)
- //isMe |= meDevice->getAddress() == deviceAddress;
- //if( !isMe) {
- auto exist = std::find_if(mList.begin(), mList.end(), [deviceAddress](const std::shared_ptr& activeDevice){
- return deviceAddress == activeDevice->getDevice()->getAddress();
- });
- if(exist == mList.end()){
- auto deviceModel = ParticipantDeviceModel::create(device, isMe);
- connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
- devicesToAdd << deviceModel;
- }
- //}
- }
- qWarning() << "Update devices from devices : " << devicesToAdd.size();
- if(devicesToAdd.size() > 0){
- int row = mList.count();
- beginInsertRows(QModelIndex(), row, row+devicesToAdd.size()-1);
- mList << devicesToAdd;
- endInsertRows();
- emit countChanged();
- }
- */
}
bool ParticipantDeviceListModel::add(std::shared_ptr deviceToAdd){
- qWarning() << "Adding device " << deviceToAdd->getAddress()->asString().c_str();
+ qDebug() << "Adding device " << deviceToAdd->getAddress()->asString().c_str();
for(auto item : mList) {
auto deviceModel = item.objectCast();
if(deviceModel->getDevice() == deviceToAdd) {
@@ -141,7 +97,7 @@ bool ParticipantDeviceListModel::add(std::shared_ptr(deviceModel);
- qWarning() << "Device added. Count=" << mList.count();
+ qDebug() << "Device added. Count=" << mList.count();
return true;
}
@@ -151,7 +107,6 @@ bool ParticipantDeviceListModel::remove(std::shared_ptr();
if( device->getDevice() == deviceToRemove){
device->updateVideoEnabled();
- //device->setIsLeft(true);
removeRow(row);
return true;
}else
@@ -216,7 +171,7 @@ void ParticipantDeviceListModel::onParticipantRemoved(const std::shared_ptr & participantDevice){
- qWarning() << "Adding new device : " << mList.count();
+ qDebug() << "Adding new device : " << mList.count();
auto conferenceModel = mCallModel->getConferenceSharedModel();
std::list> devices = conferenceModel->getConference()->getParticipantDeviceList();
for(auto realParticipantDevice : devices){
@@ -225,13 +180,13 @@ void ParticipantDeviceListModel::onParticipantDeviceAdded(const std::shared_ptr<
return;
}
}
- qWarning() << "No participant device found from const linphone::ParticipantDevice at onParticipantDeviceAdded";
+ qWarning() << "No participant device found from linphone::ParticipantDevice at onParticipantDeviceAdded";
}
void ParticipantDeviceListModel::onParticipantDeviceRemoved(const std::shared_ptr & participantDevice){
- qWarning() << "Removing participant device : " << mList.count();
+ qDebug() << "Removing participant device : " << mList.count();
if(!remove(participantDevice))
- qWarning() << "No participant device found from const linphone::ParticipantDevice at onParticipantDeviceRemoved";
+ qWarning() << "No participant device found from linphone::ParticipantDevice at onParticipantDeviceRemoved";
}
void ParticipantDeviceListModel::onParticipantDeviceJoined(const std::shared_ptr & participantDevice){
@@ -243,14 +198,6 @@ void ParticipantDeviceListModel::onParticipantDeviceJoined(const std::shared_ptr
}
}
onParticipantDeviceAdded(participantDevice);
- /*
- for(auto item : mList) {
- auto device = item.objectCast();
- if(device->getDevice() == participantDevice) {
- emit device->videoEnabledChanged();
- return;
- }
- }*/
}
void ParticipantDeviceListModel::onParticipantDeviceLeft(const std::shared_ptr & participantDevice){
@@ -270,27 +217,6 @@ void ParticipantDeviceListModel::onConferenceStateChanged(linphone::Conference::
updateDevices(conferenceModel->getConference()->getMe()->getDevices(), true);
updateDevices(conferenceModel->getConference()->getParticipantDeviceList(), false);
}
-
- /*
- auto devices = mCallModel->getConferenceModel()->getConference()->getMe()->getDevices();
- if(devices.size() > 0 && mList.size() == 1){
- //qWarning() << "Adding Me in list. Count=" << mList.size();
- beginInsertRows(QModelIndex(), 0, 0);
- mList.push_front(ParticipantDeviceModel::create(mCallModel, true));// Add Me in device list
- endInsertRows();
- emit countChanged();
- emit layoutChanged();
- qWarning() << "M added in list. Count=" << mList.size() << ".\n\tConfVideo is enabled:" << mCallModel->getConferenceModel()->getConference()->getCurrentParams()->videoEnabled()
- << "\n\tCallVideo is enabled: " << mCallModel->getVideoEnabled();
- }else
- qWarning() << "Me cannot be add : no Me device.";
- }else {
- if(!mCallModel)
- qWarning() << "Cannot add me : no call.";
- else
- qWarning() << "Cannot add me : No in conf.";
- }
- */
}
}
diff --git a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp
index a6794d7df..77e0e6ce6 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp
@@ -29,22 +29,22 @@ ParticipantDeviceListener::ParticipantDeviceListener(QObject *parent) : QObject(
//--------------------------------------------------------------------
void ParticipantDeviceListener::onIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking) {
- qWarning() << "onIsSpeakingChanged " << isSpeaking;
+ qDebug() << "onIsSpeakingChanged " << isSpeaking;
emit isSpeakingChanged(participantDevice, isSpeaking);
}
void ParticipantDeviceListener::onIsMuted(const std::shared_ptr & participantDevice, bool isMutedVar) {
- qWarning() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted();
+ qDebug() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted();
emit isMuted(participantDevice, isMutedVar);
}
void ParticipantDeviceListener::onConferenceJoined(const std::shared_ptr & participantDevice) {
- qWarning() << "onConferenceJoined: " << participantDevice->getAddress()->asString().c_str() << " isInConf?[" << participantDevice->isInConference() << "]";
+ qDebug() << "onConferenceJoined: " << participantDevice->getAddress()->asString().c_str() << " isInConf?[" << participantDevice->isInConference() << "]";
emit conferenceJoined(participantDevice);
}
void ParticipantDeviceListener::onConferenceLeft(const std::shared_ptr & participantDevice) {
- qWarning() << "onConferenceLeft: " << participantDevice->getAddress()->asString().c_str() << " isInConf?[" << participantDevice->isInConference() << "]";
+ qDebug() << "onConferenceLeft: " << participantDevice->getAddress()->asString().c_str() << " isInConf?[" << participantDevice->isInConference() << "]";
emit conferenceLeft(participantDevice);
}
void ParticipantDeviceListener::onStreamCapabilityChanged(const std::shared_ptr & participantDevice, linphone::MediaDirection direction, linphone::StreamType streamType) {
diff --git a/linphone-app/src/components/participant/ParticipantDeviceListener.hpp b/linphone-app/src/components/participant/ParticipantDeviceListener.hpp
index 0321dc7f8..f1f300048 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceListener.hpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceListener.hpp
@@ -36,7 +36,6 @@ class ParticipantDeviceListener : public QObject, public linphone::ParticipantDe
public:
ParticipantDeviceListener (QObject *parent = nullptr);
- //void deviceSecurityLevelChanged(std::shared_ptr device);
virtual void onIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking) override;
virtual void onIsMuted(const std::shared_ptr & participantDevice, bool isMuted) override;
virtual void onConferenceJoined(const std::shared_ptr & participantDevice) override;
diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp
index e2ecfdc3a..1c80b2046 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp
@@ -52,14 +52,6 @@ ParticipantDeviceModel::ParticipantDeviceModel (CallModel * callModel, std::shar
mIsVideoEnabled = false;
updateVideoEnabled();
}
-/*
-ParticipantDeviceModel::ParticipantDeviceModel (CallModel * call, 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;
- mCall = call;
- if( call)
- connect(call, &CallModel::statusChanged, this, &ParticipantDeviceModel::videoEnabledChanged);
-}*/
ParticipantDeviceModel::~ParticipantDeviceModel(){
if( mParticipantDevice)
@@ -74,15 +66,6 @@ QSharedPointer ParticipantDeviceModel::create(CallModel
}
return nullptr;
}
-/*
-std::shared_ptr ParticipantDeviceModel::create(CallModel * call, const bool& isMe, QObject *parent){
- std::shared_ptr model = std::make_shared(call, isMe, parent);
- if(model){
- model->mSelf = model;
- return model;
- }
- return nullptr;
-}*/
// -----------------------------------------------------------------------------
diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceModel.hpp
index 3f7b558fa..85f9a6cff 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceModel.hpp
@@ -39,10 +39,8 @@ class ParticipantDeviceModel : public QObject {
public:
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(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)
Q_PROPERTY(QString name READ getName CONSTANT)
@@ -71,7 +69,6 @@ public:
void setPaused(bool paused);
void setIsSpeaking(bool speaking);
- //void deviceSecurityLevelChanged(std::shared_ptr device);
virtual void onIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking);
virtual void onIsMuted(const std::shared_ptr & participantDevice, bool isMuted);
virtual void onConferenceJoined(const std::shared_ptr & participantDevice);
diff --git a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp
index 2c47af106..f0be7de19 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp
@@ -40,14 +40,9 @@ bool ParticipantDeviceProxyModel::filterAcceptsRow (
Q_UNUSED(sourceRow)
Q_UNUSED(sourceParent)
auto listModel = qobject_cast(sourceModel());
- /*
- if(mFilterType == 1 && listModel->rowCount() <= 2){
- return sourceRow == 0;
- }else{*/
- const QModelIndex index = listModel->index(sourceRow, 0, sourceParent);
- const ParticipantDeviceModel *device = index.data().value();
- return device && (isShowMe() || !device->isMe());
- //}
+ const QModelIndex index = listModel->index(sourceRow, 0, sourceParent);
+ const ParticipantDeviceModel *device = index.data().value();
+ return device && (isShowMe() || !device->isMe());
}
bool ParticipantDeviceProxyModel::lessThan (const QModelIndex &left, const QModelIndex &right) const {
@@ -100,8 +95,4 @@ void ParticipantDeviceProxyModel::setShowMe(const bool& show){
}
void ParticipantDeviceProxyModel::onCountChanged(){
- auto listModel = qobject_cast(sourceModel());
- if(mFilterType == 1 || mFilterType == 2){
- //if( listModel->getCount()
- }
}
\ No newline at end of file
diff --git a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp
index d8673f05a..b1ddc389c 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp
@@ -27,6 +27,7 @@
#include
#include
#include
+#include
#include "app/proxyModel/SortFilterProxyModel.hpp"
class ParticipantDeviceListModel;
diff --git a/linphone-app/src/components/participant/ParticipantListModel.cpp b/linphone-app/src/components/participant/ParticipantListModel.cpp
index ae21133df..f1e964980 100644
--- a/linphone-app/src/components/participant/ParticipantListModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantListModel.cpp
@@ -34,20 +34,15 @@
ParticipantListModel::ParticipantListModel (ChatRoomModel * chatRoomModel, QObject *parent) : ProxyListModel(parent) {
if( chatRoomModel) {
- mChatRoomModel = chatRoomModel;//CoreManager::getInstance()->getChatRoomModel(chatRoomModel);
+ mChatRoomModel = chatRoomModel;
connect(mChatRoomModel, &ChatRoomModel::securityEvent, this, &ParticipantListModel::onSecurityEvent);
-
connect(mChatRoomModel, &ChatRoomModel::conferenceJoined, this, &ParticipantListModel::onConferenceJoined);
-
connect(mChatRoomModel, &ChatRoomModel::participantAdded, this, QOverload &>::of(&ParticipantListModel::onParticipantAdded));
connect(mChatRoomModel, &ChatRoomModel::participantRemoved, this, QOverload &>::of(&ParticipantListModel::onParticipantRemoved));
connect(mChatRoomModel, &ChatRoomModel::participantAdminStatusChanged, this, QOverload &>::of(&ParticipantListModel::onParticipantAdminStatusChanged));
-
connect(mChatRoomModel, &ChatRoomModel::participantDeviceAdded, this, &ParticipantListModel::onParticipantDeviceAdded);
connect(mChatRoomModel, &ChatRoomModel::participantDeviceRemoved, this, &ParticipantListModel::onParticipantDeviceRemoved);
-
-
connect(mChatRoomModel, &ChatRoomModel::participantRegistrationSubscriptionRequested, this, &ParticipantListModel::onParticipantRegistrationSubscriptionRequested);
connect(mChatRoomModel, &ChatRoomModel::participantRegistrationUnsubscriptionRequested, this, &ParticipantListModel::onParticipantRegistrationUnsubscriptionRequested);
@@ -57,16 +52,12 @@ ParticipantListModel::ParticipantListModel (ChatRoomModel * chatRoomModel, QObje
ParticipantListModel::ParticipantListModel (ConferenceModel * conferenceModel, QObject *parent) : ProxyListModel(parent) {
if( conferenceModel) {
- mConferenceModel = conferenceModel;//CoreManager::getInstance()->getChatRoomModel(chatRoomModel);
+ mConferenceModel = conferenceModel;
connect(mConferenceModel, &ConferenceModel::participantAdded, this, QOverload &>::of(&ParticipantListModel::onParticipantAdded));
connect(mConferenceModel, &ConferenceModel::participantRemoved, this, QOverload &>::of(&ParticipantListModel::onParticipantRemoved));
connect(mConferenceModel, &ConferenceModel::participantAdminStatusChanged, this, QOverload &>::of(&ParticipantListModel::onParticipantAdminStatusChanged));
-
connect(mConferenceModel, &ConferenceModel::conferenceStateChanged, this, &ParticipantListModel::onStateChanged);
- //connect(mConferenceModel, &ConferenceModel::participantDeviceAdded, this, &ParticipantListModel::onParticipantDeviceAdded);
- //connect(mConferenceModel, &ConferenceModel::participantDeviceRemoved, this, &ParticipantListModel::onParticipantDeviceRemoved);
-
updateParticipants();
}
@@ -149,17 +140,7 @@ void ParticipantListModel::updateParticipants () {
if( mChatRoomModel || mConferenceModel) {
bool changed = false;
auto dbParticipants = (mChatRoomModel ? mChatRoomModel->getParticipants() : mConferenceModel->getParticipantList());
- /*
- std::shared_ptr me;
- if( mChatRoomModel )
- me = mChatRoomModel->getChatRoom()->getMe();
- else if( mConferenceModel->getLocalParticipant())
- me = mConferenceModel->getLocalParticipant()->getParticipant();
- if(me)
- dbParticipants.push_front(me);
- */
//Remove left participants
- //for(auto participant : mList){
auto itParticipant = mList.begin();
while(itParticipant != mList.end()) {
auto itDbParticipant = dbParticipants.begin();
@@ -303,17 +284,17 @@ void ParticipantListModel::onConferenceJoined(){
}
void ParticipantListModel::onParticipantAdded(const std::shared_ptr & eventLog){
- qWarning() << "onParticipantAdded event: " << eventLog->getParticipantAddress()->asString().c_str();
+ qDebug() << "onParticipantAdded event: " << eventLog->getParticipantAddress()->asString().c_str();
add(eventLog->getParticipantAddress());
}
void ParticipantListModel::onParticipantAdded(const std::shared_ptr & participant){
- qWarning() << "onParticipantAdded part: " << participant->getAddress()->asString().c_str();
+ qDebug() << "onParticipantAdded part: " << participant->getAddress()->asString().c_str();
add(participant);
}
void ParticipantListModel::onParticipantAdded(const std::shared_ptr& address){
- qWarning() << "onParticipantAdded addr: " << address->asString().c_str();
+ qDebug() << "onParticipantAdded addr: " << address->asString().c_str();
add(address);
}
diff --git a/linphone-app/src/components/participant/ParticipantListModel.hpp b/linphone-app/src/components/participant/ParticipantListModel.hpp
index 8c78ba2b2..5d09fab99 100644
--- a/linphone-app/src/components/participant/ParticipantListModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantListModel.hpp
@@ -52,6 +52,7 @@ public:
void add(const std::shared_ptr & participant);
void add(const std::shared_ptr & participantAddress);
void updateParticipants(); // Update list from Chat Room
+
// Remove a chatroom
Q_INVOKABLE void remove (ParticipantModel *importer);
Q_INVOKABLE ChatRoomModel* getChatRoomModel() const;
diff --git a/linphone-app/src/components/participant/ParticipantModel.cpp b/linphone-app/src/components/participant/ParticipantModel.cpp
index 3e1b7cead..6ddb31a89 100644
--- a/linphone-app/src/components/participant/ParticipantModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantModel.cpp
@@ -76,7 +76,6 @@ QDateTime ParticipantModel::getCreationTime() const{
return (mParticipant ? QDateTime::fromSecsSinceEpoch(mParticipant->getCreationTime()) : QDateTime::currentDateTime());
}
-//std::list> ParticipantModel::getDevices() const;
bool ParticipantModel::getAdminStatus() const{
return (mParticipant ? mParticipant->isAdmin() : mAdminStatus);
}
diff --git a/linphone-app/src/components/participant/ParticipantModel.hpp b/linphone-app/src/components/participant/ParticipantModel.hpp
index a7595c43f..eb491f3c9 100644
--- a/linphone-app/src/components/participant/ParticipantModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantModel.hpp
@@ -53,7 +53,6 @@ public:
ContactModel *getContactModel() const;
QString getSipAddress() const;
QDateTime getCreationTime() const;
- //std::list> getDevices() const;
bool getAdminStatus() const;
bool isFocus() const;
int getSecurityLevel() const;
@@ -69,8 +68,6 @@ public:
std::shared_ptr getParticipant();
Q_INVOKABLE ParticipantDeviceProxyModel * getProxyDevices();
QSharedPointer getParticipantDevices();
- //linphone::ChatRoomSecurityLevel getSecurityLevel() const;
- //std::shared_ptr findDevice(const std::shared_ptr & address) const;
void startInvitation(const int& secondes = 30); // Start a timer to remove the model if the invitation didn't ended after some time
@@ -91,9 +88,6 @@ signals:
void invitationTimeout(ParticipantModel* model);
-// void contactUpdated ();
-
-
private:
std::shared_ptr mParticipant;
@@ -104,7 +98,6 @@ private:
bool mAdminStatus;
};
-//Q_DECLARE_METATYPE(ParticipantModel *);
Q_DECLARE_METATYPE(QSharedPointer);
#endif // PARTICIPANT_MODEL_H_
diff --git a/linphone-app/src/components/participant/ParticipantProxyModel.cpp b/linphone-app/src/components/participant/ParticipantProxyModel.cpp
index 2b01e5317..1c2320e4e 100644
--- a/linphone-app/src/components/participant/ParticipantProxyModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantProxyModel.cpp
@@ -144,7 +144,6 @@ void ParticipantProxyModel::addAddress(const QString& address){
participant->startInvitation();
}
if( mConferenceModel && mConferenceModel->getConference()){
- //mConferenceModel->getConference()->addParticipant(Utils::interpretUrl(address));
std::list> addressesToInvite;
addressesToInvite.push_back(Utils::interpretUrl(address));
auto callParameters = CoreManager::getInstance()->getCore()->createCallParams(mConferenceModel->getConference()->getCall());
@@ -182,8 +181,6 @@ bool ParticipantProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex &
const ParticipantModel* a = sourceModel()->data(sourceModel()->index(sourceRow, 0, sourceParent)).value();
return !a->isMe();
}
- //const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
- //return true;
}
bool ParticipantProxyModel::lessThan (const QModelIndex &left, const QModelIndex &right) const {
diff --git a/linphone-app/src/components/search/SearchSipAddressesModel.cpp b/linphone-app/src/components/search/SearchSipAddressesModel.cpp
index 6a1d3e3a4..e31bb2e48 100644
--- a/linphone-app/src/components/search/SearchSipAddressesModel.cpp
+++ b/linphone-app/src/components/search/SearchSipAddressesModel.cpp
@@ -62,7 +62,7 @@ SearchSipAddressesModel::~SearchSipAddressesModel(){
// -----------------------------------------------------------------------------
void SearchSipAddressesModel::setFilter(const QString& filter){
- mMagicSearch->getContactListFromFilterAsync(filter.toStdString(),"");
+ mMagicSearch->getContactsListAsync(filter.toStdString(),"", (int)linphone::MagicSearchSource::All, linphone::MagicSearchAggregation::None);
//searchReceived(mMagicSearch->getContactListFromFilter(Utils::appStringToCoreString(filter),"")); // Just to show how to use sync method
}
diff --git a/linphone-app/src/components/search/SearchSipAddressesModel.hpp b/linphone-app/src/components/search/SearchSipAddressesModel.hpp
index 16c655b8e..d4457d054 100644
--- a/linphone-app/src/components/search/SearchSipAddressesModel.hpp
+++ b/linphone-app/src/components/search/SearchSipAddressesModel.hpp
@@ -42,7 +42,6 @@ public:
Q_INVOKABLE void setFilter (const QString &pattern);
- //QList > mAddresses;
// And instance of Magic search
std::shared_ptr mMagicSearch;
// Callback when searching
diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp
index e13916464..80910b960 100644
--- a/linphone-app/src/components/settings/SettingsModel.cpp
+++ b/linphone-app/src/components/settings/SettingsModel.cpp
@@ -60,17 +60,19 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
configureRlsUri();
}
+
SettingsModel::~SettingsModel()
{
- if(mSimpleCaptureGraph )
- {
+ if(mSimpleCaptureGraph ) {
delete mSimpleCaptureGraph;
mSimpleCaptureGraph = nullptr;
}
}
+
void SettingsModel::settingsWindowClosing(void) {
onSettingsTabChanged(-1);
}
+
//Provides tabbar per-tab setup/teardown mechanism for specific settings views
void SettingsModel::onSettingsTabChanged(int idx) {
int prevIdx = mCurrentSettingsTab;
diff --git a/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp b/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp
index c96e18f41..f857a8302 100644
--- a/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp
+++ b/linphone-app/src/components/sip-addresses/SipAddressesModel.cpp
@@ -239,6 +239,7 @@ bool SipAddressesModel::sipAddressIsValid (const QString &sipAddress) {
shared_ptr address = linphone::Factory::get()->createAddress(Utils::appStringToCoreString(sipAddress));
return address && !address->getUsername().empty();
}
+
// Return at most : sip:username@domain
QString SipAddressesModel::cleanSipAddress (const QString &sipAddress) {
return Utils::cleanSipAddress(sipAddress);
@@ -289,6 +290,7 @@ void SipAddressesModel::handleHistoryModelCreated (HistoryModel *historyModel) {
handleAllCallCountReset();
});
}
+
void SipAddressesModel::handleContactAdded (QSharedPointer contact) {
for (const auto &sipAddress : contact->getVcardModel()->getSipAddresses()) {
addOrUpdateSipAddress(sipAddress.toString(), contact);
@@ -412,6 +414,7 @@ void SipAddressesModel::handleLastEntryRemoved (ChatRoomModel *chatRoomModel) {
it2->timestamp = map["timestamp"].toDateTime();
emit dataChanged(index(row, 0), index(row, 0));
}
+
void SipAddressesModel::handleAllCallCountReset () {
for( auto peer = mPeerAddressToSipAddressEntry.begin() ; peer != mPeerAddressToSipAddressEntry.end() ; ++peer){
for( auto local = peer->localAddressToConferenceEntry.begin() ; local != peer->localAddressToConferenceEntry.end() ; ++local){
@@ -422,6 +425,7 @@ void SipAddressesModel::handleAllCallCountReset () {
emit dataChanged(index(row, 0), index(row, 0));
}
}
+
void SipAddressesModel::handleMessageCountReset (ChatRoomModel *chatRoomModel) {
const QString &peerAddress = Utils::cleanSipAddress(chatRoomModel->getPeerAddress());
auto it = mPeerAddressToSipAddressEntry.find(peerAddress);
diff --git a/linphone-app/src/components/sip-addresses/SipAddressesSorter.hpp b/linphone-app/src/components/sip-addresses/SipAddressesSorter.hpp
index 3c42b1282..90c863eba 100644
--- a/linphone-app/src/components/sip-addresses/SipAddressesSorter.hpp
+++ b/linphone-app/src/components/sip-addresses/SipAddressesSorter.hpp
@@ -34,7 +34,6 @@ class SipAddressesSorter : public QObject{
public:
SipAddressesSorter (QObject *parent = Q_NULLPTR);
- //static bool lessThan( const QString& filter, const QVariantMap &left, const QVariantMap &right);
static bool lessThan (const QString& filter, const SearchResultModel *left, const SearchResultModel *right);
private:
diff --git a/linphone-app/src/components/telephone-numbers/TelephoneNumbersModel.hpp b/linphone-app/src/components/telephone-numbers/TelephoneNumbersModel.hpp
index b1c1a9d6c..949b9a14e 100644
--- a/linphone-app/src/components/telephone-numbers/TelephoneNumbersModel.hpp
+++ b/linphone-app/src/components/telephone-numbers/TelephoneNumbersModel.hpp
@@ -27,22 +27,22 @@
// =============================================================================
class TelephoneNumbersModel : public QAbstractListModel {
- Q_OBJECT;
-
- Q_PROPERTY(int defaultIndex READ getDefaultIndex CONSTANT);
-
+ Q_OBJECT
+
+ Q_PROPERTY(int defaultIndex READ getDefaultIndex CONSTANT)
+
public:
- TelephoneNumbersModel (QObject *parent = Q_NULLPTR);
-
- int rowCount (const QModelIndex &index = QModelIndex()) const override;
-
- QHash roleNames () const override;
- QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override;
-
+ TelephoneNumbersModel (QObject *parent = Q_NULLPTR);
+
+ int rowCount (const QModelIndex &index = QModelIndex()) const override;
+
+ QHash roleNames () const override;
+ QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override;
+
private:
- int getDefaultIndex () const;
-
- static const QList> mCountryCodes;
+ int getDefaultIndex () const;
+
+ static const QList> mCountryCodes;
};
#endif // ifndef TELEPHONE_NUMBERS_MODEL_H_
diff --git a/linphone-app/src/components/timeline/TimelineListModel.cpp b/linphone-app/src/components/timeline/TimelineListModel.cpp
index a249326e3..f5824d644 100644
--- a/linphone-app/src/components/timeline/TimelineListModel.cpp
+++ b/linphone-app/src/components/timeline/TimelineListModel.cpp
@@ -111,37 +111,16 @@ QSharedPointer TimelineListModel::getTimeline(std::shared_ptr model = TimelineModel::create(chatRoom);
if(model){
- //std::shared_ptr model = std::make_shared(chatRoom);
connect(model.get(), SIGNAL(selectedChanged(bool)), this, SLOT(onSelectedHasChanged(bool)));
connect(model->getChatRoomModel(), &ChatRoomModel::allEntriesRemoved, this, &TimelineListModel::removeChatRoomModel);
add(model);
- //connect(model.get(), SIGNAL(conferenceLeft()), this, SLOT(selectedHasChanged(bool)));
return model;
}
}
}
return nullptr;
}
-/*
-std::shared_ptr TimelineListModel::getTimeline(std::shared_ptr conference, const bool &create){
- if(chatRoom){
- for(auto it = mList.begin() ; it != mList.end() ; ++it){
- if( (*it)->isConference() && (*it)->getConferenceModel()->getConference() == conference){
- return *it;
- }
- }
- if(create){
- std::shared_ptr model = TimelineModel::create(conference);
- //std::shared_ptr model = std::make_shared(chatRoom);
- connect(model.get(), SIGNAL(selectedChanged(bool)), this, SLOT(onSelectedHasChanged(bool)));
- //connect(model->getConferenceModel(), &ChatRoomModel::allEntriesRemoved, this, &TimelineListModel::removeChatRoomModel);
- add(model);
- return model;
- }
- }
- return nullptr;
-}
-*/
+
QVariantList TimelineListModel::getLastChatRooms(const int& maxCount) const{
QVariantList contacts;
QMultiMap sortedData;
@@ -182,8 +161,6 @@ QSharedPointer TimelineListModel::getChatRoomModel(std::shared_pt
if(model){
connect(model.get(), SIGNAL(selectedChanged(bool)), this, SLOT(onSelectedHasChanged(bool)));
connect(model->getChatRoomModel(), &ChatRoomModel::allEntriesRemoved, this, &TimelineListModel::removeChatRoomModel);
-
- //connect(model.get(), SIGNAL(conferenceLeft()), this, SLOT(selectedHasChanged(bool)));
add(model);
return model->mChatRoomModel;
}
@@ -388,8 +365,3 @@ void TimelineListModel::onCallCreated(const std::shared_ptr &cal
}
}
}
-
-/*
-void TimelineListModel::onConferenceLeft(const std::shared_ptr &chatRoom, , const std::shared_ptr & eventLog){
- remove(getTimeline(chatRoom, false).get());
-}*/
\ No newline at end of file
diff --git a/linphone-app/src/components/timeline/TimelineListModel.hpp b/linphone-app/src/components/timeline/TimelineListModel.hpp
index 704576313..ce1818d0b 100644
--- a/linphone-app/src/components/timeline/TimelineListModel.hpp
+++ b/linphone-app/src/components/timeline/TimelineListModel.hpp
@@ -44,7 +44,6 @@ public:
void selectAll(const bool& selected);
TimelineModel * getAt(const int& index);
QSharedPointer getTimeline(std::shared_ptr chatRoom, const bool &create);
- //std::shared_ptr getTimeline(std::shared_ptr chatRoom, const bool &create);
Q_INVOKABLE QVariantList getLastChatRooms(const int& maxCount) const;
QSharedPointer getChatRoomModel(std::shared_ptr chatRoom, const bool &create);
QSharedPointer getChatRoomModel(ChatRoomModel * chatRoom);
@@ -64,9 +63,6 @@ public slots:
void onChatRoomStateChanged(const std::shared_ptr &chatRoom,linphone::ChatRoom::State state);
void onCallStateChanged (const std::shared_ptr &call, linphone::Call::State state) ;
void onCallCreated(const std::shared_ptr &call);
- //void onConferenceLeft();
-
-
signals:
void countChanged();
diff --git a/linphone-app/src/components/timeline/TimelineModel.hpp b/linphone-app/src/components/timeline/TimelineModel.hpp
index fe53cc52a..d74f36878 100644
--- a/linphone-app/src/components/timeline/TimelineModel.hpp
+++ b/linphone-app/src/components/timeline/TimelineModel.hpp
@@ -46,11 +46,6 @@ public:
Q_PROPERTY(QString fullLocalAddress READ getFullLocalAddress NOTIFY fullLocalAddressChanged)
Q_PROPERTY(ChatRoomModel* chatRoomModel READ getChatRoomModel CONSTANT)
-// Contact
- //Q_PROPERTY(QString sipAddress READ getFullPeerAddress NOTIFY fullPeerAddressChanged)
- //Q_PROPERTY(QString username READ getUsername NOTIFY usernameChanged)
- //Q_PROPERTY(QString avatar READ getAvatar NOTIFY avatarChanged)
- //Q_PROPERTY(int presenceStatus READ getPresenceStatus NOTIFY presenceStatusChanged)
Q_PROPERTY(bool selected MEMBER mSelected WRITE setSelected NOTIFY selectedChanged)
@@ -99,7 +94,6 @@ public:
public slots:
void updateUnreadCount();
void onDefaultAccountChanged();
- //void chatRoomDeleted();
signals:
void fullPeerAddressChanged();
diff --git a/linphone-app/src/components/timeline/TimelineProxyModel.cpp b/linphone-app/src/components/timeline/TimelineProxyModel.cpp
index 5629c6e22..a516a9a2f 100644
--- a/linphone-app/src/components/timeline/TimelineProxyModel.cpp
+++ b/linphone-app/src/components/timeline/TimelineProxyModel.cpp
@@ -49,12 +49,10 @@ TimelineProxyModel::TimelineProxyModel (QObject *parent) : QSortFilterProxyModel
QObject::connect(accountSettingsModel, &AccountSettingsModel::defaultAccountChanged, this, [this]() {
qobject_cast(sourceModel())->update();
invalidate();
- //updateCurrentSelection();
});
QObject::connect(coreManager->getSipAddressesModel(), &SipAddressesModel::sipAddressReset, this, [this]() {
qobject_cast(sourceModel())->reset();
invalidate();// Invalidate and reload GUI if the model has been reset
- //updateCurrentSelection();
});
setSourceModel(model);
diff --git a/linphone-app/src/components/timeline/TimelineProxyModel.hpp b/linphone-app/src/components/timeline/TimelineProxyModel.hpp
index bab182b4d..2ef9809e2 100644
--- a/linphone-app/src/components/timeline/TimelineProxyModel.hpp
+++ b/linphone-app/src/components/timeline/TimelineProxyModel.hpp
@@ -54,7 +54,6 @@ public:
Q_INVOKABLE void unselectAll();
Q_INVOKABLE void setFilterFlags(const int& filterFlags);
Q_INVOKABLE void setFilterText(const QString& text);
- //Q_INVOKABLE TimelineModel * getTimeline();
signals:
void countChanged();
@@ -75,9 +74,6 @@ protected:
private:
int mFilterFlags = 0;
QString mFilterText;
-
- //std::shared_ptr mCurrentChatRoomModel;
-
};
#endif // TIMELINE_PROXY_MODEL_H_
diff --git a/linphone-app/ui/modules/Common/Dialog/DialogTitle.qml b/linphone-app/ui/modules/Common/Dialog/DialogTitle.qml
index 48e751f97..797ffcd34 100644
--- a/linphone-app/ui/modules/Common/Dialog/DialogTitle.qml
+++ b/linphone-app/ui/modules/Common/Dialog/DialogTitle.qml
@@ -39,7 +39,6 @@ Item {
}
color: DialogStyle.description.color
- //font.pointSize: DialogStyle.description.pointSize
font.pointSize: !flat ? Units.dp * 10 : Units.dp * 14
font.weight: !flat ? Font.Normal : Font.Bold
horizontalAlignment: Text.AlignHCenter
diff --git a/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml b/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml
index a5bc36d04..4370dd5a7 100644
--- a/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml
+++ b/linphone-app/ui/modules/Common/Form/Buttons/AbstractTextButton.qml
@@ -67,8 +67,8 @@ Item {
// ---------------------------------------------------------------------------
- height: button.contentItem.implicitHeight + 25//AbstractTextButtonStyle.background.height
- width: button.contentItem.implicitWidth +60 //AbstractTextButtonStyle.background.width
+ height: button.contentItem.implicitHeight + 25
+ width: button.contentItem.implicitWidth + 60
// ---------------------------------------------------------------------------
@@ -91,7 +91,6 @@ Item {
capitalization: button.capitalization
}
wrapMode: Text.WordWrap
- //elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
text: button.text
verticalAlignment: Text.AlignVCenter
diff --git a/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml b/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml
index 216abae1f..05a7f1eee 100644
--- a/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml
+++ b/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml
@@ -5,62 +5,64 @@ import Common.Styles 1.0
// =============================================================================
Row {
- id: item
-
- // ---------------------------------------------------------------------------
-
- property int selectedButton: 0
- property var texts
-
- // ---------------------------------------------------------------------------
-
- // Emitted when the selected button is changed.
- // Gives the selected button id.
- signal clicked (int button)
-
- // ---------------------------------------------------------------------------
-
- spacing: ExclusiveButtonsStyle.buttonsSpacing
-
- Keys.onLeftPressed: {
- if (selectedButton > 0) {
- clicked(--selectedButton)
- }
- }
-
- Keys.onRightPressed: {
- if (selectedButton < repeater.count - 1) {
- clicked(++selectedButton)
- }
- }
-
- // ---------------------------------------------------------------------------
-
- Repeater {
- id: repeater
-
- model: texts
-
- SmallButton {
- anchors.verticalCenter: parent.verticalCenter
- backgroundColor: selectedButton === index
- ? ExclusiveButtonsStyle.button.color.selected
- : (down
- ? ExclusiveButtonsStyle.button.color.pressed
- : (hovered
- ? ExclusiveButtonsStyle.button.color.hovered
- : ExclusiveButtonsStyle.button.color.normal
- )
- )
- text: modelData
- radius: height/2
-
- onClicked: {
- if (selectedButton !== index) {
- selectedButton = index
- item.clicked(index)
- }
- }
- }
- }
+ id: item
+
+ // ---------------------------------------------------------------------------
+
+ property int selectedButton: 0
+ property var texts
+ property int capitalization
+
+ // ---------------------------------------------------------------------------
+
+ // Emitted when the selected button is changed.
+ // Gives the selected button id.
+ signal clicked (int button)
+
+ // ---------------------------------------------------------------------------
+
+ spacing: ExclusiveButtonsStyle.buttonsSpacing
+
+ Keys.onLeftPressed: {
+ if (selectedButton > 0) {
+ clicked(--selectedButton)
+ }
+ }
+
+ Keys.onRightPressed: {
+ if (selectedButton < repeater.count - 1) {
+ clicked(++selectedButton)
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+
+ Repeater {
+ id: repeater
+
+ model: texts
+
+ SmallButton {
+ capitalization: item.capitalization
+ anchors.verticalCenter: parent.verticalCenter
+ backgroundColor: selectedButton === index
+ ? ExclusiveButtonsStyle.button.color.selected
+ : (down
+ ? ExclusiveButtonsStyle.button.color.pressed
+ : (hovered
+ ? ExclusiveButtonsStyle.button.color.hovered
+ : ExclusiveButtonsStyle.button.color.normal
+ )
+ )
+ text: modelData
+ radius: height/2
+
+ onClicked: {
+ if (selectedButton !== index) {
+ selectedButton = index
+ item.clicked(index)
+ }
+ }
+ }
+ }
}
diff --git a/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml b/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml
index 6d4fddf92..712ef75ac 100644
--- a/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml
+++ b/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml
@@ -11,6 +11,7 @@ Button {
property alias backgroundColor: background.color
property alias radius: background.radius
+ property int capitalization
background: Rectangle {
id: background
@@ -28,6 +29,7 @@ Button {
color: SmallButtonStyle.text.color
font.pointSize: SmallButtonStyle.text.pointSize
font.weight: Font.Bold
+ font.capitalization: button.capitalization
horizontalAlignment: Text.AlignHCenter
text: button.text
verticalAlignment: Text.AlignVCenter
diff --git a/linphone-app/ui/modules/Common/Form/ComboBox.qml b/linphone-app/ui/modules/Common/Form/ComboBox.qml
index 3ded528a7..989ec896d 100644
--- a/linphone-app/ui/modules/Common/Form/ComboBox.qml
+++ b/linphone-app/ui/modules/Common/Form/ComboBox.qml
@@ -23,7 +23,7 @@ Controls.ComboBox {
property var rootItem
property int yPopup: rootItem ? -mapToItem(rootItem,x,y).y : height + 1
property int maxPopupHeight : rootItem ? rootItem.height : 400
-
+
property int selectionWidth: width
clip: true
@@ -92,44 +92,19 @@ Controls.ComboBox {
}
// ---------------------------------------------------------------------------
- /*
- delegate: CommonItemDelegate {
- id: item
- clip: true
- container: comboBox
- flattenedModel: comboBox.textRole.length &&
- (typeof modelData !== 'undefined' ? modelData : model)
- itemIcon: Logic.getItemIcon(item)
- width: comboBox.selectionWidth
- onWidthChanged: console.log(width)
- }*/
popup: Controls.Popup{
y: comboBox.yPopup
width: comboBox.selectionWidth
- //height: comboBox.maxPopupHeight
- //height: contentItem.contentHeight
implicitHeight: contentItem.contentHeight
topPadding: 0
bottomPadding: 0
leftPadding: 0
rightPadding: 0
contentItem: ListItemSelector{
- //implicitHeight: contentHeight
model: comboBox.popup.visible ? comboBox.model : null
currentIndex: comboBox.highlightedIndex
textRole: comboBox.textRole
onActivated: {comboBox.activated(index);comboBox.currentIndex = index;comboBox.popup.close()}
- /*
- delegate: CommonItemDelegate {
- id: item
- clip: true
- container: comboBox
- flattenedModel: comboBox.textRole.length &&
- (typeof modelData !== 'undefined' ? modelData : model)
- itemIcon: Logic.getItemIcon(item)
- width: comboBox.selectionWidth
- onWidthChanged: console.log(width)
- }*/
}
}
}
diff --git a/linphone-app/ui/modules/Common/Form/ListItemSelector.qml b/linphone-app/ui/modules/Common/Form/ListItemSelector.qml
index f65c0d137..94e18f342 100644
--- a/linphone-app/ui/modules/Common/Form/ListItemSelector.qml
+++ b/linphone-app/ui/modules/Common/Form/ListItemSelector.qml
@@ -13,11 +13,9 @@ ScrollableListViewField {
property alias model: view.model
property alias textRole: view.textRole
property alias contentHeight: view.contentHeight
- //property alias implicitHeight: view.implicitHeight
- //implicitHeight: view.implicitHeight
signal activated (int index)
- color: 'red'
+
radius: 0
ScrollableListView {
id: view
diff --git a/linphone-app/ui/modules/Common/Form/Mosaic.qml b/linphone-app/ui/modules/Common/Form/Mosaic.qml
index f2b026a7e..0f00cb570 100644
--- a/linphone-app/ui/modules/Common/Form/Mosaic.qml
+++ b/linphone-app/ui/modules/Common/Form/Mosaic.qml
@@ -15,27 +15,17 @@ ColumnLayout{
property bool squaredDisplay: false
function appendItem(item){
- console.log("Adding "+item)
mainLayout.delegateModel.model.append(item)
- /*
- if( bottomRowList.model.count < grid.columns - 1)
- bottomRowList.model.append(item)
- else
- while(bottomRowList.model.count > 0 && tryToAdd(bottomRowList.model.get(0))){
- bottomRowList.model.remove(0,1)
- }*/
}
function add(item){
if( !grid.isLayoutWillChanged() || !transitionningTimer.running)
- //grid.model.append(item)
appendItem(item)
else
bufferModels.append(item)
}
function remove(index){
- console.log("Removing at "+index)
if(mainLayout.delegateModel.model.count > index)
mainLayout.delegateModel.model.remove( index, 1)
}
@@ -78,11 +68,6 @@ ColumnLayout{
}
}
- /*
- Item{// Spacer
- Layout.fillWidth: true
- Layout.fillHeight: true
- }*/
GridView{
id: grid
property int margin: 10
@@ -109,27 +94,14 @@ ColumnLayout{
return columns !== getColumnCount(itemCount+1) || rows !== getRowCount(itemCount+1)
}
- //Layout.fillHeight: true
- //Layout.fillWidth: true
Layout.preferredWidth: cellWidth * columns
Layout.preferredHeight: cellHeight * rows
Layout.alignment: Qt.AlignCenter
interactive: false
model: DelegateModel{}
- /*
- model: ListModel{}
- //delegate: internalComponent
- delegate: Component{
- Loader{
- property int modelIndex: index
- height: grid.cellHeight-5
- width: grid.cellWidth-5
- sourceComponent: mainLayout.delegate
- }
- }*/
-//------------------- ANIMATIONS
+ //------------------- ANIMATIONS
property Transition defaultTransition: Transition {
SequentialAnimation {
ScriptAction {
@@ -184,41 +156,6 @@ ColumnLayout{
}
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
- Layout.preferredWidth: grid.cellWidth * model.count
- Layout.preferredHeight: grid.cellHeight
- Layout.alignment: Qt.AlignCenter
- orientation: Qt.Horizontal
- model: ListModel{}
-
- delegate: Component{
- Loader{
- property int modelIndex: index
- height: grid.cellHeight - 5
- width: grid.cellWidth - 5
- sourceComponent: mainLayout.delegate
- }
- }*/
- /*
- delegate:Rectangle{
- width: grid.cellWidth
- height: grid.cellHeight
- onWidthChanged: console.log(width)
- onHeightChanged: console.log(height)
- color: '#'+ Math.floor(Math.random()*255).toString(16)
- +Math.floor(Math.random()*255).toString(16)
- +Math.floor(Math.random()*255).toString(16)
- }*/
- //}
-
+ }
}
\ No newline at end of file
diff --git a/linphone-app/ui/modules/Common/Form/RadioButton.qml b/linphone-app/ui/modules/Common/Form/RadioButton.qml
index 5560d58f2..8b27a6d10 100644
--- a/linphone-app/ui/modules/Common/Form/RadioButton.qml
+++ b/linphone-app/ui/modules/Common/Form/RadioButton.qml
@@ -20,8 +20,6 @@ Control.RadioButton{
indicator: Rectangle {
height: fontMetrics.height - 5
width: height
- //onHeightChanged: height = fontMetrics.height - 5
- //onWidthChanged: width = fontMetrics.height - 5
x: parent.leftPadding
y: parent.height / 2 - height / 2
radius: width/2
diff --git a/linphone-app/ui/modules/Common/Misc/Paned.qml b/linphone-app/ui/modules/Common/Misc/Paned.qml
index 8c0de6359..cc129096d 100644
--- a/linphone-app/ui/modules/Common/Misc/Paned.qml
+++ b/linphone-app/ui/modules/Common/Misc/Paned.qml
@@ -23,299 +23,298 @@ import Utils 1.0
// =============================================================================
Item {
- id: container
-
- // ---------------------------------------------------------------------------
-
- property alias childA: contentA.data
- property alias childAItem: contentA
- property alias childB: contentB.data
- property bool defaultClosed: false
- property bool resizeAInPriority: false
- property int closingEdge: Qt.LeftEdge // `LeftEdge` or `RightEdge`.
- property int defaultChildAWidth
-
- // User limits: string or int values.
- // By default: no limits.
- property var maximumLeftLimit
- property var maximumRightLimit
- property var minimumLeftLimit: 0
- property var minimumRightLimit: 0
-
- property bool _isClosed
-
- // Internal limits.
- property var _maximumLeftLimit
- property var _maximumRightLimit
- property var _minimumLeftLimit
- property var _minimumRightLimit
-
- // ---------------------------------------------------------------------------
- // Public functions.
- // ---------------------------------------------------------------------------
-
- function isClosed () {
- return _isClosed
- }
-
- function open () {
- if (_isClosed) {
- openingTransition.running = true
- }
- }
-
- function close () {
- if (!_isClosed) {
- _close()
- }
- }
-
- // ---------------------------------------------------------------------------
- // Private functions.
- // ---------------------------------------------------------------------------
-
- function _getLimitValue (limit) {
- if (limit == null) {
- return
- }
-
- return limit.isDynamic
- ? width * limit.value
- : limit.value
- }
-
- function _parseLimit (limit) {
- if (limit == null) {
- return
- }
-
- if (Utils.isString(limit)) {
- var arr = limit.split('%')
-
- if (arr[1] === '') {
- return {
- isDynamic: true,
- value: +arr[0] / 100
- }
- }
- }
-
- return {
- value: limit
- }
- }
-
- function _applyLimits () {
- var maximumLeftLimit = _getLimitValue(_maximumLeftLimit)
- var maximumRightLimit = _getLimitValue(_maximumRightLimit)
- var minimumLeftLimit = _getLimitValue(_minimumLeftLimit)
- var minimumRightLimit = _getLimitValue(_minimumRightLimit)
-
- var theoreticalBWidth = container.width - contentA.width - handle.width
-
- // If closed, set correctly the handle position to left or right.
- if (_isClosed) {
- contentA.width = (closingEdge !== Qt.LeftEdge)
- ? container.width - handle.width
- : 0
- }
- // width(A) < minimum width(A).
- else if (contentA.width < minimumLeftLimit) {
- contentA.width = minimumLeftLimit
- }
- // width(A) > maximum width(A).
- else if (maximumLeftLimit != null && contentA.width > maximumLeftLimit) {
- contentA.width = maximumLeftLimit
- }
- // width(B) < minimum width(B).
- else if (theoreticalBWidth < minimumRightLimit) {
- contentA.width = container.width - handle.width - minimumRightLimit
- }
- // width(B) > maximum width(B).
- else if (maximumRightLimit != null && theoreticalBWidth > maximumRightLimit) {
- contentA.width = container.width - handle.width - maximumRightLimit
- } else if (resizeAInPriority) {
- contentA.width = container.width - handle.width - contentB.width
- }
- }
-
- // ---------------------------------------------------------------------------
-
- function _applyLimitsOnUserMove (offset) {
- var minimumRightLimit = _getLimitValue(_minimumRightLimit)
- var minimumLeftLimit = _getLimitValue(_minimumLeftLimit)
-
- // One area is closed.
- if (_isClosed) {
- if (closingEdge === Qt.LeftEdge) {
- if (offset > minimumLeftLimit / 2) {
- _open()
- }
- } else {
- if (-offset > minimumRightLimit / 2) {
- _open()
- }
- }
-
- return
- }
-
- // Check limits.
- var maximumLeftLimit = _getLimitValue(_maximumLeftLimit)
- var maximumRightLimit = _getLimitValue(_maximumRightLimit)
-
- var theoreticalBWidth = container.width - offset - contentA.width - handle.width
-
- // width(A) < minimum width(A).
- if (contentA.width + offset < minimumLeftLimit) {
- contentA.width = minimumLeftLimit
-
- if (closingEdge === Qt.LeftEdge && -offset > minimumLeftLimit / 2) {
- if (_isClosed) {
- _open()
- } else {
- _close()
- }
- }
- }
- // width(A) > maximum width(A).
- else if (maximumLeftLimit != null && contentA.width + offset > maximumLeftLimit) {
- contentA.width = maximumLeftLimit
- }
- // width(B) < minimum width(B).
- else if (theoreticalBWidth < minimumRightLimit) {
- contentA.width = container.width - handle.width - minimumRightLimit
-
- if (closingEdge !== Qt.LeftEdge && offset > minimumRightLimit / 2) {
- if (_isClosed) {
- _open()
- } else {
- _close()
- }
- }
- }
- // width(B) > maximum width(B).
- else if (maximumRightLimit != null && theoreticalBWidth > maximumRightLimit) {
- contentA.width = container.width - handle.width - maximumRightLimit
- }
- // Resize A/B.
- else {
- contentA.width = contentA.width + offset
- }
- }
-
- // ---------------------------------------------------------------------------
-
- function _open () {
- _isClosed = false
- _applyLimits()
- }
-
- function _close () {
- _isClosed = true
- closingTransition.running = true
- }
-
- function _inverseClosingState () {
- if (!_isClosed) {
- // Save state and close.
- _close()
- } else {
- // Restore old state.
- openingTransition.running = true
- }
- }
-
- function _isVisible (edge) {
- return (
- !_isClosed ||
- openingTransition.running ||
- closingTransition.running
- ) || closingEdge !== edge
- }
-
- // ---------------------------------------------------------------------------
-
- onWidthChanged: _applyLimits()
-
- Component.onCompleted: {
- // Unable to modify these properties after creation.
- // It's a desired choice.
- _maximumLeftLimit = _parseLimit(maximumLeftLimit)
- _maximumRightLimit = _parseLimit(maximumRightLimit)
- _minimumLeftLimit = _parseLimit(minimumLeftLimit)
- _minimumRightLimit = _parseLimit(minimumRightLimit)
-
- contentA.width = (defaultChildAWidth == null)
- ? _getLimitValue(_minimumLeftLimit)
- : defaultChildAWidth
-
- _isClosed = defaultClosed
- }
-
- Item {
- id: contentA
-
- height: parent.height
- visible: _isVisible(Qt.LeftEdge)
- onVisibleChanged: console.log(visible)
- }
-
- MouseArea {
- id: handle
-
- property int _mouseStart
-
- anchors.left: contentA.right
- cursorShape: Qt.SplitHCursor
- height: parent.height
- hoverEnabled: true
- width: PanedStyle.handle.width
-
- onDoubleClicked: _inverseClosingState()
- onMouseXChanged: pressed &&
- _applyLimitsOnUserMove(mouseX - _mouseStart)
- onPressed: _mouseStart = mouseX
-
- Rectangle {
- anchors.fill: parent
- color: parent.pressed
- ? PanedStyle.handle.color.pressed
- : (parent.containsMouse
- ? PanedStyle.handle.color.hovered
- : PanedStyle.handle.color.normal
- )
- }
- }
-
- Item {
- id: contentB
-
- anchors.left: handle.right
- height: parent.height
- visible: _isVisible(Qt.RightEdge)
- width: container.width - contentA.width - handle.width
- }
-
- PropertyAnimation {
- id: openingTransition
-
- duration: PanedStyle.transitionDuration
- property: 'width'
- target: contentA
- to: closingEdge === Qt.LeftEdge
- ? minimumLeftLimit
- : container.width - minimumRightLimit - handle.width
-
- onRunningChanged: !running && _open()
- }
-
- PropertyAnimation {
- id: closingTransition
-
- duration: PanedStyle.transitionDuration
- property: 'width'
- target: contentA
- to: closingEdge === Qt.LeftEdge ? 0 : container.width - handle.width
- }
+ id: container
+
+ // ---------------------------------------------------------------------------
+
+ property alias childA: contentA.data
+ property alias childAItem: contentA
+ property alias childB: contentB.data
+ property bool defaultClosed: false
+ property bool resizeAInPriority: false
+ property int closingEdge: Qt.LeftEdge // `LeftEdge` or `RightEdge`.
+ property int defaultChildAWidth
+
+ // User limits: string or int values.
+ // By default: no limits.
+ property var maximumLeftLimit
+ property var maximumRightLimit
+ property int minimumLeftLimit: 0
+ property int minimumRightLimit: 0
+
+ property bool _isClosed
+
+ // Internal limits.
+ property var _maximumLeftLimit
+ property var _maximumRightLimit
+ property var _minimumLeftLimit
+ property var _minimumRightLimit
+
+ // ---------------------------------------------------------------------------
+ // Public functions.
+ // ---------------------------------------------------------------------------
+
+ function isClosed () {
+ return _isClosed
+ }
+
+ function open () {
+ if (_isClosed) {
+ openingTransition.running = true
+ }
+ }
+
+ function close () {
+ if (!_isClosed) {
+ _close()
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+ // Private functions.
+ // ---------------------------------------------------------------------------
+
+ function _getLimitValue (limit) {
+ if (limit == null) {
+ return
+ }
+
+ return limit.isDynamic
+ ? width * limit.value
+ : limit.value
+ }
+
+ function _parseLimit (limit) {
+ if (limit == null) {
+ return
+ }
+
+ if (Utils.isString(limit)) {
+ var arr = limit.split('%')
+
+ if (arr[1] === '') {
+ return {
+ isDynamic: true,
+ value: +arr[0] / 100
+ }
+ }
+ }
+
+ return {
+ value: limit
+ }
+ }
+
+ function _applyLimits () {
+ var maximumLeftLimit = _getLimitValue(_maximumLeftLimit)
+ var maximumRightLimit = _getLimitValue(_maximumRightLimit)
+ var minimumLeftLimit = _getLimitValue(_minimumLeftLimit)
+ var minimumRightLimit = _getLimitValue(_minimumRightLimit)
+
+ var theoreticalBWidth = container.width - contentA.width - handle.width
+
+ // If closed, set correctly the handle position to left or right.
+ if (_isClosed) {
+ contentA.width = (closingEdge !== Qt.LeftEdge)
+ ? container.width - handle.width
+ : 0
+ }
+ // width(A) < minimum width(A).
+ else if (contentA.width < minimumLeftLimit) {
+ contentA.width = minimumLeftLimit
+ }
+ // width(A) > maximum width(A).
+ else if (maximumLeftLimit != null && contentA.width > maximumLeftLimit) {
+ contentA.width = maximumLeftLimit
+ }
+ // width(B) < minimum width(B).
+ else if (theoreticalBWidth < minimumRightLimit) {
+ contentA.width = container.width - handle.width - minimumRightLimit
+ }
+ // width(B) > maximum width(B).
+ else if (maximumRightLimit != null && theoreticalBWidth > maximumRightLimit) {
+ contentA.width = container.width - handle.width - maximumRightLimit
+ } else if (resizeAInPriority) {
+ contentA.width = container.width - handle.width - contentB.width
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+
+ function _applyLimitsOnUserMove (offset) {
+ var minimumRightLimit = _getLimitValue(_minimumRightLimit)
+ var minimumLeftLimit = _getLimitValue(_minimumLeftLimit)
+
+ // One area is closed.
+ if (_isClosed) {
+ if (closingEdge === Qt.LeftEdge) {
+ if (offset > minimumLeftLimit / 2) {
+ _open()
+ }
+ } else {
+ if (-offset > minimumRightLimit / 2) {
+ _open()
+ }
+ }
+
+ return
+ }
+
+ // Check limits.
+ var maximumLeftLimit = _getLimitValue(_maximumLeftLimit)
+ var maximumRightLimit = _getLimitValue(_maximumRightLimit)
+
+ var theoreticalBWidth = container.width - offset - contentA.width - handle.width
+
+ // width(A) < minimum width(A).
+ if (contentA.width + offset < minimumLeftLimit) {
+ contentA.width = minimumLeftLimit
+
+ if (closingEdge === Qt.LeftEdge && -offset > minimumLeftLimit / 2) {
+ if (_isClosed) {
+ _open()
+ } else {
+ _close()
+ }
+ }
+ }
+ // width(A) > maximum width(A).
+ else if (maximumLeftLimit != null && contentA.width + offset > maximumLeftLimit) {
+ contentA.width = maximumLeftLimit
+ }
+ // width(B) < minimum width(B).
+ else if (theoreticalBWidth < minimumRightLimit) {
+ contentA.width = container.width - handle.width - minimumRightLimit
+
+ if (closingEdge !== Qt.LeftEdge && offset > minimumRightLimit / 2) {
+ if (_isClosed) {
+ _open()
+ } else {
+ _close()
+ }
+ }
+ }
+ // width(B) > maximum width(B).
+ else if (maximumRightLimit != null && theoreticalBWidth > maximumRightLimit) {
+ contentA.width = container.width - handle.width - maximumRightLimit
+ }
+ // Resize A/B.
+ else {
+ contentA.width = contentA.width + offset
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+
+ function _open () {
+ _isClosed = false
+ _applyLimits()
+ }
+
+ function _close () {
+ _isClosed = true
+ closingTransition.running = true
+ }
+
+ function _inverseClosingState () {
+ if (!_isClosed) {
+ // Save state and close.
+ _close()
+ } else {
+ // Restore old state.
+ openingTransition.running = true
+ }
+ }
+
+ function _isVisible (edge) {
+ return (
+ !_isClosed ||
+ openingTransition.running ||
+ closingTransition.running
+ ) || closingEdge !== edge
+ }
+
+ // ---------------------------------------------------------------------------
+
+ onWidthChanged: _applyLimits()
+
+ Component.onCompleted: {
+ // Unable to modify these properties after creation.
+ // It's a desired choice.
+ _maximumLeftLimit = _parseLimit(maximumLeftLimit)
+ _maximumRightLimit = _parseLimit(maximumRightLimit)
+ _minimumLeftLimit = _parseLimit(minimumLeftLimit)
+ _minimumRightLimit = _parseLimit(minimumRightLimit)
+
+ contentA.width = (defaultChildAWidth == null)
+ ? _getLimitValue(_minimumLeftLimit)
+ : defaultChildAWidth
+
+ _isClosed = defaultClosed
+ }
+
+ Item {
+ id: contentA
+
+ height: parent.height
+ visible: _isVisible(Qt.LeftEdge)
+ }
+
+ MouseArea {
+ id: handle
+
+ property int _mouseStart
+
+ anchors.left: contentA.right
+ cursorShape: Qt.SplitHCursor
+ height: parent.height
+ hoverEnabled: true
+ width: PanedStyle.handle.width
+
+ onDoubleClicked: _inverseClosingState()
+ onMouseXChanged: pressed &&
+ _applyLimitsOnUserMove(mouseX - _mouseStart)
+ onPressed: _mouseStart = mouseX
+
+ Rectangle {
+ anchors.fill: parent
+ color: parent.pressed
+ ? PanedStyle.handle.color.pressed
+ : (parent.containsMouse
+ ? PanedStyle.handle.color.hovered
+ : PanedStyle.handle.color.normal
+ )
+ }
+ }
+
+ Item {
+ id: contentB
+
+ anchors.left: handle.right
+ height: parent.height
+ visible: _isVisible(Qt.RightEdge)
+ width: container.width - contentA.width - handle.width
+ }
+
+ PropertyAnimation {
+ id: openingTransition
+
+ duration: PanedStyle.transitionDuration
+ property: 'width'
+ target: contentA
+ to: closingEdge === Qt.LeftEdge
+ ? minimumLeftLimit
+ : container.width - minimumRightLimit - handle.width
+
+ onRunningChanged: !running && _open()
+ }
+
+ PropertyAnimation {
+ id: closingTransition
+
+ duration: PanedStyle.transitionDuration
+ property: 'width'
+ target: contentA
+ to: closingEdge === Qt.LeftEdge ? 0 : container.width - handle.width
+ }
}
diff --git a/linphone-app/ui/modules/Common/Picker/DatePicker.qml b/linphone-app/ui/modules/Common/Picker/DatePicker.qml
index 7001df748..f6fe8ae43 100644
--- a/linphone-app/ui/modules/Common/Picker/DatePicker.qml
+++ b/linphone-app/ui/modules/Common/Picker/DatePicker.qml
@@ -43,8 +43,6 @@ Item{
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
- //Layout.fillWidth: true
- //Layout.fillHeight: true
property int maxYears: 5 // Max years to be requested.
diff --git a/linphone-app/ui/modules/Common/Picker/TimePicker.qml b/linphone-app/ui/modules/Common/Picker/TimePicker.qml
index 8a52c672c..c187458ae 100644
--- a/linphone-app/ui/modules/Common/Picker/TimePicker.qml
+++ b/linphone-app/ui/modules/Common/Picker/TimePicker.qml
@@ -56,10 +56,8 @@ Item{
path: Path {
id: outPath
- //property int xStep: middleMinSize * Math.sin(2 * Math.PI / outer.count)
property int yStep: middleMinSize * Math.cos(2 * Math.PI / outer.count)
- //startX: xStep + mainItem.width/2; startY: yStep + mainItem.height/2
startX: mainItem.centerPosition
startY: mainItem.centerPosition - outPath.yStep
PathArc {
@@ -111,8 +109,7 @@ Item{
path: Path {
id: innerPath
- //property int xStep: middleMinSize * Math.sin(2 * Math.PI / inner.count)
- property int yStep: middleMinSize * Math.cos(2 * Math.PI / inner.count)
+ property int yStep: middleMinSize * Math.cos(2 * Math.PI / inner.count)
startX: mainItem.centerPosition; startY: mainItem.centerPosition - innerPath.yStep
PathArc {
x: mainItem.centerPosition; y: mainItem.centerPosition + innerPath.yStep
diff --git a/linphone-app/ui/modules/Linphone/Blocks/RequestBlock.qml b/linphone-app/ui/modules/Linphone/Blocks/RequestBlock.qml
index 63be79715..18c4cca63 100644
--- a/linphone-app/ui/modules/Linphone/Blocks/RequestBlock.qml
+++ b/linphone-app/ui/modules/Linphone/Blocks/RequestBlock.qml
@@ -31,7 +31,6 @@ Column {
// ----------------------------------------------------------------------------
- //height: errorBlock.implicitHeight + busy.height// RequestBlockStyle.height
TextEdit {
id: errorBlock
readOnly: true
@@ -58,7 +57,6 @@ Column {
id: busy
anchors {
horizontalCenter: parent.horizontalCenter
- //top: parent.top
}
height: visible ? RequestBlockStyle.loadingIndicator.height : 0
diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml b/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml
index f5ebec2d0..c26ad028e 100644
--- a/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml
+++ b/linphone-app/ui/modules/Linphone/Camera/CameraItem.qml
@@ -20,7 +20,7 @@ Item {
property CallModel callModel
property bool isPreview: !callModel || !container.currentDevice || container.currentDevice.isMe
property bool isFullscreen: false
- property bool hideCamera: false //callModel.pausedByUser
+ property bool hideCamera: false
property bool isPaused: false
property bool isVideoEnabled: enabled
&& (!callModel || callModel.videoEnabled)
@@ -31,14 +31,8 @@ Item {
property bool b: container.currentDevice && container.currentDevice.videoEnabled
property bool c: container.currentDevice && container.currentDevice.isMe
property bool d : callModel && callModel.cameraEnabled
- onAChanged: console.log("A: " + a + ", " +callModel)
- onBChanged: console.log("B: " + b + ", " +container.currentDevice)
- onCChanged: console.log("C: " + c + ", " +container.currentDevice)
- onDChanged: console.log("D: " + d + ", " +callModel)
- onIsVideoEnabledChanged: console.log('VideoIsEnabled: '+isVideoEnabled)
-
- //onIsVideoEnabledChanged: console.log(callModel.videoEnabled + ","+container.currentDevice.videoEnabled+','+container.currentDevice.isMe+','+callModel.cameraEnabled)
property bool isReady: cameraLoader.item && cameraLoader.item.isReady
+
onCurrentDeviceChanged: resetActive()
function resetActive(){
resetTimer.resetActive()
@@ -50,7 +44,7 @@ Item {
anchors.fill: parent
- active: container.enabled && !resetActive && container.isVideoEnabled //avatarCell.currentDevice && (avatarCell.currentDevice.videoEnabled && !conference._fullscreen)
+ active: container.enabled && !resetActive && container.isVideoEnabled
sourceComponent: container.isVideoEnabled && !container.isPaused? camera : null
Timer{
@@ -77,8 +71,6 @@ Item {
isPreview: container.isPreview
onRequestNewRenderer: {resetTimer.resetActive()}
- Component.onDestruction: {/*resetWindowId();*/ console.log("Destroyed Camera [" + isPreview + "] : " + camera)}
- Component.onCompleted: console.log("Completed Camera [" + isPreview + "] : " + camera)
}
}
}
diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml
index d7f1e5788..b570574c1 100644
--- a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml
+++ b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml
@@ -55,7 +55,7 @@ Item{
Loader {
anchors.centerIn: parent
- active: mainItem.currentDevice && !camera.isReady //&& !mainItem.currentDevice.isMe && (!mainItem.currentDevice.videoEnabled || mainItem.isFullscreen)
+ active: mainItem.currentDevice && !camera.isReady
sourceComponent: avatar
}
}
@@ -135,15 +135,6 @@ Item{
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
diff --git a/linphone-app/ui/modules/Linphone/Chat/Chat.qml b/linphone-app/ui/modules/Linphone/Chat/Chat.qml
index 46f0637ca..5c1ff0572 100644
--- a/linphone-app/ui/modules/Linphone/Chat/Chat.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/Chat.qml
@@ -441,7 +441,6 @@ Rectangle {
if(proxyModel.chatRoomModel) {
proxyModel.sendMessage(text)
}else{
- console.log("Peer : " +proxyModel.peerAddress+ "/"+chat.model.peerAddress)
proxyModel.chatRoomModel = CallsListModel.createChat(proxyModel.peerAddress)
proxyModel.sendMessage(text)
}
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml
index 822fab262..7a7f2b08c 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml
@@ -27,7 +27,6 @@ Loader{
property ConferenceInfoModel conferenceInfoModel: contentModel ? contentModel.conferenceInfoModel : null
property int maxWidth : parent.width
property int fitHeight: active && item ? item.fitHeight + ChatCalendarMessageStyle.topMargin+ChatCalendarMessageStyle.bottomMargin + (isExpanded? 200 : 0): 0
- //property int fitWidth: active && item ? Math.max(item.fitWidth, maxWidth/2) + ChatCalendarMessageStyle.widthMargin*2 : 0
property int fitWidth: active && item ? maxWidth/2 + ChatCalendarMessageStyle.widthMargin*2 : 0
property bool containsMouse: false
property int gotoButtonMode: -1 //-1: hide, 0:goto, 1:MoreInfo
@@ -41,7 +40,6 @@ Loader{
property font customFont : SettingsModel.textMessageFont
active: mainItem.conferenceInfoModel
- // (mainItem.contentModel && mainItem.contentModel.isIcalendar()) || (!mainItem.contentModel && mainItem.conferenceInfoModel)
sourceComponent: MouseArea{
id: loadedItem
@@ -99,21 +97,19 @@ Loader{
}
Text{
Layout.fillWidth: true
- //Layout.minimumWidth: implicitWidth
- //Layout.preferredWidth: implicitWidth
Layout.rightMargin: 15
horizontalAlignment: Qt.AlignRight
verticalAlignment: Qt.AlignVCenter
color: ChatCalendarMessageStyle.schedule.color
elide: Text.ElideRight
font.pointSize: ChatCalendarMessageStyle.schedule.pointSize
- text: 'Organisateur : ' +UtilsCpp.getDisplayName(mainItem.conferenceInfoModel.organizer)
+ //: 'Organizer' : Label Title for the organizer.
+ text: qsTr('icsOrganizer') +' : ' +UtilsCpp.getDisplayName(mainItem.conferenceInfoModel.organizer)
}
}
Text{
id: title
Layout.fillWidth: true
- //Layout.preferredHeight:
Layout.leftMargin: 10
Layout.alignment: Qt.AlignRight
elide: Text.ElideRight
@@ -198,8 +194,8 @@ Loader{
color: ChatCalendarMessageStyle.subject.color
font.pointSize: ChatCalendarMessageStyle.subject.pointSize
font.weight: Font.Bold
-
- text: 'Description :'
+ //: 'Description' : Title for the conference description.
+ text: qsTr('icsDescription')
visible: description.text != ''
}
TextAreaField{
@@ -215,10 +211,6 @@ Loader{
border.width: 0
visible: description.text != ''
- //font.weight: Font.Bold
- //elide: Text.ElideRight
- //wrapMode: TextEdit.WordWrap
-
text: mainItem.conferenceInfoModel.description
}
Item{
@@ -233,7 +225,8 @@ Loader{
font.pointSize: ChatCalendarMessageStyle.subject.pointSize
font.weight: Font.Bold
- text: 'Lien de la conférence'
+ //: 'Conference address' : Title for the conference address.
+ text: qsTr('icsconferenceAddressTitle')
}
RowLayout{
Layout.fillWidth: true
@@ -269,7 +262,8 @@ Loader{
Layout.fillWidth: true
}
TextButtonC{
- text: 'REJOINDRE'
+ //: 'Join' : Action button to join the conference.
+ text: qsTr('icsJoinButton').toUpperCase()
onClicked: CallsListModel.prepareConferenceCall(mainItem.conferenceInfoModel)
}
ActionButton{
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatDeliveries.qml b/linphone-app/ui/modules/Linphone/Chat/ChatDeliveries.qml
index 9758001ae..9bd2d1fcf 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatDeliveries.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatDeliveries.qml
@@ -47,11 +47,14 @@ Loader{
//: 'Read by %1 - %2' Little message to indicate the state of a message
//~ Context %1 is someone, %2 is a date/time. The state that the message has been read.
return qsTr('deliveryDisplayed').arg(displayName).arg(stateChangeTime)
- else// if(state == LinphoneEnums.ChatMessageStateNotDelivered)
+ else if(state == LinphoneEnums.ChatMessageStateNotDelivered)
//: "%1 have nothing received" Little message to indicate the state of a message
//~ Context %1 is someone. The state is that the message hasn't been delivered.
return qsTr('deliveryNotDelivered').arg(displayName)
- //else return ''
+ else
+ //: "Error while sending to %1" Little message to indicate the state of a message
+ //~ Context %1 is someone. The state is that the message hasn't been delivered because of an error.
+ return qsTr('deliveryError').arg(displayName)
}
delegate:Text{
height: ChatStyle.composingText.height-5
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatFileMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatFileMessage.qml
index 0a82597a7..ec1be0409 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatFileMessage.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatFileMessage.qml
@@ -105,8 +105,6 @@ Row {
mipmap: SettingsModel.mipmapEnabled
source: 'file:/'+mainRow.contentModel.filePath
fillMode: Image.PreserveAspectFit
- //width: 200
- //height: 100
}
}
@@ -292,9 +290,6 @@ Row {
anchors.fill: parent
visible: true
- //downloadButton.visible || ((rectangle.isUploaded || rectangle.isRead) && !isOutgoing) || isOutgoing
- //onVisibleChanged: console.log("Mouse of "+mainRow.contentModel.name+" / "+downloadButton.visible
- // +"/"+rectangle.isUploaded +"/"+rectangle.isRead)
onClicked: {
if (Utils.pointIsInItem(this, thumbnailProvider, mouse)) {
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatFilePreview.qml b/linphone-app/ui/modules/Linphone/Chat/ChatFilePreview.qml
index 09c468362..5349357ee 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatFilePreview.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatFilePreview.qml
@@ -49,7 +49,6 @@ Item{
width: height * ChatFilePreviewStyle.filePreview.format
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 7
- //anchors.horizontalCenter: parent.horizontalCenter
thumbnail: $modelData.thumbnail
name: $modelData.name
animationScale: 1.1
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml
index 4ee7059d0..847d67805 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatReplyMessage.qml
@@ -144,8 +144,6 @@ Item {
delegate: ChatContent{
contentModel: $modelData
textColor: ChatReplyMessageStyle.replyArea.foregroundColor
- //textFont.pointSize: Units.dp * (customFont.pointSize + ChatReplyMessageStyle.replyArea.pointSizeOffset)
- //textFont.weight: Font.Light
onFitWidthChanged:{
replyMessage.updateWidth()
}
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatReplyPreview.qml b/linphone-app/ui/modules/Linphone/Chat/ChatReplyPreview.qml
index a7b0d1926..6539a6496 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatReplyPreview.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatReplyPreview.qml
@@ -90,7 +90,6 @@ Rectangle{
delegate: ChatContent{
contentModel: $modelData
- //textFont.pointSize: Units.dp * (SettingsModel.textMessageFont.pointSize - 2)
Rectangle{
anchors.left: parent.left
anchors.right: parent.right
diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatTextMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatTextMessage.qml
index 9fc45e131..a3cc6428a 100644
--- a/linphone-app/ui/modules/Linphone/Chat/ChatTextMessage.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/ChatTextMessage.qml
@@ -53,7 +53,6 @@ TextEdit {
textFormat: Text.RichText // To supports links and imgs.
wrapMode: TextEdit.Wrap
- //onCursorRectangleChanged: if(!readOnly) Logic.ensureVisible(cursorRectangle)
onLinkActivated: Qt.openUrlExternally(link)
onSelectedTextChanged:{
if(selectedText != '') lastTextSelected = selectedText
diff --git a/linphone-app/ui/modules/Linphone/Chat/Message.qml b/linphone-app/ui/modules/Linphone/Chat/Message.qml
index c92f10b94..8ced6bd88 100644
--- a/linphone-app/ui/modules/Linphone/Chat/Message.qml
+++ b/linphone-app/ui/modules/Linphone/Chat/Message.qml
@@ -129,7 +129,6 @@ Item {
anchors.bottom:parent.bottom
anchors.rightMargin : 5
visible:$chatEntry.isEphemeral
- //onVisibleChanged: container.updateHeight()
Text{
id: ephemeralText
anchors.bottom: parent.bottom
diff --git a/linphone-app/ui/modules/Linphone/Contact/Avatar.qml b/linphone-app/ui/modules/Linphone/Contact/Avatar.qml
index f166ad412..04598a538 100644
--- a/linphone-app/ui/modules/Linphone/Contact/Avatar.qml
+++ b/linphone-app/ui/modules/Linphone/Contact/Avatar.qml
@@ -19,7 +19,6 @@ Item {
property var _initialsRegex: /^\s*([^\s\.]+)(?:[\s\.]+([^\s\.]+))?/
- //onPresenceLevelChanged: console.log(Presence.getPresenceLevelIconName(presenceLevel)+' => '+username)
// ---------------------------------------------------------------------------
function isLoaded () {
diff --git a/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml b/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml
index 50404512e..0932b0701 100644
--- a/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml
+++ b/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml
@@ -43,6 +43,8 @@ DialogPlus {
Component.onDestruction: SettingsModel.stopCaptureGraph()
onCallChanged: !call && exit(0)
+ //: 'Multimedia parameters' : Menu title to show multimedia devices configuration.
+ title: qsTr('menuMultimedia')
// ---------------------------------------------------------------------------
Column {
diff --git a/linphone-app/ui/modules/Linphone/File/FileView.qml b/linphone-app/ui/modules/Linphone/File/FileView.qml
index 8a2424893..7637ef0f1 100644
--- a/linphone-app/ui/modules/Linphone/File/FileView.qml
+++ b/linphone-app/ui/modules/Linphone/File/FileView.qml
@@ -60,8 +60,6 @@ Item {
id: thumbnailProvider
anchors.fill: parent
- //Layout.fillHeight: true
- //Layout.preferredWidth: parent.height
sourceComponent: (mainItem.active ? (mainItem.thumbnail ? thumbnailImage : extension ): undefined)
@@ -90,7 +88,7 @@ Item {
thumbnailProviderAnimator.running = false
}
- mainItem.z = 999//Constants.zPopup
+ mainItem.z = Constants.zPopup
thumbnailProviderAnimator.to = mainItem.animationScale
thumbnailProviderAnimator.running = true
}
diff --git a/linphone-app/ui/modules/Linphone/History/Event.qml b/linphone-app/ui/modules/Linphone/History/Event.qml
index c0ce1d86a..ff61042fb 100644
--- a/linphone-app/ui/modules/Linphone/History/Event.qml
+++ b/linphone-app/ui/modules/Linphone/History/Event.qml
@@ -90,37 +90,6 @@ Row {
translation = 'unknownCallEvent'
}
}
- /*
- property string _type: {
- var status = $historyEntry.status
-
- if (status === HistoryModel.CallStatusSuccess) {
- if (!$historyEntry.isStart) {
- return 'ended_call'
- }
- return $historyEntry.isOutgoing ? 'outgoing_call' : 'incoming_call'
- }
- if (status === HistoryModel.CallStatusDeclined) {
- return $historyEntry.isOutgoing ? 'declined_outgoing_call' : 'declined_incoming_call'
- }
- if (status === HistoryModel.CallStatusMissed) {
- return $historyEntry.isOutgoing ? 'missed_outgoing_call' : 'missed_incoming_call'
- }
- if (status === HistoryModel.CallStatusAborted) {
- return $historyEntry.isOutgoing ? 'outgoing_call' : 'incoming_call'
- }
- if (status === HistoryModel.CallStatusEarlyAborted) {
- return $historyEntry.isOutgoing ? 'missed_outgoing_call' : 'missed_incoming_call'
- }
- if (status === HistoryModel.CallStatusAcceptedElsewhere) {
- return $historyEntry.isOutgoing ? 'outgoing_call' : 'incoming_call'
- }
- if (status === HistoryModel.CallStatusDeclinedElsewhere) {
- return $historyEntry.isOutgoing ? 'declined_outgoing_call' : 'declined_incoming_call'
- }
-
- return 'unknown_call_event'
- }*/
height: HistoryStyle.entry.lineHeight
spacing: HistoryStyle.entry.message.extraContent.spacing
@@ -174,7 +143,6 @@ Row {
}
}
ActionButton {
- //height: HistoryStyle.entry.lineHeight
isCustom: true
backgroundRadius: 8
colorSet: HistoryStyle.entry.deleteAction
diff --git a/linphone-app/ui/modules/Linphone/Menus/VideoConferenceMenu.qml b/linphone-app/ui/modules/Linphone/Menus/VideoConferenceMenu.qml
index 0a65b9425..01dbd9a6f 100644
--- a/linphone-app/ui/modules/Linphone/Menus/VideoConferenceMenu.qml
+++ b/linphone-app/ui/modules/Linphone/Menus/VideoConferenceMenu.qml
@@ -22,7 +22,6 @@ Rectangle{
property ConferenceModel conferenceModel: callModel.conferenceModel
property ParticipantModel me: conferenceModel.localParticipant
property bool isMeAdmin: me && me.adminStatus
- onIsMeAdminChanged: console.log("Is admin : " +isMeAdmin)
property bool isParticipantsMenu: false
signal close()
@@ -33,9 +32,14 @@ Rectangle{
// List of title texts in order to allow bindings between all components
property var menuTitles: [
- 'Régler les périphériques'
- , 'Modifier la mise en page'
- , mainItem.isMeAdmin ? 'Inviter des participants' : 'Participants'
+ //: 'Multimedia parameters' : Menu title to show multimedia devices configuration.
+ qsTr('conferenceMenuMultimedia'),
+ //: 'Change layout' : Menu title to change the conference layout.
+ qsTr('conferenceMenuLayout'),
+ //: 'Invite participants' : Menu title to invite participants in admin mode.
+ mainItem.isMeAdmin ? qsTr('conferenceMenuInvite')
+ //: 'Participants list' : Menu title to show participants in non-admin mode.
+ : qsTr('conferenceMenuParticipants')
]
function showParticipantsMenu(){
@@ -55,8 +59,6 @@ Rectangle{
RowLayout{
anchors.fill: parent
ActionButton{
- //Layout.minimumHeight: VideoConferenceMenuStyle.buttons.back.iconSize
- //Layout.minimumWidth: VideoConferenceMenuStyle.buttons.back.iconSize
backgroundRadius: width/2
isCustom: true
colorSet: VideoConferenceMenuStyle.buttons.back
@@ -65,7 +67,7 @@ Rectangle{
}
Text{
id: titleMenu
- text: contentsStack.currentItem.title //'Paramètres'
+ text: contentsStack.currentItem.title
Layout.fillWidth: true
Layout.preferredHeight: implicitHeight
horizontalAlignment: Qt.AlignCenter
@@ -90,18 +92,16 @@ Rectangle{
initialItem: settingsMenuComponent
Layout.fillHeight: true
Layout.fillWidth: true
- //onPopEnterChanged: if(nViews <= 1 ) title.text = 'Paramètres'
}
Component{
id: settingsMenuComponent
ColumnLayout{
property string objectName: 'settingsMenu'
- property string title: 'Paramètres'
+ //: 'Settings' : Main menu title for settings.
+ property string title: qsTr('conferenceMenuTitle')
Layout.fillHeight: true
Layout.fillWidth: true
-
-
Repeater{
model: [
{titleIndex: 0
@@ -186,6 +186,7 @@ Rectangle{
showMargins: true
expandHeight: false
fixedSize: false
+ showTitleBar: false
onExitStatus: contentsStack.pop()
}
Item{// Spacer
@@ -202,9 +203,12 @@ Rectangle{
Layout.fillHeight: true
Layout.fillWidth: true
Repeater{
- model: [{text: 'Mode mosaïque', icon: VideoConferenceMenuStyle.modeIcons.gridIcon, value:LinphoneEnums.ConferenceLayoutGrid}
- , {text: 'Mode présentateur', icon: VideoConferenceMenuStyle.modeIcons.activeSpeakerIcon, value:LinphoneEnums.ConferenceLayoutActiveSpeaker}
- , {text: 'Mode audio', icon: VideoConferenceMenuStyle.modeIcons.audioOnlyIcon, value:2}
+ //: 'Mosaic mode' : Grid layout for video conference.
+ model: [{text: qsTr('conferenceMenuGridLayout'), icon: VideoConferenceMenuStyle.modeIcons.gridIcon, value:LinphoneEnums.ConferenceLayoutGrid}
+ //: 'Active speaker mode' : Active speaker layout for video conference.
+ , {text: qsTr('conferenceMenuActiveSpeakerLayout'), icon: VideoConferenceMenuStyle.modeIcons.activeSpeakerIcon, value:LinphoneEnums.ConferenceLayoutActiveSpeaker}
+ //: 'Audio only mode' : Audio only layout for video conference.
+ , {text: qsTr('conferenceMenuAudioLayout'), icon: VideoConferenceMenuStyle.modeIcons.audioOnlyIcon, value:2}
]
delegate:
Borders{
@@ -225,7 +229,6 @@ Rectangle{
checked: mainItem.callModel ? (mainItem.callModel.videoEnabled && modelData.value == mainItem.callModel.conferenceVideoLayout)
|| (!mainItem.callModel.videoEnabled && modelData.value == 2)
: false
- onCheckedChanged: console.log(mainItem.callModel ? mainItem.callModel.videoEnabled +","+mainItem.callModel.conferenceVideoLayout : '')
text: modelData.text
onClicked: if(modelData.value == 2) mainItem.callModel.videoEnabled = false
else mainItem.callModel.conferenceVideoLayout = modelData.value
@@ -260,11 +263,11 @@ Rectangle{
Layout.fillWidth: true
Layout.leftMargin: 10
Layout.rightMargin: 10
- //Layout.minimumHeight: fitHeight
conferenceModel: mainItem.conferenceModel
isAdmin: mainItem.isMeAdmin
- Text{
- text: 'Vous êtes actuellement seul dans cette conférence'
+ Text{
+ //: 'Your are currently alone in this conference' : Message to warn the user when there is no other participant.
+ text: qsTr('conferenceMenuParticipantsAlone')
visible: parent.count
}
}
diff --git a/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml b/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml
index a7f2caf0e..e055994c5 100644
--- a/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml
+++ b/linphone-app/ui/modules/Linphone/Timeline/Timeline.qml
@@ -27,7 +27,6 @@ Rectangle {
// ---------------------------------------------------------------------------
- //signal entrySelected (string entry)
signal entrySelected (TimelineModel entry)
signal entryClicked(TimelineModel entry)
signal showHistoryRequest()
@@ -64,7 +63,6 @@ Rectangle {
Layout.alignment: Qt.AlignTop
color: showHistory.containsMouse?TimelineStyle.legend.backgroundColor.hovered:TimelineStyle.legend.backgroundColor.normal
visible: showHistoryButton || showFiltersButtons
- //visible:view.count > 0 || timeline.isFilterVisible || timeline.model.filterFlags > 0 || CoreManager.eventCount > 0
MouseArea{// no more showing history
id:showHistory
@@ -405,7 +403,6 @@ Rectangle {
preventStealing: false
onClicked: {
if(mouse.button == Qt.LeftButton){
- //if($modelData.selected || !view.updateSelectionModels)// Update selection
timeline.entryClicked($modelData)
if(view){
if(view.updateSelectionModels)
diff --git a/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml b/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml
index 46d961471..d69121735 100644
--- a/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml
+++ b/linphone-app/ui/modules/Linphone/View/ParticipantsListView.qml
@@ -25,8 +25,6 @@ ColumnLayout {
property bool isAdmin : (chatRoomModel && chatRoomModel.isMeAdmin && !chatRoomModel.isReadOnly) || (me && me.adminStatus)
property bool canHandleParticipants : isAdmin && ( (chatRoomModel && chatRoomModel.canHandleParticipants) || conferenceModel)
property bool haveEncryption: chatRoomModel && chatRoomModel.haveEncryption
- onIsAdminChanged: console.log("participantsListView is admin : "+isAdmin)
- onCanHandleParticipantsChanged: console.log("CanHandleParticipants:"+canHandleParticipants)
spacing: ParticipantsListViewStyle.mainLayout.spacing
SmartSearchBar {
@@ -41,10 +39,10 @@ ColumnLayout {
maxMenuHeight: MainWindowStyle.searchBox.maxHeight
//: 'Add Participants' : Placeholder in a search bar for adding participant to the chat room
- placeholderText: 'addParticipantPlaceholder'
+ placeholderText: qsTr('addParticipantPlaceholder')
//: 'Search participants in your contact list in order to invite them into the chat room.'
//~ Tooltip Explanation for inviting the selected participants into chat room
- tooltipText: 'addParticipantTooltip'
+ tooltipText: qsTr('addParticipantTooltip')
actions:[{
colorSet: ParticipantsListViewStyle.addParticipant,
secure: mainLayout.haveEncryption,
@@ -68,7 +66,6 @@ ColumnLayout {
Layout.fillWidth: true
Layout.bottomMargin: 5
- //readOnly: toAddView.count >= conferenceManager.maxParticipants
textFieldStyle: TextFieldStyle.unbordered
ColumnLayout{
@@ -103,7 +100,6 @@ ColumnLayout {
id: participantView
Layout.fillHeight: true
Layout.fillWidth: true
- //anchors.fill: parent
showContactAddress:false
showSwitch : mainLayout.isAdmin
@@ -117,10 +113,10 @@ ColumnLayout {
colorSet: ParticipantsListViewStyle.removeParticipant,
secure:0,
visible:true,
- tooltipText: 'Remove this participant from the selection',
+ //: 'Remove this participant from the list' : Tootltip to explain that the action will lead to remove the participant.
+ tooltipText: qsTr('participantsListRemoveTooltip'),
handler: function (entry) {
selectedParticipants.removeModel(entry)
- // ++lastContacts.reloadCount
}
}]
: []
diff --git a/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml b/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml
index 27a4991a5..60b436768 100644
--- a/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml
+++ b/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml
@@ -21,7 +21,6 @@ ScrollableListView {
property string genSipAddress
- // Optional parameters.chatRoomModel.isMeAdmin
property string headerButtonDescription
property string headerButtonIcon
property var headerButtonAction
@@ -247,7 +246,8 @@ ScrollableListView {
++count
}
if( $modelData.isMe)
- txt += (count++ > 0 ? ' - ' : '') + 'Me'
+ //: 'Me' : One word for myself.
+ txt += (count++ > 0 ? ' - ' : '') + qsTr('participantsMe')
return txt
}
statusText : showAdminStatus ? getStatus() : ''
@@ -277,7 +277,6 @@ ScrollableListView {
Switch{
anchors.verticalCenter: parent.verticalCenter
width:50
- //Layout.preferredWidth: 50
indicatorStyle: SwitchStyle.aux
visible: sipAddressesView.showSwitch
diff --git a/linphone-app/ui/views/App/Calls/Dialogs/MultimediaParameters.qml b/linphone-app/ui/views/App/Calls/Dialogs/MultimediaParameters.qml
deleted file mode 100644
index b48701aa3..000000000
--- a/linphone-app/ui/views/App/Calls/Dialogs/MultimediaParameters.qml
+++ /dev/null
@@ -1,153 +0,0 @@
-import QtQuick 2.7
-import QtQuick.Controls 2.7
-import QtQuick.Layouts 1.3
-
-import Common 1.0
-import Common.Styles 1.0
-import Linphone 1.0
-import Utils 1.0
-
-import App.Styles 1.0
-
-// =============================================================================
-
-DialogPlus {
- property var call
-
- // ---------------------------------------------------------------------------
-
- buttons: [
- TextButtonB {
- text: qsTr('ok')
-
- onClicked: {
- call.updateStreams()
- exit(0)
- }
- }
- ]
-
- buttonsAlignment: Qt.AlignCenter
-
- height: MultimediaParametersStyle.height+30
- width: MultimediaParametersStyle.width
-
- onCallChanged: !call && exit(0)
-
- // ---------------------------------------------------------------------------
-
- Column {
- anchors.fill: parent
- spacing: MultimediaParametersStyle.column.spacing
-
- RowLayout {
- spacing: MultimediaParametersStyle.column.entry.spacing
- width: parent.width
-
- Icon {
- Layout.alignment: Qt.AlignTop
- Layout.preferredHeight: ComboBoxStyle.background.height
-
- icon: MultimediaParametersStyle.column.entry.speaker.icon
- overwriteColor: MultimediaParametersStyle.column.entry.speaker.color
- iconSize: MultimediaParametersStyle.column.entry.speaker.iconSize
- }
-
- Column {
- Layout.fillWidth: true
-
- spacing: MultimediaParametersStyle.column.entry.spacing2
-
- ComboBox {
- currentIndex: Utils.findIndex(model, function (device) {
- return device === SettingsModel.playbackDevice
- })
- model: SettingsModel.playbackDevices
- width: parent.width
-
- onActivated: SettingsModel.playbackDevice = model[index]
- }
-
- Slider {
- id: playbackSlider
- width: parent.width
-
- Component.onCompleted: value = call.speakerVolumeGain
- onPositionChanged: call.speakerVolumeGain = position
-
- ToolTip {
- parent: playbackSlider.handle
- visible: playbackSlider.pressed
- text: (playbackSlider.value * 100).toFixed(0) + " %"
- }
- }
- }
- }
-
- RowLayout {
- spacing: MultimediaParametersStyle.column.entry.spacing
- width: parent.width
-
- Icon {
- Layout.alignment: Qt.AlignTop
- Layout.preferredHeight: ComboBoxStyle.background.height
-
- icon: MultimediaParametersStyle.column.entry.micro.icon
- overwriteColor: MultimediaParametersStyle.column.entry.micro.color
- iconSize: MultimediaParametersStyle.column.entry.micro.iconSize
- }
-
- Column {
- Layout.fillWidth: true
-
- spacing: MultimediaParametersStyle.column.entry.spacing2
-
- ComboBox {
- currentIndex: Utils.findIndex(model, function (device) {
- return device === SettingsModel.captureDevice
- })
- model: SettingsModel.captureDevices
- width: parent.width
-
- onActivated: SettingsModel.captureDevice = model[index]
- }
-
- Slider {
- id: captureSlider
- width: parent.width
-
- Component.onCompleted: value = call.microVolumeGain
- onPositionChanged: call.microVolumeGain = position
-
- ToolTip {
- parent: captureSlider.handle
- visible: captureSlider.pressed
- text: "+ " + (captureSlider.value * 100).toFixed(0) + " %"
- }
- }
- }
- }
-
- RowLayout {
- spacing: MultimediaParametersStyle.column.entry.spacing
- width: parent.width
-
- Icon {
- icon: MultimediaParametersStyle.column.entry.camera.icon
- overwriteColor: MultimediaParametersStyle.column.entry.camera.color
- iconSize: MultimediaParametersStyle.column.entry.speaker.iconSize
- }
-
- ComboBox {
- Layout.fillWidth: true
-
- currentIndex: Number(Utils.findIndex(model, function (device) {
- return device === SettingsModel.videoDevice
- }))
- model: SettingsModel.videoDevices
-
- onActivated: SettingsModel.videoDevice = model[index]
- }
- }
- }
-}
diff --git a/linphone-app/ui/views/App/Calls/Incall.js b/linphone-app/ui/views/App/Calls/Incall.js
index eb51323b6..ddf482b21 100644
--- a/linphone-app/ui/views/App/Calls/Incall.js
+++ b/linphone-app/ui/views/App/Calls/Incall.js
@@ -66,7 +66,6 @@ function handleStatusChanged (status) {
}
function handleVideoRequested (call) {
- console.log("handleVideoRequested")
if (window.virtualWindowVisible || !Linphone.SettingsModel.videoSupported) {
call.rejectVideoRequest()
return
@@ -95,9 +94,7 @@ console.log("D")
}, function (status) {
//Utils.clearTimeout(timeout)
call.statusChanged.disconnect(endedHandler)
- console.log("E: "+status)
if (status) {
- console.log("TOTO")
call.acceptVideoRequest()
} else {
call.rejectVideoRequest()
@@ -119,7 +116,7 @@ function openCallStatistics () {
}
function openMediaParameters (window, incall) {
- window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/MultimediaParameters.qml'), {
+ window.attachVirtualWindow(Utils.buildLinphoneDialogUri('MultimediaParametersDialog'), {
call: incall.call
})
}
diff --git a/linphone-app/ui/views/App/Calls/Incall.qml b/linphone-app/ui/views/App/Calls/Incall.qml
index 82dd20d33..38160baad 100644
--- a/linphone-app/ui/views/App/Calls/Incall.qml
+++ b/linphone-app/ui/views/App/Calls/Incall.qml
@@ -258,9 +258,7 @@ Rectangle {
width: container.width
Component.onDestruction: {
resetWindowId()
- console.log("Camera incall destroyed")
}
- Component.onCompleted: console.log("Camera incall completed")
}
}
@@ -405,9 +403,7 @@ Rectangle {
isPreview: true
Component.onDestruction: {
resetWindowId()
- console.log("Camera preview incall destroyed")
}
- Component.onCompleted: console.log("Camera preview incall completed")
}
}
}
diff --git a/linphone-app/ui/views/App/Calls/VideoConference.qml b/linphone-app/ui/views/App/Calls/VideoConference.qml
index b01a46b0c..708480de1 100644
--- a/linphone-app/ui/views/App/Calls/VideoConference.qml
+++ b/linphone-app/ui/views/App/Calls/VideoConference.qml
@@ -70,14 +70,16 @@ Rectangle {
}
Text{
Layout.alignment: Qt.AlignCenter
- text: 'Vous êtes actuellement en dehors de la conférence.'
+ //: 'You are currently out of the conference.' : Pause message in video conference.
+ text: qsTr('videoConferencePauseWarning')
font.pointSize: VideoConferenceStyle.pauseArea.title.pointSize
font.weight: VideoConferenceStyle.pauseArea.title.weight
color: VideoConferenceStyle.pauseArea.title.color
}
Text{
Layout.alignment: Qt.AlignCenter
- text: 'Cliquez sur le bouton "play" pour la rejoindre.'
+ //: 'Click on play button to join it back.' : Explain what to do when being in pause in conference.
+ text: qsTr('videoConferencePauseHint')
font.pointSize: VideoConferenceStyle.pauseArea.description.pointSize
font.weight: VideoConferenceStyle.pauseArea.description.weight
color: VideoConferenceStyle.pauseArea.description.color
@@ -156,7 +158,10 @@ Rectangle {
? callModel.startRecording()
: callModel.stopRecording()
}
- tooltipText: !toggled ? 'Start Recording' : 'Stop Recording'
+ //: 'Start recording' : Tootltip when straing record.
+ tooltipText: !toggled ? qsTr('videoConferenceStartRecordTooltip')
+ //: 'Stop Recording' : Tooltip when stopping record.
+ : qsTr('videoConferenceStopRecordTooltip')
}
ActionButton{
isCustom: true
@@ -164,7 +169,8 @@ Rectangle {
colorSet: VideoConferenceStyle.buttons.screenshot
visible: conference.callModel.snapshotEnabled
onClicked: conference.callModel.takeSnapshot()
- tooltipText:'take Snapshot'
+ //: 'take Snapshot' : Tooltip for takking snapshot.
+ tooltipText: qsTr('videoConferenceSnapshotTooltip')
}
ActionButton{
isCustom: true
@@ -237,7 +243,8 @@ Rectangle {
}
Text{
Layout.alignment: Qt.AlignCenter
- text: "Video conference is not ready. Please Wait..."
+ //: 'Video conference is not ready. Please Wait...' : Waiting message for starting conference.
+ text: qsTr('videoConferenceWaitMessage')
color: VideoConferenceStyle.buzyColor
}
}
diff --git a/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml
index 65057e9eb..2be1ad53b 100644
--- a/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml
+++ b/linphone-app/ui/views/App/Calls/VideoConferenceActiveSpeaker.qml
@@ -56,11 +56,9 @@ Item {
anchors.rightMargin: 30
anchors.topMargin: 30
anchors.bottomMargin: 30
- //property int maxShowedCount: 4
property int cellHeight: 150
width: 16 * cellHeight / 9
- onCountChanged: {console.log("Delegate count = "+count+"/"+mainItem.participantDevices.count)}
model: mainItem.participantDevices
spacing: 15
verticalLayoutDirection: ItemView.BottomToTop
@@ -76,9 +74,8 @@ Item {
currentDevice: modelData
callModel: mainItem.callModel
isCameraFromDevice: true
- isPaused: mainItem.callModel.pausedByUser || currentDevice && currentDevice.isPaused //callModel.pausedByUser
+ isPaused: mainItem.callModel.pausedByUser || currentDevice && currentDevice.isPaused
onCloseRequested: mainItem.showMe = false
- //color: 'black'
}
}
}
diff --git a/linphone-app/ui/views/App/Calls/VideoConferenceFullscreen.qml b/linphone-app/ui/views/App/Calls/VideoConferenceFullscreen.qml
index f7df327c2..9b910c2ea 100644
--- a/linphone-app/ui/views/App/Calls/VideoConferenceFullscreen.qml
+++ b/linphone-app/ui/views/App/Calls/VideoConferenceFullscreen.qml
@@ -107,14 +107,17 @@ Window {
}
Text{
Layout.alignment: Qt.AlignCenter
- text: 'Vous êtes actuellement en dehors de la conférence.'
+
+ //: 'You are currently out of the conference.' : Pause message in video conference.
+ text: qsTr('videoConferencePauseWarning')
font.pointSize: VideoConferenceStyle.pauseArea.title.pointSize
font.weight: VideoConferenceStyle.pauseArea.title.weight
color: VideoConferenceStyle.pauseArea.title.color
}
Text{
Layout.alignment: Qt.AlignCenter
- text: 'Cliquez sur le bouton "play" pour la rejoindre.'
+ //: 'Click on play button to join it back.' : Explain what to do when being in pause in conference.
+ text: qsTr('videoConferencePauseHint')
font.pointSize: VideoConferenceStyle.pauseArea.description.pointSize
font.weight: VideoConferenceStyle.pauseArea.description.weight
color: VideoConferenceStyle.pauseArea.description.color
@@ -143,14 +146,7 @@ Window {
visible: !window.hideButtons
height: visible? undefined : 0
- /*
- ActionButton{
- isCustom: true
- backgroundRadius: width/2
- colorSet: VideoConferenceStyle.buttons.callsList
- visible: !listCallsOpened && !window.hideButtons
- onClicked: openListCallsRequest()
- }*/
+
ActionButton{
id: keypadButton
isCustom: true
@@ -196,7 +192,10 @@ Window {
? callModel.startRecording()
: callModel.stopRecording()
}
- tooltipText: !toggled? 'Start Recording' : 'Stop Recording'
+ //: 'Start recording' : Tootltip when straing record.
+ tooltipText: !toggled ? qsTr('videoConferenceStartRecordTooltip')
+ //: 'Stop Recording' : Tooltip when stopping record.
+ : qsTr('videoConferenceStopRecordTooltip')
}
ActionButton{
isCustom: true
@@ -204,7 +203,8 @@ Window {
colorSet: VideoConferenceStyle.buttons.screenshot
visible: conference.callModel.snapshotEnabled
onClicked: conference.callModel.takeSnapshot()
- tooltipText:'take Snapshot'
+ //: 'take Snapshot' : Tooltip for takking snapshot.
+ tooltipText: qsTr('videoConferenceSnapshotTooltip')
}
ActionButton{
isCustom: true
@@ -275,7 +275,8 @@ Window {
}
Text{
Layout.alignment: Qt.AlignCenter
- text: "Video conference is not ready. Please Wait..."
+ //: 'Video conference is not ready. Please Wait...' : Waiting message for starting conference.
+ text: qsTr('videoConferenceWaitMessage')
color: VideoConferenceStyle.buzyColor
}
}
diff --git a/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml b/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml
index 34bc7fee8..2719c0dc1 100644
--- a/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml
+++ b/linphone-app/ui/views/App/Calls/VideoConferenceGrid.qml
@@ -24,22 +24,7 @@ Mosaic {
property bool cameraEnabled: true
property int participantCount: gridModel.count
squaredDisplay: true
-
- 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 {
@@ -49,23 +34,15 @@ Mosaic {
showMe: true
}
model: participantDevices
- onCountChanged: {console.log("Delegate count = "+count+"/"+participantDevices.count)}
delegate: Item{
id: avatarCell
property ParticipantDeviceModel currentDevice: gridModel.participantDevices.getAt(index)
onCurrentDeviceChanged: {
- console.log("currentDevice changed: " +currentDevice+"/"+cameraView.currentDevice + (currentDevice?", me:"+currentDevice.isMe:'')+" ["+index+"]")
if(index < 0) cameraView.enabled = false // this is a delegate destruction. We need to stop camera before Qt change its currentDevice (and then, let CameraView to delete wrong renderer)
-
}
- //color: 'black' /*!conference.callModel && gridModel.defaultList.get(index).color ? gridModel.defaultList.get(index).color : */
- //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 : ''
+
height: grid.cellHeight - 10
width: grid.cellWidth - 10
- Component.onCompleted: {
- console.log("Completed: ["+index+"] " +(currentDevice?currentDevice.peerAddress+", isMe:"+currentDevice.isMe : '') )
- }
CameraView{
id: cameraView
@@ -74,9 +51,8 @@ Mosaic {
currentDevice: avatarCell.currentDevice
callModel: participantDevices.callModel
isCameraFromDevice: true
- isPaused: grid.callModel.pausedByUser || avatarCell.currentDevice && avatarCell.currentDevice.isPaused //callModel.pausedByUser
- onCloseRequested: participantDevices.showMe = false //grid.remove( index)
- //color: 'black'
+ isPaused: grid.callModel.pausedByUser || avatarCell.currentDevice && avatarCell.currentDevice.isPaused
+ onCloseRequested: participantDevices.showMe = false
}
}
}
diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml
index 97abc6370..a84311344 100644
--- a/linphone-app/ui/views/App/Calls/WaitingRoom.qml
+++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml
@@ -74,7 +74,6 @@ Rectangle {
fixedSize: false
onExitStatus: visible = false
visible: false
- title: 'Régler les périphériques'
}
}
// -------------------------------------------------------------------------
@@ -119,7 +118,6 @@ Rectangle {
backgroundRadius: 90
colorSet: cameraEnabled ? WaitingRoomStyle.buttons.cameraOn : WaitingRoomStyle.buttons.cameraOff
enabled: modeChoice.selectedMode != 2
- //updating: cameraEnabled && callModel.updating
onClicked: cameraEnabled = !cameraEnabled
}
}
@@ -132,10 +130,6 @@ Rectangle {
colorSet: selectedMode == 0 ? WaitingRoomStyle.buttons.gridLayout :
selectedMode == 1 ? WaitingRoomStyle.buttons.activeSpeakerLayout : WaitingRoomStyle.buttons.audioOnly
onClicked: selectedMode = (selectedMode + 1) % 3
- /*
- colorSet: callModel.pausedByUser ? WaitingRoomStyle.buttons.play : WaitingRoomStyle.buttons.pause
- onClicked: callModel.pausedByUser = !callModel.pausedByUser
- */
}
}
}
@@ -147,7 +141,9 @@ Rectangle {
Layout.alignment: Qt.AlignCenter
Layout.bottomMargin: 15
TextButtonA {
- text: 'CANCEL'
+ //: 'Cancel' : Cancel button.
+ text: qsTr('cancelButton')
+ capitalization: Font.AllUppercase
onClicked: {
mainItem.close()
@@ -155,7 +151,9 @@ Rectangle {
}
}
TextButtonB {
- text: 'DEMARRER'
+ //: 'Start' : Button label for starting the conference.
+ text: qsTr('startButton')
+ capitalization: Font.AllUppercase
onClicked: {mainItem.close(); CallsListModel.launchVideoCall(conferenceInfoModel.uri, '', 0,
{ video: modeChoice.selectedMode != 2
diff --git a/linphone-app/ui/views/App/Dialog/NewConference.qml b/linphone-app/ui/views/App/Dialog/NewConference.qml
index 1b6628ade..79dca9367 100644
--- a/linphone-app/ui/views/App/Dialog/NewConference.qml
+++ b/linphone-app/ui/views/App/Dialog/NewConference.qml
@@ -18,21 +18,15 @@ import 'qrc:/ui/scripts/Utils/utils.js' as Utils
DialogPlus {
id: conferenceManager
property bool isNew: !conferenceInfoModel || conferenceInfoModel.uri === ''
- onIsNewChanged: console.log("Is New:"+isNew+", "+conferenceInfoModel + ", " + (conferenceInfoModel? conferenceInfoModel.uri : 'noUri'))
- Component.onCompleted: console.log("Completed: Is New:"+isNew+", "+conferenceInfoModel + ", " + (conferenceInfoModel? conferenceInfoModel.uri : 'noUri'))
property ConferenceInfoModel conferenceInfoModel: ConferenceInfoModel{}
onConferenceInfoModelChanged: selectedParticipants.setAddresses(conferenceInfoModel)
Connections{
target: conferenceInfoModel
onConferenceCreated: {
- console.log("Conference has been created.")
creationStatus.icon = 'led_green'
}
- onConferenceCreationFailed:{ console.log("Conference failed.")
- creationStatus.icon = 'led_red'
- }
+ onConferenceCreationFailed:{ creationStatus.icon = 'led_red' }
onInvitationsSent: {
- console.log("Conference => invitations sent. Check in log for invite states.")
exit(1)
}
}
@@ -107,12 +101,13 @@ DialogPlus {
},
TextButtonB {
enabled: selectedParticipants.count >= conferenceManager.minParticipants && subject.text != '' && AccountSettingsModel.conferenceURI != ''
- //: 'Launch' : Start button
- text: conferenceManager.isNew ? qsTr('startButton') : 'Mettre à jour'
+ //: 'Launch' : Launch button
+ text: conferenceManager.isNew ? qsTr('launchButton')
+ //: 'Update' : Update button
+ : qsTr('updateButton')
capitalization: Font.AllUppercase
function getInviteMode(){
- //return inviteAppAccountCheckBox.checked ? LinphoneEnums::
return 0;
}
@@ -131,10 +126,6 @@ DialogPlus {
conferenceInfoModel.setParticipants(selectedParticipants.participantListModel)
- //var callsWindow = App.getCallsWindow()
- //App.smartShowWindow(callsWindow)
- //callsWindow.openConference()
- //CallsListModel.createConference(conferenceInfoModel, secureSwitch.checked, getInviteMode(), false )
conferenceInfoModel.createConference(false && secureSwitch.checked, getInviteMode()) // TODO remove false when Encryption is ready to use
}
TooltipArea{
@@ -168,7 +159,9 @@ DialogPlus {
buttonsAlignment: Qt.AlignRight
buttonsLeftMargin: 15
//: 'Start a video conference' : Title of a popup about creation of a video conference
- title: conferenceManager.isNew ? qsTr('newConferenceTitle') : 'Changer la conférence'
+ title: conferenceManager.isNew ? qsTr('newConferenceTitle')
+ //: 'Update the conference' : Title of a popup about updating configuration of a video conference.
+ : qsTr('updateConferenceTitle')
height: window.height - 100
width: window.width - 100
@@ -240,7 +233,7 @@ DialogPlus {
Layout.fillWidth: true
Layout.rightMargin: 15
//: 'Would you like to schedule your conference?' : Ask about setting the conference as scheduled.
- text: 'Souhaitez-vous programmer cette conférence pour plus tard ?'
+ text: qsTr('newConferenceScheduleTitle')
color: NewConferenceStyle.titles.textColor
font.pointSize: NewConferenceStyle.titles.pointSize
font.weight: NewConferenceStyle.titles.weight
@@ -256,14 +249,15 @@ DialogPlus {
property var locale: Qt.locale()
property date currentDate: new Date()
property int cellWidth: (parent.width-15)/columns
- //Component.onCompleted: scheduleForm.updateDateTime()
-
-
- Text{textFormat: Text.RichText; text: 'Date'+'