ongoing call notification
This commit is contained in:
parent
7da33786d1
commit
4f5d6cabfa
13 changed files with 106 additions and 25 deletions
|
|
@ -58,7 +58,7 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
||||||
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
|
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
|
||||||
if (!defaultAccount) return;
|
if (!defaultAccount) return;
|
||||||
std::list<std::shared_ptr<linphone::ConferenceInfo>> conferenceInfos =
|
std::list<std::shared_ptr<linphone::ConferenceInfo>> conferenceInfos =
|
||||||
defaultAccount->getConferenceInformationList();
|
defaultAccount->getConferenceInformationList();
|
||||||
items->push_back(nullptr); // Add Dummy conference for today
|
items->push_back(nullptr); // Add Dummy conference for today
|
||||||
for (auto conferenceInfo : conferenceInfos) {
|
for (auto conferenceInfo : conferenceInfos) {
|
||||||
auto confInfoCore = build(conferenceInfo);
|
auto confInfoCore = build(conferenceInfo);
|
||||||
|
|
@ -102,15 +102,11 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
||||||
emit lUpdate();
|
emit lUpdate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mCoreModelConnection->makeConnectToModel(
|
|
||||||
&CoreModel::callCreated, [this](const std::shared_ptr<linphone::Call> &call) {
|
|
||||||
lDebug() << "call created" << Utils::coreStringToAppString(call->getRemoteAddress()->asString());
|
|
||||||
});
|
|
||||||
mCoreModelConnection->makeConnectToModel(
|
mCoreModelConnection->makeConnectToModel(
|
||||||
&CoreModel::conferenceInfoReceived,
|
&CoreModel::conferenceInfoReceived,
|
||||||
[this](const std::shared_ptr<linphone::Core> &core,
|
[this](const std::shared_ptr<linphone::Core> &core,
|
||||||
const std::shared_ptr<const linphone::ConferenceInfo> &conferenceInfo) {
|
const std::shared_ptr<const linphone::ConferenceInfo> &conferenceInfo) {
|
||||||
lDebug() << "info received" << conferenceInfo->getOrganizer()->asStringUriOnly()
|
lDebug() << log().arg("conference info received") << conferenceInfo->getOrganizer()->asStringUriOnly()
|
||||||
<< conferenceInfo->getSubject();
|
<< conferenceInfo->getSubject();
|
||||||
});
|
});
|
||||||
emit lUpdate();
|
emit lUpdate();
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,11 @@ void Utils::setupConference(ConferenceInfoGui *confGui) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Utils::openCallsWindow(CallGui *call) {
|
void Utils::openCallsWindow(CallGui *call) {
|
||||||
if (call) App::getInstance()->getCallsWindow(QVariant::fromValue(call))->show();
|
if (call) {
|
||||||
|
auto window = App::getInstance()->getCallsWindow(QVariant::fromValue(call));
|
||||||
|
window->show();
|
||||||
|
window->raise();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QQuickWindow *Utils::getCallsWindow(CallGui *callGui) {
|
QQuickWindow *Utils::getCallsWindow(CallGui *callGui) {
|
||||||
|
|
|
||||||
|
|
@ -69,15 +69,37 @@ Item {
|
||||||
id: accountProxy
|
id: accountProxy
|
||||||
onDefaultAccountChanged: if (tabbar.currentIndex === 0 && defaultAccount) defaultAccount.core.lResetMissedCalls()
|
onDefaultAccountChanged: if (tabbar.currentIndex === 0 && defaultAccount) defaultAccount.core.lResetMissedCalls()
|
||||||
}
|
}
|
||||||
|
CallProxy {
|
||||||
Timer {
|
id: callsModel
|
||||||
id: autoClosePopup
|
|
||||||
interval: 5000
|
|
||||||
onTriggered: {
|
|
||||||
transferSucceedPopup.close()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
|
Popup {
|
||||||
|
id: currentCallNotif
|
||||||
|
background: Item{}
|
||||||
|
closePolicy: Control.Popup.NoAutoClose
|
||||||
|
visible: currentCall
|
||||||
|
&& currentCall.core.state != LinphoneEnums.CallState.Idle
|
||||||
|
&& currentCall.core.state != LinphoneEnums.CallState.IncomingReceived
|
||||||
|
&& currentCall.core.state != LinphoneEnums.CallState.PushIncomingReceived
|
||||||
|
x: mainItem.width/2 - width/2
|
||||||
|
y: contentItem.height/2
|
||||||
|
property var currentCall: callsModel.currentCall ? callsModel.currentCall : null
|
||||||
|
property var peerNameObj: currentCall ? UtilsCpp.getDisplayName(currentCall.core.peerAddress) : null
|
||||||
|
property string peerName:peerNameObj ? peerNameObj.value : ""
|
||||||
|
contentItem: Button {
|
||||||
|
text: currentCallNotif.currentCall
|
||||||
|
? currentCallNotif.currentCall.core.conference
|
||||||
|
? ("Réunion en cours : ") + currentCallNotif.currentCall.core.conference.core.subject
|
||||||
|
: (("Appel en cours : ") + currentCallNotif.peerName) : "appel en cours"
|
||||||
|
color: DefaultStyle.success_500main
|
||||||
|
onClicked: {
|
||||||
|
var callsWindow = UtilsCpp.getCallsWindow(currentCallNotif.currentCall)
|
||||||
|
UtilsCpp.smartShowWindow(callsWindow)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ColumnLayout{
|
ColumnLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
|
|
||||||
view/Item/Notification/Notification.qml
|
view/Item/Notification/Notification.qml
|
||||||
view/Item/Notification/NotificationReceivedCall.qml
|
view/Item/Notification/NotificationReceivedCall.qml
|
||||||
|
view/Item/Notification/TemporaryNotification.qml
|
||||||
|
|
||||||
view/Item/Participant/ParticipantDeviceListView.qml
|
view/Item/Participant/ParticipantDeviceListView.qml
|
||||||
view/Item/Participant/ParticipantListView.qml
|
view/Item/Participant/ParticipantListView.qml
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ Control.Button {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property int capitalization
|
property int capitalization
|
||||||
property color color: DefaultStyle.main1_500_main
|
property color color: DefaultStyle.main1_500_main
|
||||||
property color disabledColor: DefaultStyle.main1_500_main_darker
|
property color disabledColor: Qt.darker(color, 1.5)
|
||||||
property color borderColor: "transparent"
|
property color borderColor: DefaultStyle.grey_0
|
||||||
property color pressedColor: DefaultStyle.main1_500_main_darker
|
readonly property color pressedColor: Qt.darker(color, 1.1)
|
||||||
property bool inversedColors: false
|
property bool inversedColors: false
|
||||||
property int textSize: 18 * DefaultStyle.dp
|
property int textSize: 18 * DefaultStyle.dp
|
||||||
property int textWeight: 600 * DefaultStyle.dp
|
property int textWeight: 600 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,6 @@ ListView {
|
||||||
height: 30 * DefaultStyle.dp
|
height: 30 * DefaultStyle.dp
|
||||||
radius: 50 * DefaultStyle.dp
|
radius: 50 * DefaultStyle.dp
|
||||||
color: isSelectedDay ? DefaultStyle.main1_500_main : "transparent"
|
color: isSelectedDay ? DefaultStyle.main1_500_main : "transparent"
|
||||||
border.color: DefaultStyle.main1_500_main_darker
|
|
||||||
border.width: focusDay.activeFocus || hoveringArea.containsMouse ? 1 : 0
|
border.width: focusDay.activeFocus || hoveringArea.containsMouse ? 1 : 0
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Item{
|
||||||
property int textSize: 14 * DefaultStyle.dp
|
property int textSize: 14 * DefaultStyle.dp
|
||||||
property int textWeight: 400 * DefaultStyle.dp
|
property int textWeight: 400 * DefaultStyle.dp
|
||||||
property color backgroundColor: DefaultStyle.grey_0
|
property color backgroundColor: DefaultStyle.grey_0
|
||||||
property color backgroundPressedColor: DefaultStyle.main2_100
|
readonly property color backgroundPressedColor: Qt.darker(backgroundColor, 1.1)
|
||||||
property int radius: 5 * DefaultStyle.dp
|
property int radius: 5 * DefaultStyle.dp
|
||||||
property bool shadowEnabled: mainItem.activeFocus// || containsMouse
|
property bool shadowEnabled: mainItem.activeFocus// || containsMouse
|
||||||
property alias containsMouse: mouseArea.containsMouse
|
property alias containsMouse: mouseArea.containsMouse
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,6 @@ Notification {
|
||||||
spacing: 26 * DefaultStyle.dp
|
spacing: 26 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
color: DefaultStyle.success_500main
|
color: DefaultStyle.success_500main
|
||||||
pressedColor: DefaultStyle.success_500main_darker
|
|
||||||
Layout.preferredWidth: 75 * DefaultStyle.dp
|
Layout.preferredWidth: 75 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
contentItem: EffectImage {
|
contentItem: EffectImage {
|
||||||
|
|
|
||||||
65
Linphone/view/Item/Notification/TemporaryNotification.qml
Normal file
65
Linphone/view/Item/Notification/TemporaryNotification.qml
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Effects
|
||||||
|
import Linphone
|
||||||
|
|
||||||
|
Control.Control {
|
||||||
|
id: mainItem
|
||||||
|
// width: 269 * DefaultStyle.dp
|
||||||
|
y: -height
|
||||||
|
z: 1
|
||||||
|
topPadding: 8 * DefaultStyle.dp
|
||||||
|
bottomPadding: 8 * DefaultStyle.dp
|
||||||
|
leftPadding: 37 * DefaultStyle.dp
|
||||||
|
rightPadding: 37 * DefaultStyle.dp
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
property string text
|
||||||
|
property string imageSource
|
||||||
|
property color contentColor
|
||||||
|
property int yCoord
|
||||||
|
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
|
function open() {
|
||||||
|
y = mainItem.yCoord
|
||||||
|
autoCloseNotification.restart()
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: mainItem.clicked()
|
||||||
|
}
|
||||||
|
Timer {
|
||||||
|
id: autoCloseNotification
|
||||||
|
interval: 4000
|
||||||
|
onTriggered: {
|
||||||
|
mainItem.y = -mainItem.height
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Behavior on y {NumberAnimation {duration: 1000}}
|
||||||
|
background: Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: DefaultStyle.grey_0
|
||||||
|
border.color: mainItem.contentColor
|
||||||
|
border.width: 1 * DefaultStyle.dp
|
||||||
|
radius: 50 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
Image {
|
||||||
|
visible: mainItem.imageSource != undefined
|
||||||
|
source: mainItem.imageSource
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
color: mainItem.contentColor
|
||||||
|
text: mainItem.text
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font {
|
||||||
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -85,7 +85,6 @@ ListView {
|
||||||
Layout.preferredWidth: 20 * DefaultStyle.dp
|
Layout.preferredWidth: 20 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 20 * DefaultStyle.dp
|
Layout.preferredHeight: 20 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_100
|
color: DefaultStyle.main2_100
|
||||||
pressedColor: DefaultStyle.main2_200
|
|
||||||
icon.source: AppIcons.closeX
|
icon.source: AppIcons.closeX
|
||||||
icon.width: 14 * DefaultStyle.dp
|
icon.width: 14 * DefaultStyle.dp
|
||||||
icon.height: 14 * DefaultStyle.dp
|
icon.height: 14 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ Item{
|
||||||
Button {
|
Button {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
borderColor: DefaultStyle.main2_400
|
borderColor: DefaultStyle.main2_400
|
||||||
pressedColor: DefaultStyle.main2_500main
|
|
||||||
icon.source: AppIcons.shareNetwork
|
icon.source: AppIcons.shareNetwork
|
||||||
contentImageColor: DefaultStyle.main2_400
|
contentImageColor: DefaultStyle.main2_400
|
||||||
text: qsTr("Share invitation")
|
text: qsTr("Share invitation")
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,6 @@ ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("Rejoindre la réunion")
|
text: qsTr("Rejoindre la réunion")
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
pressedColor: DefaultStyle.main2_400
|
|
||||||
textColor: DefaultStyle.main2_600
|
textColor: DefaultStyle.main2_600
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mainItem.conferenceInfo) {
|
if (mainItem.conferenceInfo) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import QtQuick 2.15
|
||||||
QtObject {
|
QtObject {
|
||||||
property color main1_100: "#FFEACB"
|
property color main1_100: "#FFEACB"
|
||||||
property color main1_500_main: "#FE5E00"
|
property color main1_500_main: "#FE5E00"
|
||||||
property color main1_500_main_darker: "#C94C02"
|
|
||||||
|
|
||||||
property color main2_0: "#FAFEFF"
|
property color main2_0: "#FAFEFF"
|
||||||
property color main2_100: "#EEF6F8"
|
property color main2_100: "#EEF6F8"
|
||||||
|
|
@ -29,7 +28,6 @@ QtObject {
|
||||||
property color warning_600: "#DBB820"
|
property color warning_600: "#DBB820"
|
||||||
property color danger_500main: "#DD5F5F"
|
property color danger_500main: "#DD5F5F"
|
||||||
property color success_500main: "#4FAE80"
|
property color success_500main: "#4FAE80"
|
||||||
property color success_500main_darker: "#3F8C67"
|
|
||||||
property color info_500_main: "#4AA8FF"
|
property color info_500_main: "#4AA8FF"
|
||||||
|
|
||||||
property color vue_meter_light_green: "#6FF88D"
|
property color vue_meter_light_green: "#6FF88D"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue