mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
feat(ui/views/App/Calls/CallsWindow): can start a new call in this view
This commit is contained in:
parent
57d4f11cb0
commit
56f7aae064
10 changed files with 144 additions and 17 deletions
|
|
@ -304,6 +304,17 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CallSipAddress</name>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation>CANCEL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>callSipAddressDescription</source>
|
||||
<translation>Start a new call.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CallStatistics</name>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -304,6 +304,17 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CallSipAddress</name>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation>ANNULER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>callSipAddressDescription</source>
|
||||
<translation>Lancer un nouvel appel.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CallStatistics</name>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@
|
|||
<file>ui/views/App/Calls/CallsWindow.js</file>
|
||||
<file>ui/views/App/Calls/CallsWindow.qml</file>
|
||||
<file>ui/views/App/Calls/Conference.qml</file>
|
||||
<file>ui/views/App/Calls/Dialogs/CallSipAddress.qml</file>
|
||||
<file>ui/views/App/Calls/Dialogs/CallTransfer.qml</file>
|
||||
<file>ui/views/App/Calls/Dialogs/ConferenceManager.qml</file>
|
||||
<file>ui/views/App/Calls/EndedCall.qml</file>
|
||||
|
|
@ -420,6 +421,7 @@
|
|||
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/ConferenceStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml</file>
|
||||
<file>ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml</file>
|
||||
|
|
|
|||
|
|
@ -152,9 +152,9 @@ ContactModel *ContactsListModel::addContact (VcardModel *vcardModel) {
|
|||
|
||||
qInfo() << QStringLiteral("Add contact from vcard:") << contact << vcardModel;
|
||||
|
||||
//make sure new subscribe is issued
|
||||
// Make sure new subscribe is issued.
|
||||
mLinphoneFriends->updateSubscriptions();
|
||||
|
||||
|
||||
int row = mList.count();
|
||||
|
||||
beginInsertRows(QModelIndex(), row, row);
|
||||
|
|
@ -189,22 +189,15 @@ void ContactsListModel::cleanAvatars () {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
void ContactsListModel::addContact (ContactModel *contact) {
|
||||
QObject::connect(
|
||||
contact, &ContactModel::contactUpdated,
|
||||
this, [this, contact]() {
|
||||
QObject::connect(contact, &ContactModel::contactUpdated, this, [this, contact]() {
|
||||
emit contactUpdated(contact);
|
||||
}
|
||||
);
|
||||
QObject::connect(
|
||||
contact, &ContactModel::sipAddressAdded, this, [this, contact](const QString &sipAddress) {
|
||||
});
|
||||
QObject::connect(contact, &ContactModel::sipAddressAdded, this, [this, contact](const QString &sipAddress) {
|
||||
emit sipAddressAdded(contact, sipAddress);
|
||||
}
|
||||
);
|
||||
QObject::connect(
|
||||
contact, &ContactModel::sipAddressRemoved, this, [this, contact](const QString &sipAddress) {
|
||||
});
|
||||
QObject::connect(contact, &ContactModel::sipAddressRemoved, this, [this, contact](const QString &sipAddress) {
|
||||
emit sipAddressRemoved(contact, sipAddress);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
mList << contact;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ function handleClosing (close) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function openCallSipAddress () {
|
||||
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/CallSipAddress.qml'))
|
||||
}
|
||||
|
||||
function openConferenceManager () {
|
||||
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/ConferenceManager.qml'))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ Window {
|
|||
|
||||
ActionButton {
|
||||
icon: 'new_call'
|
||||
// TODO: launch new call
|
||||
|
||||
onClicked: Logic.openCallSipAddress()
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import Common 1.0
|
||||
import Linphone 1.0
|
||||
|
||||
import App.Styles 1.0
|
||||
|
||||
// =============================================================================
|
||||
|
||||
DialogPlus {
|
||||
buttons: [
|
||||
TextButtonA {
|
||||
text: qsTr('cancel')
|
||||
|
||||
onClicked: exit(0)
|
||||
}
|
||||
]
|
||||
|
||||
centeredButtons: true
|
||||
descriptionText: qsTr('callSipAddressDescription')
|
||||
|
||||
height: CallSipAddressStyle.height
|
||||
width: CallSipAddressStyle.width
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
ColumnLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: CallSipAddressStyle.leftMargin
|
||||
rightMargin: CallSipAddressStyle.rightMargin
|
||||
}
|
||||
|
||||
spacing: 0
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Address selector.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: CallSipAddressStyle.spacing
|
||||
|
||||
TextField {
|
||||
id: filter
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
icon: 'search'
|
||||
|
||||
onTextChanged: sipAddressesModel.setFilter(text)
|
||||
}
|
||||
|
||||
ScrollableListViewField {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
SipAddressesView {
|
||||
anchors.fill: parent
|
||||
|
||||
actions: [{
|
||||
icon: 'video_call',
|
||||
handler: function (entry) {
|
||||
CallsListModel.launchVideoCall(entry.sipAddress)
|
||||
exit(1)
|
||||
}
|
||||
}, {
|
||||
icon: 'call',
|
||||
handler: function (entry) {
|
||||
CallsListModel.launchAudioCall(entry.sipAddress)
|
||||
exit(1)
|
||||
}
|
||||
}]
|
||||
|
||||
genSipAddress: filter.text
|
||||
|
||||
model: SipAddressesProxyModel {
|
||||
id: sipAddressesModel
|
||||
}
|
||||
|
||||
onEntryClicked: actions[0].handler(entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
// =============================================================================
|
||||
|
||||
QtObject {
|
||||
property int height: 420
|
||||
property int leftMargin: 35
|
||||
property int rightMargin: 35
|
||||
property int spacing: 10
|
||||
property int width: 450
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ singleton CallStyle 1.0 Calls/CallStyle.qml
|
|||
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
|
||||
singleton ConferenceStyle 1.0 Calls/ConferenceStyle.qml
|
||||
|
||||
singleton CallSipAddressStyle 1.0 Calls/Dialogs/CallSipAddressStyle.qml
|
||||
singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransferStyle.qml
|
||||
singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 4fccaf7b8f2363cd3dee4bb1c1b6f44b3f54d599
|
||||
Subproject commit 730d42f576b3567484393f37fd96d7c1abaaaadc
|
||||
Loading…
Add table
Reference in a new issue