mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
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;
|
||||
params->enableMic(micEnabled);
|
||||
|
||||
params->enableVideo(localVideoEnabled);
|
||||
params->setMediaEncryption(mediaEncryption);
|
||||
if (Utils::coreStringToAppString(params->getRecordFile()).isEmpty()) {
|
||||
|
||||
|
|
@ -231,15 +231,21 @@ std::shared_ptr<linphone::Account> ToolModel::findAccount(const std::shared_ptr<
|
|||
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 isMe = false;
|
||||
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()) {
|
||||
if (account->getContactAddress()->weakEqual(linAddr)) return true;
|
||||
}
|
||||
} else {
|
||||
auto accountAddr = CoreModel::getInstance()->getCore()->getDefaultAccount()->getContactAddress();
|
||||
auto accountAddr = defaultAccount->getContactAddress();
|
||||
isMe = linAddr && accountAddr ? accountAddr->weakEqual(linAddr) : false;
|
||||
}
|
||||
return isMe;
|
||||
|
|
@ -261,6 +267,7 @@ bool ToolModel::isMe(const std::shared_ptr<const linphone::Address> &address) {
|
|||
return findAccount(address) != nullptr;
|
||||
} else return address ? currentAccount->getContactAddress()->weakEqual(address) : false;
|
||||
}
|
||||
|
||||
bool ToolModel::isLocal(const std::shared_ptr<linphone::Conference> &conference,
|
||||
const std::shared_ptr<const linphone::ParticipantDevice> &device) {
|
||||
auto deviceAddress = device->getAddress();
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public:
|
|||
static std::shared_ptr<linphone::AudioDevice> findAudioDevice(const QString &id,
|
||||
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 QString &address);
|
||||
static bool isMe(const QString &address);
|
||||
static bool isLocal(const QString &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) {
|
||||
switch (data) {
|
||||
case LinphoneEnums::CallDir::Incoming:
|
||||
return "Incoming";
|
||||
return QObject::tr("Entrant");
|
||||
case LinphoneEnums::CallDir::Outgoing:
|
||||
return "Outgoing";
|
||||
return QObject::tr("Sortant");
|
||||
default:
|
||||
return QString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,21 @@ QString Utils::getInitials(const QString &username) {
|
|||
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,
|
||||
QVariantMap options,
|
||||
LinphoneEnums::MediaEncryption mediaEncryption,
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public:
|
|||
Q_INVOKABLE static QString getGivenNameFromFullName(const QString &fullName);
|
||||
Q_INVOKABLE static QString getFamilyNameFromFullName(const QString &fullName);
|
||||
Q_INVOKABLE static QString getInitials(const QString &username); // Support UTF32
|
||||
Q_INVOKABLE static VariantObject *findLocalAccountByAddress(const QString &address);
|
||||
|
||||
Q_INVOKABLE static void
|
||||
createCall(const QString &sipAddress,
|
||||
|
|
|
|||
|
|
@ -169,10 +169,8 @@ Item{
|
|||
anchors.bottomMargin: 10 * DefaultStyle.dp
|
||||
videoEnabled: preview.visible && mainItem.call && mainItem.call.core.localVideoEnabled
|
||||
onVideoEnabledChanged: console.log("P : " +videoEnabled + " / " +visible +" / " +mainItem.call)
|
||||
property AccountProxy accounts: AccountProxy {id: accountProxy
|
||||
sourceModel: AppCpp.accounts
|
||||
}
|
||||
account: accountProxy.findAccountByAddress(mainItem.localAddress)
|
||||
property var accountObj: UtilsCpp.findLocalAccountByAddress(mainItem.localAddress)
|
||||
account: accountObj ? accountObj.value : null
|
||||
call: mainItem.call
|
||||
displayAll: false
|
||||
displayPresence: false
|
||||
|
|
|
|||
|
|
@ -78,12 +78,13 @@ ListView {
|
|||
Layout.leftMargin: 14 * DefaultStyle.dp
|
||||
popup.contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
width: childrenRect.width
|
||||
MenuButton {
|
||||
id: pausingButton
|
||||
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||
KeyNavigation.up: endCallButton
|
||||
KeyNavigation.down: endCallButton
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: implicitWidth
|
||||
Layout.preferredHeight: icon.height
|
||||
icon.source: modelData.core.state === LinphoneEnums.CallState.Paused
|
||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||
|
|
@ -97,6 +98,7 @@ ListView {
|
|||
onClicked: mainWindow.endCall(modelData)
|
||||
KeyNavigation.up: pausingButton
|
||||
KeyNavigation.down: pausingButton
|
||||
Layout.preferredWidth: width
|
||||
icon.source: AppIcons.endCall
|
||||
contentImageColor: DefaultStyle.danger_500main
|
||||
textColor: DefaultStyle.danger_500main
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ ColumnLayout {
|
|||
spacing: mainItem.spacing
|
||||
ColumnLayout {
|
||||
spacing: 12 * DefaultStyle.dp
|
||||
visible: mainItem.ringerDevicesVisible
|
||||
RowLayout {
|
||||
spacing: 8 * DefaultStyle.dp
|
||||
EffectImage {
|
||||
|
|
|
|||
|
|
@ -97,14 +97,20 @@ FocusScope {
|
|||
}
|
||||
TextInput {
|
||||
id: confTitle
|
||||
text: qsTr("Ajouter un titre")
|
||||
Layout.fillWidth: true
|
||||
property string defaultText: qsTr("Ajouter un titre")
|
||||
text: defaultText
|
||||
color: DefaultStyle.main2_600
|
||||
font {
|
||||
pixelSize: 20 * DefaultStyle.dp
|
||||
weight: 800 * DefaultStyle.dp
|
||||
}
|
||||
focus: true
|
||||
onActiveFocusChanged: if(activeFocus) selectAll()
|
||||
onActiveFocusChanged: if(activeFocus) {
|
||||
if (text == defaultText)
|
||||
clear()
|
||||
else selectAll()
|
||||
}
|
||||
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
||||
KeyNavigation.down: startDate
|
||||
}
|
||||
|
|
@ -193,6 +199,7 @@ FocusScope {
|
|||
Layout.preferredWidth: 307 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||
hoverEnabled: true
|
||||
oneLine: true
|
||||
listView.implicitHeight: 250 * DefaultStyle.dp
|
||||
constantImageSource: AppIcons.globe
|
||||
weight: 700 * DefaultStyle.dp
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ AbstractWindow {
|
|||
id: callStatusText
|
||||
property string remoteName: mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
||||
? 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)
|
||||
? qsTr("Fin d'appel")
|
||||
: mainWindow.call && (mainWindow.call.core.paused
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue