mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 20:08:28 +00:00
add chat history button in call list for meetings with chat #LINQT-2449
This commit is contained in:
parent
5b78daf372
commit
e7598bef1e
10 changed files with 195 additions and 82 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include "CallHistoryCore.hpp"
|
#include "CallHistoryCore.hpp"
|
||||||
#include "core/App.hpp"
|
#include "core/App.hpp"
|
||||||
|
#include "core/chat/ChatGui.hpp"
|
||||||
#include "core/conference/ConferenceInfoCore.hpp"
|
#include "core/conference/ConferenceInfoCore.hpp"
|
||||||
#include "core/friend/FriendGui.hpp"
|
#include "core/friend/FriendGui.hpp"
|
||||||
#include "model/call-history/CallHistoryModel.hpp"
|
#include "model/call-history/CallHistoryModel.hpp"
|
||||||
|
|
@ -58,6 +59,9 @@ CallHistoryCore::CallHistoryCore(const std::shared_ptr<linphone::CallLog> &callL
|
||||||
mConferenceInfo = ConferenceInfoCore::create(confinfo);
|
mConferenceInfo = ConferenceInfoCore::create(confinfo);
|
||||||
mRemoteAddress = Utils::coreStringToAppString(confinfo->getUri()->asStringUriOnly());
|
mRemoteAddress = Utils::coreStringToAppString(confinfo->getUri()->asStringUriOnly());
|
||||||
mDisplayName = Utils::coreStringToAppString(confinfo->getSubject());
|
mDisplayName = Utils::coreStringToAppString(confinfo->getSubject());
|
||||||
|
if (auto chatroom = callLog->getChatRoom()) {
|
||||||
|
mChatCore = ChatCore::create(chatroom);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly());
|
mRemoteAddress = Utils::coreStringToAppString(addr->asStringUriOnly());
|
||||||
auto linphoneFriend = ToolModel::findFriendByAddress(addr);
|
auto linphoneFriend = ToolModel::findFriendByAddress(addr);
|
||||||
|
|
@ -156,6 +160,10 @@ void CallHistoryCore::setDuration(const QString &duration) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChatGui *CallHistoryCore::getChatGui() const {
|
||||||
|
return mChatCore ? new ChatGui(mChatCore) : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
void CallHistoryCore::remove() {
|
void CallHistoryCore::remove() {
|
||||||
mHistoryModelConnection->invokeToModel([this]() {
|
mHistoryModelConnection->invokeToModel([this]() {
|
||||||
mCallHistoryModel->removeCallHistory();
|
mCallHistoryModel->removeCallHistory();
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@
|
||||||
#include <linphone++/linphone.hh>
|
#include <linphone++/linphone.hh>
|
||||||
|
|
||||||
class CallHistoryModel;
|
class CallHistoryModel;
|
||||||
|
class ChatCore;
|
||||||
|
class ChatGui;
|
||||||
class FriendModel;
|
class FriendModel;
|
||||||
|
|
||||||
class CallHistoryCore : public QObject, public AbstractObject {
|
class CallHistoryCore : public QObject, public AbstractObject {
|
||||||
|
|
@ -40,6 +42,7 @@ class CallHistoryCore : public QObject, public AbstractObject {
|
||||||
Q_PROPERTY(bool isOutgoing MEMBER mIsOutgoing CONSTANT)
|
Q_PROPERTY(bool isOutgoing MEMBER mIsOutgoing CONSTANT)
|
||||||
Q_PROPERTY(bool isConference MEMBER mIsConference CONSTANT)
|
Q_PROPERTY(bool isConference MEMBER mIsConference CONSTANT)
|
||||||
Q_PROPERTY(ConferenceInfoGui *conferenceInfo READ getConferenceInfoGui CONSTANT)
|
Q_PROPERTY(ConferenceInfoGui *conferenceInfo READ getConferenceInfoGui CONSTANT)
|
||||||
|
Q_PROPERTY(ChatGui *chatGui READ getChatGui CONSTANT)
|
||||||
Q_PROPERTY(QDateTime date MEMBER mDate CONSTANT)
|
Q_PROPERTY(QDateTime date MEMBER mDate CONSTANT)
|
||||||
Q_PROPERTY(LinphoneEnums::CallStatus status MEMBER mStatus CONSTANT)
|
Q_PROPERTY(LinphoneEnums::CallStatus status MEMBER mStatus CONSTANT)
|
||||||
Q_PROPERTY(QString duration READ getDuration WRITE setDuration NOTIFY durationChanged)
|
Q_PROPERTY(QString duration READ getDuration WRITE setDuration NOTIFY durationChanged)
|
||||||
|
|
@ -55,6 +58,8 @@ public:
|
||||||
QString getDuration() const;
|
QString getDuration() const;
|
||||||
void setDuration(const QString &duration);
|
void setDuration(const QString &duration);
|
||||||
|
|
||||||
|
ChatGui *getChatGui() const;
|
||||||
|
|
||||||
void onRemoved(const std::shared_ptr<linphone::Friend> &updatedFriend);
|
void onRemoved(const std::shared_ptr<linphone::Friend> &updatedFriend);
|
||||||
|
|
||||||
Q_INVOKABLE void remove();
|
Q_INVOKABLE void remove();
|
||||||
|
|
@ -76,6 +81,7 @@ signals:
|
||||||
private:
|
private:
|
||||||
QString mDuration;
|
QString mDuration;
|
||||||
QSharedPointer<ConferenceInfoCore> mConferenceInfo = nullptr;
|
QSharedPointer<ConferenceInfoCore> mConferenceInfo = nullptr;
|
||||||
|
QSharedPointer<ChatCore> mChatCore = nullptr;
|
||||||
std::shared_ptr<CallHistoryModel> mCallHistoryModel;
|
std::shared_ptr<CallHistoryModel> mCallHistoryModel;
|
||||||
std::shared_ptr<FriendModel> mFriendModel;
|
std::shared_ptr<FriendModel> mFriendModel;
|
||||||
QSharedPointer<SafeConnection<CallHistoryCore, FriendModel>> mFriendModelConnection;
|
QSharedPointer<SafeConnection<CallHistoryCore, FriendModel>> mFriendModelConnection;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ ColumnLayout {
|
||||||
|
|
||||||
property FriendGui contact
|
property FriendGui contact
|
||||||
property var conferenceInfo: callHistoryGui?.core.conferenceInfo
|
property var conferenceInfo: callHistoryGui?.core.conferenceInfo
|
||||||
|
property var chatGui: callHistoryGui?.core.chatGui
|
||||||
property bool isConference: conferenceInfo != undefined && conferenceInfo != null
|
property bool isConference: conferenceInfo != undefined && conferenceInfo != null
|
||||||
property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || ""
|
property string contactAddress: specificAddress != "" ? specificAddress : contact && contact.core.defaultAddress || ""
|
||||||
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
|
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
|
||||||
|
|
@ -33,8 +34,12 @@ ColumnLayout {
|
||||||
property alias buttonContent: rightButton.data
|
property alias buttonContent: rightButton.data
|
||||||
property alias detailContent: detailControl.data
|
property alias detailContent: detailControl.data
|
||||||
|
|
||||||
|
signal conferenceChatDisplayRequested()
|
||||||
|
signal conferenceCallHistoryDisplayRequested()
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Utils.getSizeWithScreenRatio(13)
|
spacing: Utils.getSizeWithScreenRatio(13)
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: Utils.getSizeWithScreenRatio(360)
|
Layout.preferredWidth: Utils.getSizeWithScreenRatio(360)
|
||||||
Layout.preferredHeight: detailAvatar.height
|
Layout.preferredHeight: detailAvatar.height
|
||||||
|
|
@ -65,6 +70,7 @@ ColumnLayout {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Utils.getSizeWithScreenRatio(2)
|
spacing: Utils.getSizeWithScreenRatio(2)
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Text {
|
Text {
|
||||||
Layout.preferredWidth: implicitWidth
|
Layout.preferredWidth: implicitWidth
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
@ -81,7 +87,7 @@ ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
visible: mainItem.specificAddress != ""
|
visible: mainItem.specificAddress != "" && !mainItem.isConference
|
||||||
text: SettingsCpp.hideSipAddresses ? UtilsCpp.getUsername(mainItem.specificAddress) : mainItem.specificAddress
|
text: SettingsCpp.hideSipAddresses ? UtilsCpp.getUsername(mainItem.specificAddress) : mainItem.specificAddress
|
||||||
elide: Text.ElideMiddle
|
elide: Text.ElideMiddle
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
|
|
@ -106,7 +112,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MediumButton {
|
MediumButton {
|
||||||
visible: mainItem.isConference && !SettingsCpp.disableMeetingsFeature
|
visible: mainItem.isConference && !SettingsCpp.disableMeetingsFeature && !confWithChatLayout.visible
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
//: "Rejoindre la réunion"
|
//: "Rejoindre la réunion"
|
||||||
text: qsTr("meeting_info_join_title")
|
text: qsTr("meeting_info_join_title")
|
||||||
|
|
@ -119,6 +125,47 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RowLayout {
|
||||||
|
id: confWithChatLayout
|
||||||
|
visible: mainItem.isConference && !SettingsCpp.disableMeetingsFeature && mainItem.chatGui !== null
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
spacing: Utils.getSizeWithScreenRatio(72)
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: childrenRect.height
|
||||||
|
LabelButton {
|
||||||
|
visible: !SettingsCpp.disableChatFeature
|
||||||
|
width: Utils.getSizeWithScreenRatio(56)
|
||||||
|
height: Utils.getSizeWithScreenRatio(56)
|
||||||
|
button.icon.width: Utils.getSizeWithScreenRatio(24)
|
||||||
|
button.icon.height: Utils.getSizeWithScreenRatio(24)
|
||||||
|
button.icon.source: AppIcons.videoconference
|
||||||
|
//: "Join"
|
||||||
|
label: qsTr("meeting_info_join_title")
|
||||||
|
button.onClicked: if (mainItem.conferenceInfo) {
|
||||||
|
var callsWindow = UtilsCpp.getOrCreateCallsWindow()
|
||||||
|
callsWindow.setupConference(mainItem.conferenceInfo)
|
||||||
|
UtilsCpp.smartShowWindow(callsWindow)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LabelButton {
|
||||||
|
visible: !SettingsCpp.disableChatFeature
|
||||||
|
button.checkable: true
|
||||||
|
width: Utils.getSizeWithScreenRatio(56)
|
||||||
|
height: Utils.getSizeWithScreenRatio(56)
|
||||||
|
button.icon.width: Utils.getSizeWithScreenRatio(24)
|
||||||
|
button.icon.height: Utils.getSizeWithScreenRatio(24)
|
||||||
|
button.icon.source: button.checked ? AppIcons.callList : AppIcons.chatTeardropText
|
||||||
|
label: button.checked
|
||||||
|
//: "Call history"
|
||||||
|
? qsTr("contact_call_history_action")
|
||||||
|
//: "Conversation"
|
||||||
|
: qsTr("contact_conversation_action")
|
||||||
|
button.onCheckedChanged: {
|
||||||
|
if (button.checked) mainItem.conferenceChatDisplayRequested()
|
||||||
|
else mainItem.conferenceCallHistoryDisplayRequested()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: Utils.getSizeWithScreenRatio(72)
|
spacing: Utils.getSizeWithScreenRatio(72)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ Item {
|
||||||
property bool shadowEnabled: false
|
property bool shadowEnabled: false
|
||||||
property bool isImageReady: false
|
property bool isImageReady: false
|
||||||
property bool retainWhileLoading: true
|
property bool retainWhileLoading: true
|
||||||
|
property alias status: image.status
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
visible: !effect2.effectEnabled
|
visible: !effect2.effectEnabled
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,20 @@ Quick.Text {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property double scaleLettersFactor: 1.
|
property double scaleLettersFactor: 1.
|
||||||
width: txtMeter.advanceWidth
|
width: txtMeter.advanceWidth
|
||||||
|
property alias tooltip: tooltip
|
||||||
|
property alias mouseArea: mouseArea
|
||||||
|
Quick.MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
hoverEnabled: true
|
||||||
|
onContainsMouseChanged: console.log("mouse area contains mouse", containsMouse)
|
||||||
|
}
|
||||||
|
ToolTip {
|
||||||
|
id: tooltip
|
||||||
|
visible: mainItem.visible && mouseArea.containsMouse && mainItem.truncated
|
||||||
|
text: mainItem.text
|
||||||
|
}
|
||||||
font {
|
font {
|
||||||
family: DefaultStyle.defaultFont
|
family: DefaultStyle.defaultFont
|
||||||
pixelSize: Utils.getSizeWithScreenRatio(10)
|
pixelSize: Utils.getSizeWithScreenRatio(10)
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,28 @@
|
||||||
import QtQuick
|
import QtQuick as Quick
|
||||||
import QtQuick.Controls.Basic as Control
|
import QtQuick.Controls.Basic as Control
|
||||||
import Linphone
|
import Linphone
|
||||||
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
|
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
|
||||||
|
|
||||||
Control.ToolTip {
|
Control.ToolTip {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
delay: 1000
|
delay: 800
|
||||||
clip: true
|
clip: true
|
||||||
background: Rectangle {
|
background: Quick.Rectangle {
|
||||||
id: tooltipBackground
|
id: tooltipBackground
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
radius: Utils.getSizeWithScreenRatio(15)
|
radius: Utils.getSizeWithScreenRatio(15)
|
||||||
}
|
}
|
||||||
contentItem: Text {
|
contentItem: Quick.Text {
|
||||||
text: mainItem.text
|
text: mainItem.text
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
width: tooltipBackground.width
|
width: tooltipBackground.width
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
font {
|
||||||
|
family: DefaultStyle.defaultFont
|
||||||
|
pixelSize: Utils.getSizeWithScreenRatio(10)
|
||||||
|
weight: Typography.p1.weight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ FocusScope {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Component.onCompleted: console.log(text, "width", width, "implicitWidth", implicitWidth, "advance", advance, contentWidth)
|
||||||
text: UtilsCpp.encodeEmojiToQmlRichFormat(mainItem.chat?.core.title) || ""
|
text: UtilsCpp.encodeEmojiToQmlRichFormat(mainItem.chat?.core.title) || ""
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
|
|
@ -166,6 +167,7 @@ FocusScope {
|
||||||
imageSource: AppIcons.bellSlash
|
imageSource: AppIcons.bellSlash
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Item{Layout.fillWidth: true}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: headerActionButtons
|
id: headerActionButtons
|
||||||
spacing: Utils.getSizeWithScreenRatio(16)
|
spacing: Utils.getSizeWithScreenRatio(16)
|
||||||
|
|
@ -211,12 +213,17 @@ FocusScope {
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
detailsPanel.visible = checked
|
detailsPanel.visible = checked
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: detailsPanel
|
||||||
|
function onVisibleChanged() {
|
||||||
|
if (!detailsPanel.visible) detailsPanelButton.checked = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: searchBarLayout
|
id: searchBarLayout
|
||||||
visible: searchInHistoryButton.checked
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if(!visible) chatMessagesSearchBar.clearText()
|
if(!visible) chatMessagesSearchBar.clearText()
|
||||||
else chatMessagesSearchBar.forceActiveFocus()
|
else chatMessagesSearchBar.forceActiveFocus()
|
||||||
|
|
@ -291,7 +298,14 @@ FocusScope {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
visible: !mainItem.chat?.core.isReadOnly
|
id: splitViewHandle
|
||||||
|
visible: !mainItem.chat?.core.isReadOnly || false
|
||||||
|
// Hack for keeping handle unvisible in call history chat
|
||||||
|
// (It somehow becomes visible when switching from call history to chat
|
||||||
|
// history even if chat is read only)
|
||||||
|
onVisibleChanged: {
|
||||||
|
visible = !mainItem.chat?.core.isReadOnly || false
|
||||||
|
}
|
||||||
enabled: visible
|
enabled: visible
|
||||||
implicitHeight: Utils.getSizeWithScreenRatio(8)
|
implicitHeight: Utils.getSizeWithScreenRatio(8)
|
||||||
color: Control.SplitHandle.hovered ? DefaultStyle.grey_200 : DefaultStyle.grey_100
|
color: Control.SplitHandle.hovered ? DefaultStyle.grey_200 : DefaultStyle.grey_100
|
||||||
|
|
@ -574,7 +588,7 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: detailsPanel.visible
|
visible: detailsPanel.visible && detailsPanel.width < mainItem.width
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
Layout.preferredWidth: Utils.getSizeWithScreenRatio(1)
|
Layout.preferredWidth: Utils.getSizeWithScreenRatio(1)
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -583,7 +597,7 @@ FocusScope {
|
||||||
id: detailsPanel
|
id: detailsPanel
|
||||||
visible: false
|
visible: false
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: Utils.getSizeWithScreenRatio(387)
|
Layout.preferredWidth: Math.min(Utils.getSizeWithScreenRatio(387), mainItem.width)
|
||||||
onVisibleChanged: if(!visible) {
|
onVisibleChanged: if(!visible) {
|
||||||
contentLoader.panelType = SelectedChatView.PanelType.None
|
contentLoader.panelType = SelectedChatView.PanelType.None
|
||||||
}
|
}
|
||||||
|
|
@ -591,6 +605,11 @@ FocusScope {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
RoundButton {
|
||||||
|
style: ButtonStyle.noBackgroundOrange
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
onClicked: detailsPanel.visible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Loader {
|
contentItem: Loader {
|
||||||
|
|
|
||||||
|
|
@ -192,8 +192,8 @@ ColumnLayout {
|
||||||
spacing: Utils.getSizeWithScreenRatio(10)
|
spacing: Utils.getSizeWithScreenRatio(10)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(30)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(30)
|
||||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(110)
|
Layout.preferredHeight: visible ? Utils.getSizeWithScreenRatio(110) : 0
|
||||||
Layout.minimumHeight: Utils.getSizeWithScreenRatio(110)
|
Layout.minimumHeight: visible ? Utils.getSizeWithScreenRatio(110) : 0
|
||||||
LabelButton {
|
LabelButton {
|
||||||
text.Layout.fillWidth: true
|
text.Layout.fillWidth: true
|
||||||
text.horizontalAlignment: Text.AlignHCenter
|
text.horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
|
||||||
|
|
@ -580,14 +580,18 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onConferenceChatDisplayRequested: detailContentStack.currentIndex = 1
|
||||||
|
onConferenceCallHistoryDisplayRequested: detailContentStack.currentIndex = 0
|
||||||
detailContent: Item {
|
detailContent: Item {
|
||||||
Layout.preferredWidth: Utils.getSizeWithScreenRatio(360)
|
Layout.preferredWidth: Utils.getSizeWithScreenRatio(360)
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
RoundedPane {
|
RoundedPane {
|
||||||
id: detailControl
|
id: detailControl
|
||||||
visible: detailListView.count > 0
|
visible: detailContentStack.currentIndex !== 0 || detailListView.count > 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Math.min(parent.height, detailListView.contentHeight) + topPadding + bottomPadding
|
height: detailContentStack.currentIndex === 0
|
||||||
|
? Math.min(parent.height, detailListView.contentHeight) + topPadding + bottomPadding
|
||||||
|
: parent.height
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: detailListBackground
|
id: detailListBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -595,92 +599,101 @@ AbstractMainPage {
|
||||||
radius: Utils.getSizeWithScreenRatio(15)
|
radius: Utils.getSizeWithScreenRatio(15)
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Control.ScrollView {
|
contentItem: StackLayout {
|
||||||
id: historyScrollView
|
id: detailContentStack
|
||||||
Control.ScrollBar.vertical: ScrollBar {
|
currentIndex: 0
|
||||||
id: historyScrollBar
|
Control.ScrollView {
|
||||||
visible: historyScrollView.contentHeight > historyScrollView.height
|
id: historyScrollView
|
||||||
anchors.top: parent.top
|
Control.ScrollBar.vertical: ScrollBar {
|
||||||
anchors.bottom: parent.bottom
|
id: historyScrollBar
|
||||||
anchors.right: parent.right
|
visible: historyScrollView.contentHeight > historyScrollView.height
|
||||||
}
|
anchors.top: parent.top
|
||||||
CallHistoryListView {
|
anchors.bottom: parent.bottom
|
||||||
id: detailListView
|
anchors.right: parent.right
|
||||||
Layout.fillWidth: true
|
}
|
||||||
Layout.fillHeight: true
|
CallHistoryListView {
|
||||||
Layout.rightMargin: historyScrollBar.width + Utils.getSizeWithScreenRatio(8)
|
id: detailListView
|
||||||
spacing: Utils.getSizeWithScreenRatio(14)
|
Layout.fillWidth: true
|
||||||
clip: true
|
Layout.fillHeight: true
|
||||||
searchText: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.remoteAddress : ""
|
Layout.rightMargin: historyScrollBar.width + Utils.getSizeWithScreenRatio(8)
|
||||||
busyIndicatorSize: Utils.getSizeWithScreenRatio(40)
|
spacing: Utils.getSizeWithScreenRatio(14)
|
||||||
|
clip: true
|
||||||
|
searchText: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.remoteAddress : ""
|
||||||
|
busyIndicatorSize: Utils.getSizeWithScreenRatio(40)
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: detailListView.width
|
width: detailListView.width
|
||||||
height: Utils.getSizeWithScreenRatio(56)
|
height: Utils.getSizeWithScreenRatio(56)
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: Utils.getSizeWithScreenRatio(20)
|
anchors.leftMargin: Utils.getSizeWithScreenRatio(20)
|
||||||
anchors.rightMargin: Utils.getSizeWithScreenRatio(20)
|
anchors.rightMargin: Utils.getSizeWithScreenRatio(20)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
RowLayout {
|
RowLayout {
|
||||||
EffectImage {
|
EffectImage {
|
||||||
id: statusIcon
|
id: statusIcon
|
||||||
imageSource: modelData.core.status
|
imageSource: modelData.core.status
|
||||||
=== LinphoneEnums.CallStatus.Declined
|
=== LinphoneEnums.CallStatus.Declined
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft
|
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft
|
||||||
colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted || modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500_main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500_main
|
colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted || modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500_main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500_main
|
||||||
Layout.preferredWidth: Utils.getSizeWithScreenRatio(16)
|
Layout.preferredWidth: Utils.getSizeWithScreenRatio(16)
|
||||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(16)
|
Layout.preferredHeight: Utils.getSizeWithScreenRatio(16)
|
||||||
transform: Rotation {
|
transform: Rotation {
|
||||||
angle: modelData.core.isOutgoing
|
angle: modelData.core.isOutgoing
|
||||||
&& (modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0
|
&& (modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0
|
||||||
origin {
|
origin {
|
||||||
x: statusIcon.width / 2
|
x: statusIcon.width / 2
|
||||||
y: statusIcon.height / 2
|
y: statusIcon.height / 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
//: "Appel manqué"
|
||||||
|
text: modelData.core.status === LinphoneEnums.CallStatus.Missed ? qsTr("notification_missed_call_title")
|
||||||
|
: modelData.core.isOutgoing
|
||||||
|
//: "Appel sortant"
|
||||||
|
? qsTr("call_outgoing")
|
||||||
|
//: "Appel entrant"
|
||||||
|
: qsTr("call_audio_incoming")
|
||||||
|
font {
|
||||||
|
pixelSize: Typography.p1.pixelSize
|
||||||
|
weight: Typography.p1.weight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
//: "Appel manqué"
|
text: UtilsCpp.formatDate(modelData.core.date)
|
||||||
text: modelData.core.status === LinphoneEnums.CallStatus.Missed ? qsTr("notification_missed_call_title")
|
color: modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500_main : DefaultStyle.main2_500_main
|
||||||
: modelData.core.isOutgoing
|
|
||||||
//: "Appel sortant"
|
|
||||||
? qsTr("call_outgoing")
|
|
||||||
//: "Appel entrant"
|
|
||||||
: qsTr("call_audio_incoming")
|
|
||||||
font {
|
font {
|
||||||
pixelSize: Typography.p1.pixelSize
|
pixelSize: Utils.getSizeWithScreenRatio(12)
|
||||||
weight: Typography.p1.weight
|
weight: Utils.getSizeWithScreenRatio(300)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
Text {
|
Text {
|
||||||
text: UtilsCpp.formatDate(modelData.core.date)
|
text: UtilsCpp.formatElapsedTime(
|
||||||
color: modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500_main : DefaultStyle.main2_500_main
|
modelData.core.duration,
|
||||||
|
false)
|
||||||
font {
|
font {
|
||||||
pixelSize: Utils.getSizeWithScreenRatio(12)
|
pixelSize: Utils.getSizeWithScreenRatio(12)
|
||||||
weight: Utils.getSizeWithScreenRatio(300)
|
weight: Utils.getSizeWithScreenRatio(300)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: UtilsCpp.formatElapsedTime(
|
|
||||||
modelData.core.duration,
|
|
||||||
false)
|
|
||||||
font {
|
|
||||||
pixelSize: Utils.getSizeWithScreenRatio(12)
|
|
||||||
weight: Utils.getSizeWithScreenRatio(300)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SelectedChatView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
chat: contactDetail.callHistoryGui.core.chatGui
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue