fix #LINQT-1320 ui call
This commit is contained in:
parent
5b9f5cb056
commit
8a21a00c09
5 changed files with 644 additions and 634 deletions
|
|
@ -421,7 +421,7 @@ void CallModel::onStateChanged(const std::shared_ptr<linphone::Call> &call,
|
||||||
linphone::Call::State state,
|
linphone::Call::State state,
|
||||||
const std::string &message) {
|
const std::string &message) {
|
||||||
lDebug() << "CallModel::onStateChanged" << (int)state;
|
lDebug() << "CallModel::onStateChanged" << (int)state;
|
||||||
if (state == linphone::Call::State::Connected) {
|
if (state == linphone::Call::State::StreamsRunning) {
|
||||||
mDurationTimer.start();
|
mDurationTimer.start();
|
||||||
// After UpdatedByRemote, video direction could be changed.
|
// After UpdatedByRemote, video direction could be changed.
|
||||||
auto videoDirection = call->getCurrentParams()->getVideoDirection();
|
auto videoDirection = call->getCurrentParams()->getVideoDirection();
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,12 @@ QString ToolModel::getDisplayName(QString address) {
|
||||||
mustBeInLinphoneThread(QString(gClassName) + " : " + Q_FUNC_INFO);
|
mustBeInLinphoneThread(QString(gClassName) + " : " + Q_FUNC_INFO);
|
||||||
|
|
||||||
QString displayName = getDisplayName(interpretUrl(address));
|
QString displayName = getDisplayName(interpretUrl(address));
|
||||||
return displayName.isEmpty() ? address : displayName;
|
if (displayName.isEmpty()) return address;
|
||||||
|
QStringList nameSplitted = displayName.split(" ");
|
||||||
|
for (auto &part : nameSplitted) {
|
||||||
|
part[0] = part[0].toUpper();
|
||||||
|
}
|
||||||
|
return nameSplitted.join(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ToolModel::createCall(const QString &sipAddress,
|
bool ToolModel::createCall(const QString &sipAddress,
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,9 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 18 * DefaultStyle.dp
|
visible: contactList.contentHeight > 0
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("All contacts")
|
text: qsTr("Contacts")
|
||||||
font {
|
font {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ AbstractMainPage {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("All contacts")
|
text: qsTr("Contacts")
|
||||||
font {
|
font {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,7 @@ AbstractWindow {
|
||||||
Item {
|
Item {
|
||||||
id: headerItem
|
id: headerItem
|
||||||
Layout.margins: 10 * DefaultStyle.dp
|
Layout.margins: 10 * DefaultStyle.dp
|
||||||
|
Layout.leftMargin: 20 * DefaultStyle.dp
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: 25 * DefaultStyle.dp
|
Layout.minimumHeight: 25 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -335,17 +336,21 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: callStatusText
|
id: callStatusText
|
||||||
|
property var remoteNameObj: mainWindow.call ? UtilsCpp.getDisplayName(mainWindow.call.core.peerAddress) : null
|
||||||
|
property string remoteName: remoteNameObj
|
||||||
|
? remoteNameObj.value
|
||||||
|
: mainWindow.call
|
||||||
|
? 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("End of the call")
|
? qsTr("Fin d'appel")
|
||||||
: mainWindow.call && (mainWindow.call.core.paused
|
: mainWindow.call && (mainWindow.call.core.paused
|
||||||
|| (mainWindow.callState === LinphoneEnums.CallState.Paused
|
|| (mainWindow.callState === LinphoneEnums.CallState.Paused
|
||||||
|| mainWindow.callState === LinphoneEnums.CallState.PausedByRemote))
|
|| mainWindow.callState === LinphoneEnums.CallState.PausedByRemote))
|
||||||
? (mainWindow.conference ? qsTr('Réunion mise ') : qsTr('Appel mis')) + qsTr(" en pause")
|
? (mainWindow.conference ? qsTr('Réunion mise ') : qsTr('Appel mis')) + qsTr(" en pause")
|
||||||
: mainWindow.conference
|
: mainWindow.conference
|
||||||
? mainWindow.conference.core.subject
|
? mainWindow.conference.core.subject
|
||||||
: mainWindow.call
|
: remoteName
|
||||||
? EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
|
||||||
: ""
|
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
pixelSize: 22 * DefaultStyle.dp
|
pixelSize: 22 * DefaultStyle.dp
|
||||||
|
|
@ -531,7 +536,6 @@ AbstractWindow {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
spacing: 23 * DefaultStyle.dp
|
spacing: 23 * DefaultStyle.dp
|
||||||
Layout.rightMargin: 20 * DefaultStyle.dp
|
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: middleItemStackView
|
id: middleItemStackView
|
||||||
initialItem: inCallItem
|
initialItem: inCallItem
|
||||||
|
|
@ -541,6 +545,7 @@ AbstractWindow {
|
||||||
CallSettingsPanel {
|
CallSettingsPanel {
|
||||||
id: rightPanel
|
id: rightPanel
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.rightMargin: 20 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 393 * DefaultStyle.dp
|
Layout.preferredWidth: 393 * DefaultStyle.dp
|
||||||
Layout.topMargin: 10 * DefaultStyle.dp
|
Layout.topMargin: 10 * DefaultStyle.dp
|
||||||
property int currentIndex: 0
|
property int currentIndex: 0
|
||||||
|
|
@ -553,6 +558,7 @@ AbstractWindow {
|
||||||
contentStackView.initialItem: callsListPanel
|
contentStackView.initialItem: callsListPanel
|
||||||
headerValidateButtonText: qsTr("Ajouter")
|
headerValidateButtonText: qsTr("Ajouter")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
id: contactsListPanel
|
id: contactsListPanel
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -1269,7 +1275,6 @@ AbstractWindow {
|
||||||
Item{Layout.fillHeight: true}
|
Item{Layout.fillHeight: true}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Component {
|
Component {
|
||||||
id: waitingRoom
|
id: waitingRoom
|
||||||
WaitingRoom {
|
WaitingRoom {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue