2020-08-03 13:27:42 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 by Savoir-faire Linux
|
|
|
|
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-09-04 14:51:39 -04:00
|
|
|
|
2020-08-03 13:27:42 -04:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
2020-10-06 13:58:44 +02:00
|
|
|
import QtQuick.Controls.Universal 2.14
|
2021-03-17 14:23:21 -04:00
|
|
|
|
2020-08-03 13:27:42 -04:00
|
|
|
import net.jami.Models 1.0
|
2020-09-04 14:51:39 -04:00
|
|
|
import net.jami.Adapters 1.0
|
2020-12-05 14:05:57 +01:00
|
|
|
import net.jami.Constants 1.0
|
2020-08-03 13:27:42 -04:00
|
|
|
|
|
|
|
import "../../commoncomponents"
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: outgoingCallPageRect
|
|
|
|
|
|
|
|
property int buttonPreferredSize: 50
|
2020-08-24 17:46:30 +02:00
|
|
|
property int callStatus: 0
|
2020-08-03 13:27:42 -04:00
|
|
|
signal callCancelButtonIsClicked
|
|
|
|
|
|
|
|
function updateUI(accountId, convUid) {
|
2020-08-31 13:17:44 +02:00
|
|
|
userInfoCallPage.updateUI(accountId, convUid)
|
2020-08-03 13:27:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
color: "black"
|
|
|
|
|
2020-09-03 21:19:10 -04:00
|
|
|
// Prevent right click propagate to VideoCallPage.
|
2020-08-03 13:27:42 -04:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
propagateComposedEvents: false
|
2020-09-17 17:10:16 -04:00
|
|
|
acceptedButtons: Qt.AllButtons
|
|
|
|
onDoubleClicked: mouse.accepted = true
|
2020-08-03 13:27:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: outgoingCallPageRectColumnLayout
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
UserInfoCallPage {
|
|
|
|
id: userInfoCallPage
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
AnimatedImage {
|
|
|
|
id: spinnerImage
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.preferredWidth: 24
|
|
|
|
Layout.preferredHeight: 8
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
source: "qrc:/images/waiting.gif"
|
2020-08-03 13:27:42 -04:00
|
|
|
}
|
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
Text {
|
|
|
|
id: callStatusText
|
2020-08-03 13:27:42 -04:00
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.preferredWidth: outgoingCallPageRect.width
|
2020-08-31 13:17:44 +02:00
|
|
|
Layout.preferredHeight: 30
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
font.pointSize: JamiTheme.textFontSize
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-08-31 13:17:44 +02:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-09-28 18:59:40 -04:00
|
|
|
text: UtilsAdapter.getCallStatusStr(callStatus) + "…"
|
2020-08-31 13:17:44 +02:00
|
|
|
color: Qt.lighter("white", 1.5)
|
2020-08-03 13:27:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: callCancelButtonColumnLayout
|
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
2020-08-31 13:17:44 +02:00
|
|
|
Layout.bottomMargin: 48
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-09-28 18:59:40 -04:00
|
|
|
PushButton {
|
2020-08-03 13:27:42 -04:00
|
|
|
id: callCancelButton
|
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
|
|
|
|
Layout.preferredWidth: buttonPreferredSize
|
|
|
|
Layout.preferredHeight: buttonPreferredSize
|
|
|
|
|
2020-09-28 18:59:40 -04:00
|
|
|
pressedColor: JamiTheme.declineButtonPressedRed
|
|
|
|
hoveredColor: JamiTheme.declineButtonHoverRed
|
|
|
|
normalColor: JamiTheme.declineButtonRed
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-09-28 18:59:40 -04:00
|
|
|
source: "qrc:/images/icons/round-close-24px.svg"
|
|
|
|
imageColor: JamiTheme.whiteColor
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2020-09-28 18:59:40 -04:00
|
|
|
toolTipText: JamiStrings.hangup
|
2020-08-07 11:24:18 -04:00
|
|
|
|
2020-08-03 13:27:42 -04:00
|
|
|
onClicked: {
|
2020-08-31 13:17:44 +02:00
|
|
|
callCancelButtonIsClicked()
|
2020-08-03 13:27:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|