add share link button participant list
This commit is contained in:
parent
b834b7c669
commit
fd57221713
5 changed files with 169 additions and 92 deletions
|
|
@ -40,6 +40,12 @@ Window {
|
||||||
callObj = UtilsCpp.createCall(conferenceInfo.core.uri, withVideo)
|
callObj = UtilsCpp.createCall(conferenceInfo.core.uri, withVideo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: popupComp
|
||||||
|
InformationPopup{}
|
||||||
|
}
|
||||||
|
|
||||||
function showInformationPopup(title, description, isSuccess) {
|
function showInformationPopup(title, description, isSuccess) {
|
||||||
var infoPopup = popupComp.createObject(popupLayout, {"title": title, "description": description, "isSuccess": isSuccess})
|
var infoPopup = popupComp.createObject(popupLayout, {"title": title, "description": description, "isSuccess": isSuccess})
|
||||||
infoPopup.index = popupLayout.popupList.length
|
infoPopup.index = popupLayout.popupList.length
|
||||||
|
|
@ -47,6 +53,23 @@ Window {
|
||||||
infoPopup.open()
|
infoPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: popupLayout
|
||||||
|
anchors.fill: parent
|
||||||
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
property int nextY: mainWindow.height
|
||||||
|
property list<Popup> popupList
|
||||||
|
property int popupCount: popupList.length
|
||||||
|
spacing: 15
|
||||||
|
onPopupCountChanged: {
|
||||||
|
nextY = mainWindow.height
|
||||||
|
for(var i = 0; i < popupCount; ++i) {
|
||||||
|
popupList[i].y = nextY - popupList[i].height
|
||||||
|
nextY = nextY - popupList[i].height - 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeLayout(layoutIndex) {
|
function changeLayout(layoutIndex) {
|
||||||
if (layoutIndex == 0) {
|
if (layoutIndex == 0) {
|
||||||
console.log("Set Grid layout")
|
console.log("Set Grid layout")
|
||||||
|
|
@ -394,6 +417,7 @@ Window {
|
||||||
Layout.rightMargin: 10 * DefaultStyle.dp
|
Layout.rightMargin: 10 * DefaultStyle.dp
|
||||||
visible: false
|
visible: false
|
||||||
function replace(id) {
|
function replace(id) {
|
||||||
|
rightPanel.customHeaderButtons = null
|
||||||
contentStackView.replace(id, Control.StackView.Immediate)
|
contentStackView.replace(id, Control.StackView.Immediate)
|
||||||
}
|
}
|
||||||
headerStack.currentIndex: 0
|
headerStack.currentIndex: 0
|
||||||
|
|
@ -669,6 +693,33 @@ Window {
|
||||||
id: participantListComp
|
id: participantListComp
|
||||||
ParticipantListView {
|
ParticipantListView {
|
||||||
id: participantList
|
id: participantList
|
||||||
|
Component {
|
||||||
|
id: headerbutton
|
||||||
|
PopupButton {
|
||||||
|
popup.contentItem: Button {
|
||||||
|
background: Item{}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
EffectImage {
|
||||||
|
colorizationColor: DefaultStyle.main2_600
|
||||||
|
imageSource: AppIcons.shareNetwork
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: qsTr("Partager le lien de la réunion")
|
||||||
|
font.pixelSize: 14 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
UtilsCpp.copyToClipboard(mainWindow.conference.core.uri)
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Copié"), qsTr("Le lien de la réunion a été copié dans le presse-papier"), true, mainWindow)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Control.StackView.onActivated: {
|
||||||
|
rightPanel.customHeaderButtons = headerbutton.createObject(rightPanel)
|
||||||
|
}
|
||||||
call: mainWindow.call
|
call: mainWindow.call
|
||||||
onAddParticipantRequested: participantsStack.push(addParticipantComp)
|
onAddParticipantRequested: participantsStack.push(addParticipantComp)
|
||||||
onCountChanged: if (participantsStack.Control.StackView.status === Control.StackView.Active && participantsStack.currentItem == participantList) {
|
onCountChanged: if (participantsStack.Control.StackView.status === Control.StackView.Active && participantsStack.currentItem == participantList) {
|
||||||
|
|
@ -938,6 +989,25 @@ Window {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
CheckableButton {
|
||||||
|
visible: false
|
||||||
|
checkable: false
|
||||||
|
checkedColor: DefaultStyle.main2_400
|
||||||
|
iconUrl: AppIcons.handWaving
|
||||||
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
icon.width: 32 * DefaultStyle.dp
|
||||||
|
icon.height: 32 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
CheckableButton {
|
||||||
|
visible: false
|
||||||
|
iconUrl: AppIcons.smiley
|
||||||
|
checkedColor: DefaultStyle.main2_400
|
||||||
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
|
icon.width: 32 * DefaultStyle.dp
|
||||||
|
icon.height: 32 * DefaultStyle.dp
|
||||||
|
}
|
||||||
CheckableButton {
|
CheckableButton {
|
||||||
visible: mainWindow.conference
|
visible: mainWindow.conference
|
||||||
iconUrl: AppIcons.usersTwo
|
iconUrl: AppIcons.usersTwo
|
||||||
|
|
|
||||||
|
|
@ -33,105 +33,17 @@ ApplicationWindow {
|
||||||
mainWindowStackView.currentItem.transferCallSucceed()
|
mainWindowStackView.currentItem.transferCallSucceed()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: popupComp
|
||||||
|
InformationPopup{}
|
||||||
|
}
|
||||||
function showInformationPopup(title, description, isSuccess) {
|
function showInformationPopup(title, description, isSuccess) {
|
||||||
var infoPopup = popupComp.createObject(popupLayout, {"title": title, "description": description, "isSuccess": isSuccess})
|
var infoPopup = popupComp.createObject(popupLayout, {"title": title, "description": description, "isSuccess": isSuccess})
|
||||||
// informationPopup.title = title
|
|
||||||
// informationPopup.description = description
|
|
||||||
// informationPopup.isSuccess = isSuccess
|
|
||||||
// infoPopup.y = popupLayout.nextY - infoPopup.height
|
|
||||||
infoPopup.index = popupLayout.popupList.length
|
infoPopup.index = popupLayout.popupList.length
|
||||||
popupLayout.popupList.push(infoPopup)
|
popupLayout.popupList.push(infoPopup)
|
||||||
infoPopup.open()
|
infoPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: popupComp
|
|
||||||
Popup {
|
|
||||||
id: informationPopup
|
|
||||||
property bool isSuccess: true
|
|
||||||
property string title
|
|
||||||
property string description
|
|
||||||
property int index
|
|
||||||
onAboutToShow: {
|
|
||||||
autoClosePopup.restart()
|
|
||||||
}
|
|
||||||
onAboutToHide: {
|
|
||||||
popupLayout.popupList.splice(informationPopup.index, 1)
|
|
||||||
}
|
|
||||||
closePolicy: Popup.NoAutoClose
|
|
||||||
x : parent.x + parent.width - width
|
|
||||||
// y : parent.y + parent.height - height
|
|
||||||
rightMargin: 20 * DefaultStyle.dp
|
|
||||||
bottomMargin: 20 * DefaultStyle.dp
|
|
||||||
padding: 20 * DefaultStyle.dp
|
|
||||||
underlineColor: informationPopup.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
|
|
||||||
radius: 0
|
|
||||||
onHoveredChanged: {
|
|
||||||
if (hovered) autoClosePopup.stop()
|
|
||||||
else autoClosePopup.restart()
|
|
||||||
}
|
|
||||||
Timer {
|
|
||||||
id: autoClosePopup
|
|
||||||
interval: 5000
|
|
||||||
onTriggered: {
|
|
||||||
informationPopup.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
contentItem: RowLayout {
|
|
||||||
spacing: 15 * DefaultStyle.dp
|
|
||||||
EffectImage {
|
|
||||||
imageSource: informationPopup.isSuccess ? AppIcons.smiley : AppIcons.smileySad
|
|
||||||
colorizationColor: informationPopup.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
|
|
||||||
Layout.preferredWidth: 32 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
|
||||||
width: 32 * DefaultStyle.dp
|
|
||||||
height: 32 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
Layout.preferredWidth: 1 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: parent.height
|
|
||||||
color: DefaultStyle.main2_200
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Text {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: informationPopup.title
|
|
||||||
color: informationPopup.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
|
|
||||||
font {
|
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Layout.preferredWidth: 20 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 20 * DefaultStyle.dp
|
|
||||||
icon.width: 20 * DefaultStyle.dp
|
|
||||||
icon.height: 20 * DefaultStyle.dp
|
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignRight
|
|
||||||
visible: informationPopup.hovered || hovered
|
|
||||||
background: Item{}
|
|
||||||
icon.source: AppIcons.closeX
|
|
||||||
onClicked: informationPopup.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.maximumWidth: 300 * DefaultStyle.dp
|
|
||||||
text: informationPopup.description
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
color: DefaultStyle.main2_500main
|
|
||||||
font {
|
|
||||||
pixelSize: 12 * DefaultStyle.dp
|
|
||||||
weight: 300 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: popupLayout
|
id: popupLayout
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
view/Item/EffectImage.qml
|
view/Item/EffectImage.qml
|
||||||
view/Item/ErrorText.qml
|
view/Item/ErrorText.qml
|
||||||
view/Item/IconLabelButton.qml
|
view/Item/IconLabelButton.qml
|
||||||
|
view/Item/InformationPopup.qml
|
||||||
view/Item/MovableMouseArea.qml
|
view/Item/MovableMouseArea.qml
|
||||||
view/Item/NumericPad.qml
|
view/Item/NumericPad.qml
|
||||||
view/Item/PhoneNumberComboBox.qml
|
view/Item/PhoneNumberComboBox.qml
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ Control.Page {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property alias headerStack: headerStack
|
property alias headerStack: headerStack
|
||||||
property alias contentStackView: contentStackView
|
property alias contentStackView: contentStackView
|
||||||
|
property alias customHeaderButtons: customButtonLayout.children
|
||||||
property bool closeButtonVisible: true
|
property bool closeButtonVisible: true
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
@ -62,6 +63,9 @@ Control.Page {
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RowLayout {
|
||||||
|
id: customButtonLayout
|
||||||
|
}
|
||||||
Button {
|
Button {
|
||||||
id: closeButton
|
id: closeButton
|
||||||
visible: mainItem.closeButtonVisible
|
visible: mainItem.closeButtonVisible
|
||||||
|
|
|
||||||
90
Linphone/view/Item/InformationPopup.qml
Normal file
90
Linphone/view/Item/InformationPopup.qml
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Linphone
|
||||||
|
|
||||||
|
Popup {
|
||||||
|
id: mainItem
|
||||||
|
property bool isSuccess: true
|
||||||
|
property string title
|
||||||
|
property string description
|
||||||
|
property int index
|
||||||
|
onAboutToShow: {
|
||||||
|
autoClosePopup.restart()
|
||||||
|
}
|
||||||
|
onAboutToHide: {
|
||||||
|
popupLayout.popupList.splice(mainItem.index, 1)
|
||||||
|
}
|
||||||
|
closePolicy: Popup.NoAutoClose
|
||||||
|
x : parent.x + parent.width - width
|
||||||
|
// y : parent.y + parent.height - height
|
||||||
|
rightMargin: 20 * DefaultStyle.dp
|
||||||
|
bottomMargin: 20 * DefaultStyle.dp
|
||||||
|
padding: 20 * DefaultStyle.dp
|
||||||
|
underlineColor: mainItem.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
|
||||||
|
radius: 0
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) autoClosePopup.stop()
|
||||||
|
else autoClosePopup.restart()
|
||||||
|
}
|
||||||
|
Timer {
|
||||||
|
id: autoClosePopup
|
||||||
|
interval: 5000
|
||||||
|
onTriggered: {
|
||||||
|
mainItem.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: RowLayout {
|
||||||
|
spacing: 15 * DefaultStyle.dp
|
||||||
|
EffectImage {
|
||||||
|
imageSource: mainItem.isSuccess ? AppIcons.smiley : AppIcons.smileySad
|
||||||
|
colorizationColor: mainItem.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
|
||||||
|
Layout.preferredWidth: 32 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
width: 32 * DefaultStyle.dp
|
||||||
|
height: 32 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
Layout.preferredWidth: 1 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
color: DefaultStyle.main2_200
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: mainItem.title
|
||||||
|
color: mainItem.isSuccess ? DefaultStyle.success_500main : DefaultStyle.danger_500main
|
||||||
|
font {
|
||||||
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.preferredWidth: 20 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 20 * DefaultStyle.dp
|
||||||
|
icon.width: 20 * DefaultStyle.dp
|
||||||
|
icon.height: 20 * DefaultStyle.dp
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignRight
|
||||||
|
visible: mainItem.hovered || hovered
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.closeX
|
||||||
|
onClicked: mainItem.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.maximumWidth: 300 * DefaultStyle.dp
|
||||||
|
text: mainItem.description
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
font {
|
||||||
|
pixelSize: 12 * DefaultStyle.dp
|
||||||
|
weight: 300 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue