linphone-desktop/Linphone/view/Item/Notification/NotificationReceivedCall.qml
Julien Wadel 7ff6989614 Fix crash on logger (instance lost).
Add Call model.
Start audio call from Utils.
Simplify VariantObject to use only setValue().
Add notifications.
2023-11-20 08:52:31 +00: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.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.lAccept()
}
}
Item{
Layout.fillWidth: true
Layout.fillHeight: true
}
Button {
text: 'Reject'
Layout.rightMargin: 20
onClicked: {
notification.call.lDecline()
}
}
}
}
}