linphone-desktop/Linphone/view/Item/Notification/NotificationReceivedCall.qml
Julien Wadel cd82964b23 Replace postAsync functions by SafeConnection in order to make more robust thread connections and guarantee to have always caller/callee while processing signals.
Introduce ObjectCore, ObjectGui, ObjectModel.
Simulate addAccount signals on adding account (in waiting for SDK callback).
2023-11-22 14:55:38 +01:00

54 lines
1.2 KiB
QML

import QtQuick 2.7
import QtQuick.Layouts 1.3
import Linphone
// =============================================================================
Notification {
id: notification
// ---------------------------------------------------------------------------
readonly property var call: notificationData && notificationData.call
property var state: call.core.state
onStateChanged:{
if(state != LinphoneEnums.CallState.IncomingReceived){
close()
}
}
// ---------------------------------------------------------------------------
ColumnLayout {
anchors.fill: parent
anchors.leftMargin: 15
anchors.rightMargin: 15
anchors.bottomMargin:15
spacing: 0
// ---------------------------------------------------------------------
// Action buttons.
// ---------------------------------------------------------------------
RowLayout {
Layout.fillHeight: true
Layout.fillWidth: true
Button {
text: 'Accept'
Layout.rightMargin: 20
onClicked: {
notification.call.core.lAccept(true)
}
}
Item{
Layout.fillWidth: true
Layout.fillHeight: true
}
Button {
text: 'Reject'
Layout.rightMargin: 20
onClicked: {
notification.call.core.lDecline()
}
}
}
}
}