linphone-desktop/Linphone/view/Item/Notification/NotificationReceivedCall.qml
Gaelle Braud 97c01e66f8 call history
new item: popup button
2023-12-22 17:28:35 +01:00

56 lines
1.3 KiB
QML

import QtQuick 2.7
import QtQuick.Layouts 1.3
import Linphone
import UtilsCpp
// =============================================================================
Notification {
id: notification
// ---------------------------------------------------------------------------
readonly property var call: notificationData && notificationData.call
property var state: call.core.state
onStateChanged:{
console.log("state notif", state)
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)
UtilsCpp.openCallsWindow(notification.call)
}
}
Item{
Layout.fillWidth: true
Layout.fillHeight: true
}
Button {
text: 'Reject'
Layout.rightMargin: 20
onClicked: {
notification.call.core.lDecline()
}
}
}
}
}