fix contact name + avatar initials
fix #LINQT-1339 persistent waiting room + warnings fix #LINQT-1334 remote name in call
This commit is contained in:
parent
1d0e9f145b
commit
9cf975518f
19 changed files with 109 additions and 68 deletions
|
|
@ -122,7 +122,12 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
|
||||||
mRemoteVideoEnabled =
|
mRemoteVideoEnabled =
|
||||||
videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv;
|
videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv;
|
||||||
mState = LinphoneEnums::fromLinphone(call->getState());
|
mState = LinphoneEnums::fromLinphone(call->getState());
|
||||||
mPeerAddress = Utils::coreStringToAppString(call->getRemoteAddress()->asStringUriOnly());
|
mRemoteAddress = Utils::coreStringToAppString(call->getRemoteAddress()->asStringUriOnly());
|
||||||
|
auto linphoneFriend = ToolModel::findFriendByAddress(mRemoteAddress);
|
||||||
|
if (linphoneFriend)
|
||||||
|
mRemoteName = Utils::coreStringToAppString(
|
||||||
|
linphoneFriend->getVcard() ? linphoneFriend->getVcard()->getFullName() : linphoneFriend->getName());
|
||||||
|
if (mRemoteName.isEmpty()) mRemoteName = ToolModel::getDisplayName(mRemoteAddress);
|
||||||
mLocalAddress = Utils::coreStringToAppString(call->getCallLog()->getLocalAddress()->asStringUriOnly());
|
mLocalAddress = Utils::coreStringToAppString(call->getCallLog()->getLocalAddress()->asStringUriOnly());
|
||||||
mStatus = LinphoneEnums::fromLinphone(call->getCallLog()->getStatus());
|
mStatus = LinphoneEnums::fromLinphone(call->getCallLog()->getStatus());
|
||||||
mTransferState = LinphoneEnums::fromLinphone(call->getTransferState());
|
mTransferState = LinphoneEnums::fromLinphone(call->getTransferState());
|
||||||
|
|
@ -454,8 +459,12 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CallCore::getPeerAddress() const {
|
QString CallCore::getRemoteName() const {
|
||||||
return mPeerAddress;
|
return mRemoteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CallCore::getRemoteAddress() const {
|
||||||
|
return mRemoteAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CallCore::getLocalAddress() const {
|
QString CallCore::getLocalAddress() const {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ public:
|
||||||
class CallCore : public QObject, public AbstractObject {
|
class CallCore : public QObject, public AbstractObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
// Q_PROPERTY(QString peerDisplayName MEMBER mPeerDisplayName)
|
|
||||||
Q_PROPERTY(LinphoneEnums::CallStatus status READ getStatus NOTIFY statusChanged)
|
Q_PROPERTY(LinphoneEnums::CallStatus status READ getStatus NOTIFY statusChanged)
|
||||||
Q_PROPERTY(LinphoneEnums::CallDir dir READ getDir NOTIFY dirChanged)
|
Q_PROPERTY(LinphoneEnums::CallDir dir READ getDir NOTIFY dirChanged)
|
||||||
Q_PROPERTY(LinphoneEnums::CallState state READ getState NOTIFY stateChanged)
|
Q_PROPERTY(LinphoneEnums::CallState state READ getState NOTIFY stateChanged)
|
||||||
|
|
@ -105,7 +104,8 @@ class CallCore : public QObject, public AbstractObject {
|
||||||
Q_PROPERTY(bool speakerMuted READ getSpeakerMuted WRITE lSetSpeakerMuted NOTIFY speakerMutedChanged)
|
Q_PROPERTY(bool speakerMuted READ getSpeakerMuted WRITE lSetSpeakerMuted NOTIFY speakerMutedChanged)
|
||||||
Q_PROPERTY(bool microphoneMuted READ getMicrophoneMuted WRITE lSetMicrophoneMuted NOTIFY microphoneMutedChanged)
|
Q_PROPERTY(bool microphoneMuted READ getMicrophoneMuted WRITE lSetMicrophoneMuted NOTIFY microphoneMutedChanged)
|
||||||
Q_PROPERTY(bool paused READ getPaused WRITE lSetPaused NOTIFY pausedChanged)
|
Q_PROPERTY(bool paused READ getPaused WRITE lSetPaused NOTIFY pausedChanged)
|
||||||
Q_PROPERTY(QString peerAddress READ getPeerAddress CONSTANT)
|
Q_PROPERTY(QString remoteName READ getRemoteName CONSTANT)
|
||||||
|
Q_PROPERTY(QString remoteAddress READ getRemoteAddress CONSTANT)
|
||||||
Q_PROPERTY(QString localAddress READ getLocalAddress CONSTANT)
|
Q_PROPERTY(QString localAddress READ getLocalAddress CONSTANT)
|
||||||
Q_PROPERTY(bool tokenVerified READ getTokenVerified WRITE setTokenVerified NOTIFY securityUpdated)
|
Q_PROPERTY(bool tokenVerified READ getTokenVerified WRITE setTokenVerified NOTIFY securityUpdated)
|
||||||
Q_PROPERTY(bool isMismatch READ isMismatch WRITE setIsMismatch NOTIFY securityUpdated)
|
Q_PROPERTY(bool isMismatch READ isMismatch WRITE setIsMismatch NOTIFY securityUpdated)
|
||||||
|
|
@ -144,7 +144,8 @@ public:
|
||||||
~CallCore();
|
~CallCore();
|
||||||
void setSelf(QSharedPointer<CallCore> me);
|
void setSelf(QSharedPointer<CallCore> me);
|
||||||
|
|
||||||
QString getPeerAddress() const;
|
QString getRemoteName() const;
|
||||||
|
QString getRemoteAddress() const;
|
||||||
QString getLocalAddress() const;
|
QString getLocalAddress() const;
|
||||||
|
|
||||||
LinphoneEnums::CallStatus getStatus() const;
|
LinphoneEnums::CallStatus getStatus() const;
|
||||||
|
|
@ -301,7 +302,7 @@ signals:
|
||||||
Q_INVOKABLE void askForTransfer();
|
Q_INVOKABLE void askForTransfer();
|
||||||
Q_INVOKABLE void askForAttendedTransfer();
|
Q_INVOKABLE void askForAttendedTransfer();
|
||||||
Q_INVOKABLE bool transferTo(const QString &sipAddress);
|
Q_INVOKABLE bool transferTo(const QString &sipAddress);
|
||||||
Q_INVOKABLE bool transferToAnother(const QString &peerAddress);
|
Q_INVOKABLE bool transferToAnother(const QString &remoteAddress);
|
||||||
|
|
||||||
Q_INVOKABLE bool getRemoteVideoEnabled() const;
|
Q_INVOKABLE bool getRemoteVideoEnabled() const;
|
||||||
Q_INVOKABLE void acceptVideoRequest();
|
Q_INVOKABLE void acceptVideoRequest();
|
||||||
|
|
@ -324,7 +325,8 @@ private:
|
||||||
LinphoneEnums::MediaEncryption mEncryption;
|
LinphoneEnums::MediaEncryption mEncryption;
|
||||||
|
|
||||||
QString mLastErrorMessage;
|
QString mLastErrorMessage;
|
||||||
QString mPeerAddress;
|
QString mRemoteName;
|
||||||
|
QString mRemoteAddress;
|
||||||
QString mLocalAddress;
|
QString mLocalAddress;
|
||||||
bool mTokenVerified = false;
|
bool mTokenVerified = false;
|
||||||
bool mIsSecured = false;
|
bool mIsSecured = false;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ bool CallProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QModelInde
|
||||||
QRegularExpression::UseUnicodePropertiesOption);
|
QRegularExpression::UseUnicodePropertiesOption);
|
||||||
auto call = qobject_cast<CallList *>(sourceModel())->getAt<CallCore>(sourceRow);
|
auto call = qobject_cast<CallList *>(sourceModel())->getAt<CallCore>(sourceRow);
|
||||||
|
|
||||||
show = call->getPeerAddress().contains(search);
|
show = call->getRemoteAddress().contains(search);
|
||||||
}
|
}
|
||||||
|
|
||||||
return show;
|
return show;
|
||||||
|
|
@ -84,5 +84,5 @@ bool CallProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft, const QM
|
||||||
auto l = getItemAtSource<CallList, CallCore>(sourceLeft.row());
|
auto l = getItemAtSource<CallList, CallCore>(sourceLeft.row());
|
||||||
auto r = getItemAtSource<CallList, CallCore>(sourceRight.row());
|
auto r = getItemAtSource<CallList, CallCore>(sourceRight.row());
|
||||||
|
|
||||||
return l->getPeerAddress() < r->getPeerAddress();
|
return l->getRemoteAddress() < r->getRemoteAddress();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -329,8 +329,8 @@ void Notifier::notifyReceivedMessages(const list<shared_ptr<linphone::ChatMessag
|
||||||
map["timelineModel"].setValue(
|
map["timelineModel"].setValue(
|
||||||
CoreManager::getInstance()->getTimelineListModel()->getTimeline(chatRoom, true).get());
|
CoreManager::getInstance()->getTimelineListModel()->getTimeline(chatRoom, true).get());
|
||||||
if (messages.size() == 1) { // Display only sender on mono message.
|
if (messages.size() == 1) { // Display only sender on mono message.
|
||||||
map["peerAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asStringUriOnly());
|
map["remoteAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asStringUriOnly());
|
||||||
map["fullPeerAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asString());
|
map["fullremoteAddress"] = Utils::coreStringToAppString(message->getFromAddress()->asString());
|
||||||
}
|
}
|
||||||
map["localAddress"] = Utils::coreStringToAppString(message->getToAddress()->asStringUriOnly());
|
map["localAddress"] = Utils::coreStringToAppString(message->getToAddress()->asStringUriOnly());
|
||||||
map["fullLocalAddress"] = Utils::coreStringToAppString(message->getToAddress()->asString());
|
map["fullLocalAddress"] = Utils::coreStringToAppString(message->getToAddress()->asString());
|
||||||
|
|
@ -381,8 +381,8 @@ void Notifier::notifyReceivedReactions(
|
||||||
|
|
||||||
map["timelineModel"].setValue(timelineModel.get());
|
map["timelineModel"].setValue(timelineModel.get());
|
||||||
if (reactions.size() == 1) { // Display only sender on mono message.
|
if (reactions.size() == 1) { // Display only sender on mono message.
|
||||||
map["peerAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asStringUriOnly());
|
map["remoteAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asStringUriOnly());
|
||||||
map["fullPeerAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asString());
|
map["fullremoteAddress"] = Utils::coreStringToAppString(reaction.second->getFromAddress()->asString());
|
||||||
}
|
}
|
||||||
map["localAddress"] = Utils::coreStringToAppString(chatRoom->getLocalAddress()->asStringUriOnly());
|
map["localAddress"] = Utils::coreStringToAppString(chatRoom->getLocalAddress()->asStringUriOnly());
|
||||||
map["fullLocalAddress"] = Utils::coreStringToAppString(chatRoom->getLocalAddress()->asString());
|
map["fullLocalAddress"] = Utils::coreStringToAppString(chatRoom->getLocalAddress()->asString());
|
||||||
|
|
|
||||||
|
|
@ -144,8 +144,8 @@ bool ParticipantProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QMo
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ParticipantProxy::SortFilterList::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
bool ParticipantProxy::SortFilterList::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||||
const ParticipantCore *a = sourceModel()->data(left).value<ParticipantCore *>();
|
auto l = getItemAtSource<ParticipantList, ParticipantCore>(left.row());
|
||||||
const ParticipantCore *b = sourceModel()->data(right).value<ParticipantCore *>();
|
auto r = getItemAtSource<ParticipantList, ParticipantCore>(right.row());
|
||||||
|
|
||||||
return a->getCreationTime() > b->getCreationTime() || b->isMe();
|
return l->getCreationTime() > r->getCreationTime() || r->isMe();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,13 @@ QString ToolModel::getDisplayName(QString address) {
|
||||||
return nameSplitted.join(" ");
|
return nameSplitted.join(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<linphone::Friend> ToolModel::findFriendByAddress(const QString &address) {
|
||||||
|
auto defaultFriendList = CoreModel::getInstance()->getCore()->getDefaultFriendList();
|
||||||
|
if (!defaultFriendList) return nullptr;
|
||||||
|
auto linphoneAddr = ToolModel::interpretUrl(address);
|
||||||
|
return CoreModel::getInstance()->getCore()->findFriend(linphoneAddr);
|
||||||
|
}
|
||||||
|
|
||||||
bool ToolModel::createCall(const QString &sipAddress,
|
bool ToolModel::createCall(const QString &sipAddress,
|
||||||
const QVariantMap &options,
|
const QVariantMap &options,
|
||||||
const QString &prepareTransfertAddress,
|
const QString &prepareTransfertAddress,
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@ public:
|
||||||
static QString getDisplayName(const std::shared_ptr<const linphone::Address> &address);
|
static QString getDisplayName(const std::shared_ptr<const linphone::Address> &address);
|
||||||
static QString getDisplayName(QString address);
|
static QString getDisplayName(QString address);
|
||||||
|
|
||||||
|
static std::shared_ptr<linphone::Friend> findFriendByAddress(const QString &address);
|
||||||
|
|
||||||
static bool createCall(const QString &sipAddress,
|
static bool createCall(const QString &sipAddress,
|
||||||
const QVariantMap &options = {},
|
const QVariantMap &options = {},
|
||||||
const QString &prepareTransfertAddress = "",
|
const QString &prepareTransfertAddress = "",
|
||||||
|
|
|
||||||
|
|
@ -363,10 +363,7 @@ VariantObject *Utils::findFriendByAddress(const QString &address) {
|
||||||
VariantObject *data = new VariantObject();
|
VariantObject *data = new VariantObject();
|
||||||
if (!data) return nullptr;
|
if (!data) return nullptr;
|
||||||
data->makeRequest([address]() {
|
data->makeRequest([address]() {
|
||||||
auto defaultFriendList = CoreModel::getInstance()->getCore()->getDefaultFriendList();
|
auto linFriend = ToolModel::findFriendByAddress(address);
|
||||||
if (!defaultFriendList) return QVariant();
|
|
||||||
auto linphoneAddr = ToolModel::interpretUrl(address);
|
|
||||||
auto linFriend = CoreModel::getInstance()->getCore()->findFriend(linphoneAddr);
|
|
||||||
if (!linFriend) return QVariant();
|
if (!linFriend) return QVariant();
|
||||||
auto friendCore = FriendCore::create(linFriend);
|
auto friendCore = FriendCore::create(linFriend);
|
||||||
return QVariant::fromValue(new FriendGui(friendCore));
|
return QVariant::fromValue(new FriendGui(friendCore));
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ Item{
|
||||||
textColor: DefaultStyle.main2_400
|
textColor: DefaultStyle.main2_400
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mainItem.conference) {
|
if (mainItem.conference) {
|
||||||
UtilsCpp.copyToClipboard(mainItem.call.core.peerAddress)
|
UtilsCpp.copyToClipboard(mainItem.call.core.remoteAddress)
|
||||||
showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true)
|
showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ Item {
|
||||||
? qsTr("Vous avez terminé l'appel")
|
? qsTr("Vous avez terminé l'appel")
|
||||||
: qsTr("Votre correspondant a terminé l'appel")
|
: qsTr("Votre correspondant a terminé l'appel")
|
||||||
: call.core.lastErrorMessage
|
: call.core.lastErrorMessage
|
||||||
: call.core.lastErrorMessage
|
: call && call.core.lastErrorMessage || ""
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
pixelSize: 22 * DefaultStyle.dp
|
pixelSize: 22 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ Mosaic {
|
||||||
displayAll: false
|
displayAll: false
|
||||||
displayPresence: false
|
displayPresence: false
|
||||||
participantDevice: avatarCell.currentDevice
|
participantDevice: avatarCell.currentDevice
|
||||||
Component.onCompleted: console.log(qmlName + " is " +(call ? call.core.peerAddress : currentDevice ? currentDevice.core.address : 'addr_NotDefined'))
|
Component.onCompleted: console.log(qmlName + " is " +(call ? call.core.remoteAddress : currentDevice ? currentDevice.core.address : 'addr_NotDefined'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,13 @@ ColumnLayout {
|
||||||
property ConferenceInfoGui conferenceInfo
|
property ConferenceInfoGui conferenceInfo
|
||||||
property bool isConference: conferenceInfo != undefined && conferenceInfo != null
|
property bool isConference: conferenceInfo != undefined && conferenceInfo != null
|
||||||
property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || ""
|
property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || ""
|
||||||
property string contactName: contact && contact.core.displayName || ""
|
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
|
||||||
|
property string computedContactName: computedContactNameObj ? computedContactNameObj.value: ""
|
||||||
|
property string contactName: contact
|
||||||
|
? contact.core.displayName
|
||||||
|
: conferenceInfo
|
||||||
|
? conferenceInfo.core.subject
|
||||||
|
: computedContactName
|
||||||
|
|
||||||
// Set this property to get the security informations
|
// Set this property to get the security informations
|
||||||
// for a specific address and not for the entire contact
|
// for a specific address and not for the entire contact
|
||||||
|
|
@ -60,14 +66,13 @@ ColumnLayout {
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: detailAvatar.height
|
Layout.preferredHeight: detailAvatar.height
|
||||||
// Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Avatar {
|
Avatar {
|
||||||
id: detailAvatar
|
id: detailAvatar
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: 100 * DefaultStyle.dp
|
width: 100 * DefaultStyle.dp
|
||||||
height: 100 * DefaultStyle.dp
|
height: 100 * DefaultStyle.dp
|
||||||
contact: mainItem.specificAddress == "" ? mainItem.contact : null
|
contact: mainItem.contact || null
|
||||||
_address: mainItem.conferenceInfo
|
_address: mainItem.conferenceInfo
|
||||||
? mainItem.conferenceInfo.core.subject
|
? mainItem.conferenceInfo.core.subject
|
||||||
: mainItem.contactAddress || mainItem.contactName
|
: mainItem.contactAddress || mainItem.contactName
|
||||||
|
|
@ -85,11 +90,11 @@ ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||||
spacing: 2 * DefaultStyle.dp
|
spacing: 2 * DefaultStyle.dp
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
Layout.preferredWidth: implicitWidth
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.fillWidth: true
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
wrapMode: Text.WrapAnywhere
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: mainItem.contactName
|
text: mainItem.contactName
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
|
|
@ -116,6 +121,7 @@ ColumnLayout {
|
||||||
property var mode : contact ? contact.core.consolidatedPresence : -1
|
property var mode : contact ? contact.core.consolidatedPresence : -1
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: mainItem.contact
|
visible: mainItem.contact
|
||||||
text: mode === LinphoneEnums.ConsolidatedPresence.Online
|
text: mode === LinphoneEnums.ConsolidatedPresence.Online
|
||||||
? qsTr("En ligne")
|
? qsTr("En ligne")
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,19 @@ Loader{
|
||||||
property FriendGui contact: null
|
property FriendGui contact: null
|
||||||
property CallGui call: null
|
property CallGui call: null
|
||||||
property string _address: account
|
property string _address: account
|
||||||
? account.core?.identityAddress || ""
|
? account.core?.identityAddress || ""
|
||||||
: call
|
: call
|
||||||
? call.core.peerAddress
|
? call.core.remoteAddress
|
||||||
: contact
|
: contact
|
||||||
? contact.core.defaultAddress
|
? contact.core.defaultAddress
|
||||||
: ''
|
: ''
|
||||||
readonly property string address: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_address) : _address
|
readonly property string address: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_address) : _address
|
||||||
property var displayNameObj: UtilsCpp.getDisplayName(_address)
|
property var displayNameObj: UtilsCpp.getDisplayName(_address)
|
||||||
property string displayNameVal: displayNameObj ? displayNameObj.value : ""
|
property string displayNameVal: contact
|
||||||
|
? contact.core.displayName
|
||||||
|
: displayNameObj
|
||||||
|
? displayNameObj.value
|
||||||
|
: ""
|
||||||
property bool haveAvatar: (account && account.core?.pictureUri || false)
|
property bool haveAvatar: (account && account.core?.pictureUri || false)
|
||||||
|| (contact && contact.core.pictureUri)
|
|| (contact && contact.core.pictureUri)
|
||||||
|| computedAvatarUri.length != 0
|
|| computedAvatarUri.length != 0
|
||||||
|
|
|
||||||
|
|
@ -30,15 +30,28 @@ Item {
|
||||||
: previewEnabled
|
: previewEnabled
|
||||||
? callState === LinphoneEnums.CallState.Paused
|
? callState === LinphoneEnums.CallState.Paused
|
||||||
: callState === LinphoneEnums.CallState.PausedByRemote
|
: callState === LinphoneEnums.CallState.PausedByRemote
|
||||||
property var peerAddressObj: previewEnabled && (call || account)
|
|
||||||
? UtilsCpp.getDisplayName(account ? account.core.identityAddress : call.core.localAddress)
|
|
||||||
: participantDevice && participantDevice.core
|
|
||||||
? UtilsCpp.getDisplayName(participantDevice.core.address)
|
|
||||||
: !previewEnabled && call && call.core
|
|
||||||
? UtilsCpp.getDisplayName(call.core.peerAddress)
|
|
||||||
: null
|
|
||||||
|
|
||||||
property string peerAddress:peerAddressObj ? peerAddressObj.value : ""
|
property string remoteAddress: account
|
||||||
|
? account.core.identityAddress
|
||||||
|
: participantDevice
|
||||||
|
? participantDevice.core.address
|
||||||
|
: call
|
||||||
|
? call.core.remoteAddress
|
||||||
|
: ""
|
||||||
|
property var localNameObj: previewEnabled && call
|
||||||
|
? UtilsCpp.getDisplayName(call.core.localAddress)
|
||||||
|
: null
|
||||||
|
property string localName: localNameObj ? localNameObj.value : ""
|
||||||
|
property string displayName: account
|
||||||
|
? account.core.displayName
|
||||||
|
: participantDevice
|
||||||
|
? participantDevice.core.displayName
|
||||||
|
: call
|
||||||
|
? previewEnabled
|
||||||
|
? localName
|
||||||
|
: call.core.remoteName
|
||||||
|
: ""
|
||||||
|
|
||||||
property var identityAddress: account ? UtilsCpp.getDisplayName(account.core.identityAddress) : null
|
property var identityAddress: account ? UtilsCpp.getDisplayName(account.core.identityAddress) : null
|
||||||
property bool videoEnabled: (previewEnabled && call && call.core.localVideoEnabled)
|
property bool videoEnabled: (previewEnabled && call && call.core.localVideoEnabled)
|
||||||
|| (participantDevice && participantDevice.core.videoEnabled)
|
|| (participantDevice && participantDevice.core.videoEnabled)
|
||||||
|
|
@ -87,7 +100,7 @@ Item {
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: waitingTime
|
id: waitingTime
|
||||||
property var isMeObj: UtilsCpp.isMe(mainItem.peerAddress)
|
property var isMeObj: UtilsCpp.isMe(mainItem.remoteAddress)
|
||||||
visible: isMeObj ? !isMeObj.value : false
|
visible: isMeObj ? !isMeObj.value : false
|
||||||
property int seconds
|
property int seconds
|
||||||
text: UtilsCpp.formatElapsedTime(seconds)
|
text: UtilsCpp.formatElapsedTime(seconds)
|
||||||
|
|
@ -118,7 +131,7 @@ Item {
|
||||||
visible: !joiningView.visible
|
visible: !joiningView.visible
|
||||||
account: mainItem.account
|
account: mainItem.account
|
||||||
call: !mainItem.previewEnabled ? mainItem.call : null
|
call: !mainItem.previewEnabled ? mainItem.call : null
|
||||||
_address: mainItem.peerAddress
|
displayNameVal: mainItem.displayName
|
||||||
}
|
}
|
||||||
ColumnLayout{
|
ColumnLayout{
|
||||||
id: joiningView
|
id: joiningView
|
||||||
|
|
@ -176,7 +189,7 @@ Item {
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: mainItem.peerAddress
|
text: mainItem.displayName
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
pixelSize: 22 * DefaultStyle.dp
|
pixelSize: 22 * DefaultStyle.dp
|
||||||
|
|
@ -187,7 +200,7 @@ Item {
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
property string _text: mainItem.call && mainItem.call.core.peerAddress
|
property string _text: mainItem.call && mainItem.call.core.remoteAddress
|
||||||
text: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_text) : _text
|
text: SettingsCpp.onlyDisplaySipUriUsername ? UtilsCpp.getUsername(_text) : _text
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
|
|
@ -258,8 +271,8 @@ Item {
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
anchors.bottomMargin: 10 * DefaultStyle.dp
|
anchors.bottomMargin: 10 * DefaultStyle.dp
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
property string _text: mainItem.peerAddress != ''
|
property string _text: mainItem.displayName != ''
|
||||||
? mainItem.peerAddress
|
? mainItem.displayName
|
||||||
: mainItem.account && mainItem.identityAddress
|
: mainItem.account && mainItem.identityAddress
|
||||||
? mainItem.identityAddress.value
|
? mainItem.identityAddress.value
|
||||||
: ""
|
: ""
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ Notification {
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Text {
|
Text {
|
||||||
property var remoteAddress: UtilsCpp.getDisplayName(call.core.peerAddress)
|
property var remoteAddress: UtilsCpp.getDisplayName(call.core.remoteAddress)
|
||||||
text: remoteAddress ? remoteAddress.value : ""
|
text: remoteAddress ? remoteAddress.value : ""
|
||||||
color: DefaultStyle.grey_600
|
color: DefaultStyle.grey_600
|
||||||
font {
|
font {
|
||||||
|
|
@ -67,7 +67,7 @@ Notification {
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
property var localAddress: UtilsCpp.getDisplayName(call.core.localAddress)
|
property var localAddress: UtilsCpp.getDisplayName(call.core.localAddress)
|
||||||
text: qsTr("Appel entrant")//.arg(localAddress ? qsTr(" pour %1").arg(localAddress.value) : "") //call.core.peerAddress
|
text: qsTr("Appel entrant")//.arg(localAddress ? qsTr(" pour %1").arg(localAddress.value) : "") //call.core.remoteAddress
|
||||||
color: DefaultStyle.grey_600
|
color: DefaultStyle.grey_600
|
||||||
font {
|
font {
|
||||||
pixelSize: 13 * DefaultStyle.dp
|
pixelSize: 13 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ Window {
|
||||||
Text{
|
Text{
|
||||||
id: addressText
|
id: addressText
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
text: modelData.core.peerAddress
|
text: modelData.core.remoteAddress
|
||||||
onTextChanged: console.log(addressText.text)
|
onTextChanged: console.log(addressText.text)
|
||||||
Component.onCompleted: console.log(addressText.text)
|
Component.onCompleted: console.log(addressText.text)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,12 @@ Item {
|
||||||
x: mainItem.width/2 - width/2
|
x: mainItem.width/2 - width/2
|
||||||
y: contentItem.height/2
|
y: contentItem.height/2
|
||||||
property var currentCall: callsModel.currentCall ? callsModel.currentCall : null
|
property var currentCall: callsModel.currentCall ? callsModel.currentCall : null
|
||||||
property var peerNameObj: currentCall ? UtilsCpp.getDisplayName(currentCall.core.peerAddress) : null
|
property string remoteName: currentCall ? currentCall.core.remoteName : ""
|
||||||
property string peerName:peerNameObj ? peerNameObj.value : ""
|
|
||||||
contentItem: Button {
|
contentItem: Button {
|
||||||
text: currentCallNotif.currentCall
|
text: currentCallNotif.currentCall
|
||||||
? currentCallNotif.currentCall.core.conference
|
? currentCallNotif.currentCall.core.conference
|
||||||
? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject
|
? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject
|
||||||
: (("Appel en cours : ") + currentCallNotif.peerName) : "appel en cours"
|
: (("Appel en cours : ") + currentCallNotif.remoteName) : "appel en cours"
|
||||||
color: DefaultStyle.success_500main
|
color: DefaultStyle.success_500main
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var callsWindow = UtilsCpp.getCallsWindow(currentCallNotif.currentCall)
|
var callsWindow = UtilsCpp.getCallsWindow(currentCallNotif.currentCall)
|
||||||
|
|
|
||||||
|
|
@ -283,6 +283,8 @@ AbstractMainPage {
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
Avatar {
|
Avatar {
|
||||||
id: historyAvatar
|
id: historyAvatar
|
||||||
|
property var contactObj: UtilsCpp.findFriendByAddress(modelData.core.remoteAddress)
|
||||||
|
contact: contactObj && contactObj.value || null
|
||||||
_address: modelData.core.remoteAddress
|
_address: modelData.core.remoteAddress
|
||||||
width: 45 * DefaultStyle.dp
|
width: 45 * DefaultStyle.dp
|
||||||
height: 45 * DefaultStyle.dp
|
height: 45 * DefaultStyle.dp
|
||||||
|
|
@ -662,7 +664,6 @@ AbstractMainPage {
|
||||||
contact: contactObj && contactObj.value || null
|
contact: contactObj && contactObj.value || null
|
||||||
conferenceInfo: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.conferenceInfo || null
|
conferenceInfo: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.conferenceInfo || null
|
||||||
specificAddress: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.remoteAddress || ""
|
specificAddress: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.remoteAddress || ""
|
||||||
contactName: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.displayName : ""
|
|
||||||
|
|
||||||
buttonContent: PopupButton {
|
buttonContent: PopupButton {
|
||||||
id: detailOptions
|
id: detailOptions
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ AbstractWindow {
|
||||||
close.accepted = false
|
close.accepted = false
|
||||||
terminateAllCallsDialog.open()
|
terminateAllCallsDialog.open()
|
||||||
}
|
}
|
||||||
|
if (middleItemStackView.currentItem.objectName === "waitingRoom") middleItemStackView.replace(inCallItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeLayout(layoutIndex) {
|
function changeLayout(layoutIndex) {
|
||||||
|
|
@ -340,12 +341,9 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: callStatusText
|
id: callStatusText
|
||||||
property var remoteNameObj: mainWindow.call ? UtilsCpp.getDisplayName(mainWindow.call.core.peerAddress) : null
|
property string remoteName: mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
||||||
property string remoteName: remoteNameObj
|
? mainWindow.call.core.remoteName
|
||||||
? mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
: EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
||||||
? remoteNameObj.value
|
|
||||||
: EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
|
||||||
: ""
|
|
||||||
text: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released)
|
text: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released)
|
||||||
? qsTr("Fin d'appel")
|
? qsTr("Fin d'appel")
|
||||||
: mainWindow.call && (mainWindow.call.core.paused
|
: mainWindow.call && (mainWindow.call.core.paused
|
||||||
|
|
@ -816,13 +814,13 @@ AbstractWindow {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Avatar {
|
Avatar {
|
||||||
id: delegateAvatar
|
id: delegateAvatar
|
||||||
_address: modelData.core.peerAddress
|
_address: modelData.core.remoteAddress
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: delegateName
|
id: delegateName
|
||||||
property var remoteAddress: UtilsCpp.getDisplayName(modelData.core.peerAddress)
|
property var remoteAddress: UtilsCpp.getDisplayName(modelData.core.remoteAddress)
|
||||||
text: modelData.core.isConference
|
text: modelData.core.isConference
|
||||||
? modelData.core.conference.core.subject
|
? modelData.core.conference.core.subject
|
||||||
: remoteAddress ? remoteAddress.value : ""
|
: remoteAddress ? remoteAddress.value : ""
|
||||||
|
|
@ -1006,7 +1004,7 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UtilsCpp.copyToClipboard(mainWindow.call.core.peerAddress)
|
UtilsCpp.copyToClipboard(mainWindow.call.core.remoteAddress)
|
||||||
showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true)
|
showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1558,7 +1556,6 @@ AbstractWindow {
|
||||||
id: participantListButton
|
id: participantListButton
|
||||||
visible: mainWindow.conference
|
visible: mainWindow.conference
|
||||||
iconUrl: AppIcons.usersTwo
|
iconUrl: AppIcons.usersTwo
|
||||||
checked: rightPanel.visible && rightPanel.currentItem?.objectName == "participantListPanel"
|
|
||||||
checkedColor: DefaultStyle.main2_400
|
checkedColor: DefaultStyle.main2_400
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
|
@ -1572,6 +1569,10 @@ AbstractWindow {
|
||||||
rightPanel.visible = false
|
rightPanel.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: rightPanel
|
||||||
|
onVisibleChanged: if (!rightPanel.visible) participantListButton.checked = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: moreOptionsButton
|
id: moreOptionsButton
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue