fix meeting form
fix visible fix #LINQT-1363 + #LINQT-1364 fix #LINQT-1356
This commit is contained in:
parent
8a6c9b9182
commit
a780825c12
10 changed files with 45 additions and 13 deletions
|
|
@ -170,7 +170,7 @@ bool ToolModel::createCall(const QString &sipAddress,
|
||||||
|
|
||||||
bool micEnabled = options.contains("microEnabled") ? options["microEnabled"].toBool() : true;
|
bool micEnabled = options.contains("microEnabled") ? options["microEnabled"].toBool() : true;
|
||||||
params->enableMic(micEnabled);
|
params->enableMic(micEnabled);
|
||||||
|
params->enableVideo(localVideoEnabled);
|
||||||
params->setMediaEncryption(mediaEncryption);
|
params->setMediaEncryption(mediaEncryption);
|
||||||
if (Utils::coreStringToAppString(params->getRecordFile()).isEmpty()) {
|
if (Utils::coreStringToAppString(params->getRecordFile()).isEmpty()) {
|
||||||
|
|
||||||
|
|
@ -231,15 +231,21 @@ std::shared_ptr<linphone::Account> ToolModel::findAccount(const std::shared_ptr<
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<linphone::Account> ToolModel::findAccount(const QString &address) {
|
||||||
|
auto linAddr = ToolModel::interpretUrl(address);
|
||||||
|
return findAccount(linAddr);
|
||||||
|
}
|
||||||
|
|
||||||
bool ToolModel::isMe(const QString &address) {
|
bool ToolModel::isMe(const QString &address) {
|
||||||
bool isMe = false;
|
bool isMe = false;
|
||||||
auto linAddr = ToolModel::interpretUrl(address);
|
auto linAddr = ToolModel::interpretUrl(address);
|
||||||
if (!CoreModel::getInstance()->getCore()->getDefaultAccount()) {
|
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
|
||||||
|
if (!defaultAccount) {
|
||||||
for (auto &account : CoreModel::getInstance()->getCore()->getAccountList()) {
|
for (auto &account : CoreModel::getInstance()->getCore()->getAccountList()) {
|
||||||
if (account->getContactAddress()->weakEqual(linAddr)) return true;
|
if (account->getContactAddress()->weakEqual(linAddr)) return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto accountAddr = CoreModel::getInstance()->getCore()->getDefaultAccount()->getContactAddress();
|
auto accountAddr = defaultAccount->getContactAddress();
|
||||||
isMe = linAddr && accountAddr ? accountAddr->weakEqual(linAddr) : false;
|
isMe = linAddr && accountAddr ? accountAddr->weakEqual(linAddr) : false;
|
||||||
}
|
}
|
||||||
return isMe;
|
return isMe;
|
||||||
|
|
@ -261,6 +267,7 @@ bool ToolModel::isMe(const std::shared_ptr<const linphone::Address> &address) {
|
||||||
return findAccount(address) != nullptr;
|
return findAccount(address) != nullptr;
|
||||||
} else return address ? currentAccount->getContactAddress()->weakEqual(address) : false;
|
} else return address ? currentAccount->getContactAddress()->weakEqual(address) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ToolModel::isLocal(const std::shared_ptr<linphone::Conference> &conference,
|
bool ToolModel::isLocal(const std::shared_ptr<linphone::Conference> &conference,
|
||||||
const std::shared_ptr<const linphone::ParticipantDevice> &device) {
|
const std::shared_ptr<const linphone::ParticipantDevice> &device) {
|
||||||
auto deviceAddress = device->getAddress();
|
auto deviceAddress = device->getAddress();
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public:
|
||||||
static std::shared_ptr<linphone::AudioDevice> findAudioDevice(const QString &id,
|
static std::shared_ptr<linphone::AudioDevice> findAudioDevice(const QString &id,
|
||||||
linphone::AudioDevice::Capabilities capability);
|
linphone::AudioDevice::Capabilities capability);
|
||||||
static std::shared_ptr<linphone::Account> findAccount(const std::shared_ptr<const linphone::Address> &address);
|
static std::shared_ptr<linphone::Account> findAccount(const std::shared_ptr<const linphone::Address> &address);
|
||||||
|
static std::shared_ptr<linphone::Account> findAccount(const QString &address);
|
||||||
static bool isMe(const QString &address);
|
static bool isMe(const QString &address);
|
||||||
static bool isLocal(const QString &address);
|
static bool isLocal(const QString &address);
|
||||||
static bool isMe(const std::shared_ptr<const linphone::Address> &address);
|
static bool isMe(const std::shared_ptr<const linphone::Address> &address);
|
||||||
|
|
|
||||||
|
|
@ -152,9 +152,9 @@ linphone::Call::Dir LinphoneEnums::toLinphone(const LinphoneEnums::CallDir &data
|
||||||
QString LinphoneEnums::toString(const LinphoneEnums::CallDir &data) {
|
QString LinphoneEnums::toString(const LinphoneEnums::CallDir &data) {
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case LinphoneEnums::CallDir::Incoming:
|
case LinphoneEnums::CallDir::Incoming:
|
||||||
return "Incoming";
|
return QObject::tr("Entrant");
|
||||||
case LinphoneEnums::CallDir::Outgoing:
|
case LinphoneEnums::CallDir::Outgoing:
|
||||||
return "Outgoing";
|
return QObject::tr("Sortant");
|
||||||
default:
|
default:
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,21 @@ QString Utils::getInitials(const QString &username) {
|
||||||
return QLocale().toUpper(initials.join(""));
|
return QLocale().toUpper(initials.join(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VariantObject *Utils::findLocalAccountByAddress(const QString &address) {
|
||||||
|
VariantObject *data = new VariantObject();
|
||||||
|
if (!data) return nullptr;
|
||||||
|
data->makeRequest([address]() {
|
||||||
|
auto linAccount = ToolModel::findAccount(address);
|
||||||
|
if (linAccount) {
|
||||||
|
auto accountCore = AccountCore::create(linAccount);
|
||||||
|
return QVariant::fromValue(new AccountGui(accountCore));
|
||||||
|
}
|
||||||
|
return QVariant();
|
||||||
|
});
|
||||||
|
data->requestValue();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
void Utils::createCall(const QString &sipAddress,
|
void Utils::createCall(const QString &sipAddress,
|
||||||
QVariantMap options,
|
QVariantMap options,
|
||||||
LinphoneEnums::MediaEncryption mediaEncryption,
|
LinphoneEnums::MediaEncryption mediaEncryption,
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ public:
|
||||||
Q_INVOKABLE static QString getGivenNameFromFullName(const QString &fullName);
|
Q_INVOKABLE static QString getGivenNameFromFullName(const QString &fullName);
|
||||||
Q_INVOKABLE static QString getFamilyNameFromFullName(const QString &fullName);
|
Q_INVOKABLE static QString getFamilyNameFromFullName(const QString &fullName);
|
||||||
Q_INVOKABLE static QString getInitials(const QString &username); // Support UTF32
|
Q_INVOKABLE static QString getInitials(const QString &username); // Support UTF32
|
||||||
|
Q_INVOKABLE static VariantObject *findLocalAccountByAddress(const QString &address);
|
||||||
|
|
||||||
Q_INVOKABLE static void
|
Q_INVOKABLE static void
|
||||||
createCall(const QString &sipAddress,
|
createCall(const QString &sipAddress,
|
||||||
|
|
|
||||||
|
|
@ -169,10 +169,8 @@ Item{
|
||||||
anchors.bottomMargin: 10 * DefaultStyle.dp
|
anchors.bottomMargin: 10 * DefaultStyle.dp
|
||||||
videoEnabled: preview.visible && mainItem.call && mainItem.call.core.localVideoEnabled
|
videoEnabled: preview.visible && mainItem.call && mainItem.call.core.localVideoEnabled
|
||||||
onVideoEnabledChanged: console.log("P : " +videoEnabled + " / " +visible +" / " +mainItem.call)
|
onVideoEnabledChanged: console.log("P : " +videoEnabled + " / " +visible +" / " +mainItem.call)
|
||||||
property AccountProxy accounts: AccountProxy {id: accountProxy
|
property var accountObj: UtilsCpp.findLocalAccountByAddress(mainItem.localAddress)
|
||||||
sourceModel: AppCpp.accounts
|
account: accountObj ? accountObj.value : null
|
||||||
}
|
|
||||||
account: accountProxy.findAccountByAddress(mainItem.localAddress)
|
|
||||||
call: mainItem.call
|
call: mainItem.call
|
||||||
displayAll: false
|
displayAll: false
|
||||||
displayPresence: false
|
displayPresence: false
|
||||||
|
|
|
||||||
|
|
@ -78,12 +78,13 @@ ListView {
|
||||||
Layout.leftMargin: 14 * DefaultStyle.dp
|
Layout.leftMargin: 14 * DefaultStyle.dp
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
width: childrenRect.width
|
||||||
MenuButton {
|
MenuButton {
|
||||||
id: pausingButton
|
id: pausingButton
|
||||||
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||||
KeyNavigation.up: endCallButton
|
KeyNavigation.up: endCallButton
|
||||||
KeyNavigation.down: endCallButton
|
KeyNavigation.down: endCallButton
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: implicitWidth
|
||||||
Layout.preferredHeight: icon.height
|
Layout.preferredHeight: icon.height
|
||||||
icon.source: modelData.core.state === LinphoneEnums.CallState.Paused
|
icon.source: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
|
|
@ -97,6 +98,7 @@ ListView {
|
||||||
onClicked: mainWindow.endCall(modelData)
|
onClicked: mainWindow.endCall(modelData)
|
||||||
KeyNavigation.up: pausingButton
|
KeyNavigation.up: pausingButton
|
||||||
KeyNavigation.down: pausingButton
|
KeyNavigation.down: pausingButton
|
||||||
|
Layout.preferredWidth: width
|
||||||
icon.source: AppIcons.endCall
|
icon.source: AppIcons.endCall
|
||||||
contentImageColor: DefaultStyle.danger_500main
|
contentImageColor: DefaultStyle.danger_500main
|
||||||
textColor: DefaultStyle.danger_500main
|
textColor: DefaultStyle.danger_500main
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ ColumnLayout {
|
||||||
spacing: mainItem.spacing
|
spacing: mainItem.spacing
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 12 * DefaultStyle.dp
|
spacing: 12 * DefaultStyle.dp
|
||||||
|
visible: mainItem.ringerDevicesVisible
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8 * DefaultStyle.dp
|
spacing: 8 * DefaultStyle.dp
|
||||||
EffectImage {
|
EffectImage {
|
||||||
|
|
|
||||||
|
|
@ -97,14 +97,20 @@ FocusScope {
|
||||||
}
|
}
|
||||||
TextInput {
|
TextInput {
|
||||||
id: confTitle
|
id: confTitle
|
||||||
text: qsTr("Ajouter un titre")
|
Layout.fillWidth: true
|
||||||
|
property string defaultText: qsTr("Ajouter un titre")
|
||||||
|
text: defaultText
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
font {
|
font {
|
||||||
pixelSize: 20 * DefaultStyle.dp
|
pixelSize: 20 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
focus: true
|
focus: true
|
||||||
onActiveFocusChanged: if(activeFocus) selectAll()
|
onActiveFocusChanged: if(activeFocus) {
|
||||||
|
if (text == defaultText)
|
||||||
|
clear()
|
||||||
|
else selectAll()
|
||||||
|
}
|
||||||
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
||||||
KeyNavigation.down: startDate
|
KeyNavigation.down: startDate
|
||||||
}
|
}
|
||||||
|
|
@ -193,6 +199,7 @@ FocusScope {
|
||||||
Layout.preferredWidth: 307 * DefaultStyle.dp
|
Layout.preferredWidth: 307 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
oneLine: true
|
||||||
listView.implicitHeight: 250 * DefaultStyle.dp
|
listView.implicitHeight: 250 * DefaultStyle.dp
|
||||||
constantImageSource: AppIcons.globe
|
constantImageSource: AppIcons.globe
|
||||||
weight: 700 * DefaultStyle.dp
|
weight: 700 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ AbstractWindow {
|
||||||
id: callStatusText
|
id: callStatusText
|
||||||
property string remoteName: mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
property string remoteName: mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
||||||
? mainWindow.call.core.remoteName
|
? mainWindow.call.core.remoteName
|
||||||
: EnumsToStringCpp.dirToString(mainWindow.call.core.dir) + qsTr(" call")
|
: qsTr("Appel %1").arg(EnumsToStringCpp.dirToString(mainWindow.call.core.dir))
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue