Fix layouts : call, meeting, contact
Custom scrollbar. Mute on call.
This commit is contained in:
parent
22b3e80717
commit
8eb0e5cff9
13 changed files with 783 additions and 616 deletions
|
|
@ -427,8 +427,6 @@ Window {
|
||||||
id: contactsListPanel
|
id: contactsListPanel
|
||||||
CallContactsLists {
|
CallContactsLists {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transfert d'appel")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transfert d'appel")
|
||||||
sideMargin: 10 * DefaultStyle.dp
|
|
||||||
topMargin: 15 * DefaultStyle.dp
|
|
||||||
groupCallVisible: false
|
groupCallVisible: false
|
||||||
searchBarColor: DefaultStyle.grey_0
|
searchBarColor: DefaultStyle.grey_0
|
||||||
searchBarBorderColor: DefaultStyle.grey_200
|
searchBarBorderColor: DefaultStyle.grey_200
|
||||||
|
|
@ -745,28 +743,27 @@ Window {
|
||||||
id: addParticipantComp
|
id: addParticipantComp
|
||||||
AddParticipantsLayout {
|
AddParticipantsLayout {
|
||||||
id: addParticipantLayout
|
id: addParticipantLayout
|
||||||
titleLayout.visible: false
|
|
||||||
onSelectedParticipantsCountChanged: {
|
onSelectedParticipantsCountChanged: {
|
||||||
if (participantsStack.Control.StackView.status === Control.StackView.Active && Control.StackView.visible) {
|
if (participantsStack.Control.StackView.status === Control.StackView.Active && Control.StackView.visible) {
|
||||||
rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné").arg(selectedParticipants.length).arg(selectedParticipants.length > 1 ? "s" : "")
|
rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné").arg(selectedParticipants.length).arg(selectedParticipants.length > 1 ? "s" : "")
|
||||||
}
|
}
|
||||||
participantsStack.selectedParticipants = selectedParticipants
|
participantsStack.selectedParticipants = selectedParticipants
|
||||||
}
|
}
|
||||||
onValidateRequested: {
|
|
||||||
conferenceInfoGui.core.resetParticipants(contactList.selectedContacts)
|
|
||||||
returnRequested()
|
|
||||||
}
|
|
||||||
Connections {
|
Connections {
|
||||||
target: participantsStack
|
target: participantsStack
|
||||||
onCurrentItemChanged: {
|
onCurrentItemChanged: {
|
||||||
if (participantsStack.currentItem == addParticipantLayout) {
|
if (participantsStack.currentItem == addParticipantLayout) {
|
||||||
rightPanel.headerTitleText = qsTr("Ajouter des participants")
|
rightPanel.headerTitleText = qsTr("Ajouter des participants")
|
||||||
rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné").arg(addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length > 1 ? "s" : "")
|
rightPanel.headerSubtitleText = qsTr("%1 participant%2 sélectionné%2").arg(addParticipantLayout.selectedParticipants.length).arg(addParticipantLayout.selectedParticipants.length > 1 ? "s" : "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onParticipantAdded: {
|
onParticipantAdded: {
|
||||||
addParticipantLayout.clearSelectedParticipants()
|
addParticipantLayout.clearSelectedParticipants()
|
||||||
}
|
}
|
||||||
|
onValidateRequested: {
|
||||||
|
conferenceInfoGui.core.resetParticipants(contactList.selectedContacts)
|
||||||
|
returnRequested()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1115,6 +1112,27 @@ Window {
|
||||||
else mainWindow.call.core.lStartRecording()
|
else mainWindow.call.core.lStartRecording()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MenuButton {
|
||||||
|
checkable: true
|
||||||
|
icon.source: mainWindow.call.core.speakerMuted ? AppIcons.speakerSlash : AppIcons.speaker
|
||||||
|
icon.width: 32 * DefaultStyle.dp
|
||||||
|
icon.height: 32 * DefaultStyle.dp
|
||||||
|
contentImageColor: down
|
||||||
|
? DefaultStyle.main1_500_main
|
||||||
|
: mainWindow.call && mainWindow.call.core.speakerMuted
|
||||||
|
? DefaultStyle.danger_500main
|
||||||
|
: DefaultStyle.main2_500main
|
||||||
|
text: mainWindow.call && mainWindow.call.core.speakerMuted ? qsTr("Activer le son") : qsTr("Désactiver le son")
|
||||||
|
textColor: down
|
||||||
|
? DefaultStyle.main1_500_main
|
||||||
|
:mainWindow.call && mainWindow.call.core.speakerMuted
|
||||||
|
? DefaultStyle.danger_500main
|
||||||
|
: DefaultStyle.main2_500main
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (mainWindow.call) mainWindow.call.core.lSetSpeakerMuted(!mainWindow.call.core.speakerMuted)
|
||||||
|
}
|
||||||
|
}
|
||||||
MenuButton {
|
MenuButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
icon.source: AppIcons.settings
|
icon.source: AppIcons.settings
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ Item {
|
||||||
shadowOpacity: 0.1
|
shadowOpacity: 0.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Control.ScrollBar {
|
ScrollBar {
|
||||||
id: scrollbar
|
id: scrollbar
|
||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.right: listPopup.right
|
anchors.right: listPopup.right
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
view/Item/RadioButton.qml
|
view/Item/RadioButton.qml
|
||||||
view/Item/RectangleTest.qml
|
view/Item/RectangleTest.qml
|
||||||
view/Item/RoundedBackgroundControl.qml
|
view/Item/RoundedBackgroundControl.qml
|
||||||
|
view/Item/ScrollBar.qml
|
||||||
view/Item/SearchBar.qml
|
view/Item/SearchBar.qml
|
||||||
view/Item/Slider.qml
|
view/Item/Slider.qml
|
||||||
view/Item/Switch.qml
|
view/Item/Switch.qml
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,12 @@ import UtilsCpp 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property int sideMargin: 25 * DefaultStyle.dp
|
|
||||||
property int topMargin: 5 * DefaultStyle.dp
|
|
||||||
property bool groupCallVisible
|
property bool groupCallVisible
|
||||||
property color searchBarColor: DefaultStyle.grey_100
|
property color searchBarColor: DefaultStyle.grey_100
|
||||||
property color searchBarBorderColor: "transparent"
|
property color searchBarBorderColor: "transparent"
|
||||||
signal callButtonPressed(string address)
|
signal callButtonPressed(string address)
|
||||||
signal groupCallCreationRequested()
|
signal groupCallCreationRequested()
|
||||||
|
property NumericPad numPad
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
|
|
@ -25,7 +24,7 @@ Item {
|
||||||
}
|
}
|
||||||
underlineColor: DefaultStyle.main1_500_main
|
underlineColor: DefaultStyle.main1_500_main
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - 30 * DefaultStyle.dp
|
width: parent.width
|
||||||
modal: true
|
modal: true
|
||||||
leftPadding: 15 * DefaultStyle.dp
|
leftPadding: 15 * DefaultStyle.dp
|
||||||
rightPadding: 15 * DefaultStyle.dp
|
rightPadding: 15 * DefaultStyle.dp
|
||||||
|
|
@ -41,9 +40,7 @@ Item {
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item{Layout.fillWidth: true}
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Button {
|
Button {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
|
@ -110,24 +107,9 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Control.ScrollBar {
|
|
||||||
id: contactsScrollbar
|
|
||||||
active: true
|
|
||||||
interactive: true
|
|
||||||
policy: Control.ScrollBar.AsNeeded
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
// x: mainItem.x + mainItem.width - width
|
|
||||||
// anchors.left: control.right
|
|
||||||
}
|
|
||||||
|
|
||||||
Control.Control {
|
Control.Control {
|
||||||
id: listLayout
|
id: listLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: mainItem.topMargin
|
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
@ -139,23 +121,31 @@ Item {
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumWidth: mainItem.width
|
Layout.maximumWidth: mainItem.width
|
||||||
Layout.leftMargin: mainItem.sideMargin
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
Layout.rightMargin: mainItem.sideMargin
|
|
||||||
color: mainItem.searchBarColor
|
color: mainItem.searchBarColor
|
||||||
borderColor: mainItem.searchBarBorderColor
|
borderColor: mainItem.searchBarBorderColor
|
||||||
placeholderText: qsTr("Rechercher un contact")
|
placeholderText: qsTr("Rechercher un contact")
|
||||||
numericPad: numPad
|
numericPad: mainItem.numPad
|
||||||
}
|
}
|
||||||
Control.ScrollView {
|
Control.ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.leftMargin: mainItem.sideMargin
|
|
||||||
Layout.topMargin: 25 * DefaultStyle.dp
|
Layout.topMargin: 25 * DefaultStyle.dp
|
||||||
rightPadding: mainItem.sideMargin
|
contentWidth: width
|
||||||
contentWidth: width - mainItem.sideMargin
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
clip: true
|
||||||
Control.ScrollBar.vertical: contactsScrollbar
|
Control.ScrollBar.vertical: ScrollBar {
|
||||||
|
active: true
|
||||||
|
interactive: true
|
||||||
|
policy: Control.ScrollBar.AsNeeded
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 8 * DefaultStyle.dp
|
||||||
|
// x: mainItem.x + mainItem.width - width
|
||||||
|
// anchors.left: control.right
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
@ -241,6 +231,7 @@ Item {
|
||||||
id: contactList
|
id: contactList
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
|
Control.ScrollBar.vertical.visible: false
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
||||||
|
|
@ -248,7 +239,7 @@ Item {
|
||||||
onSelectedContactChanged: {
|
onSelectedContactChanged: {
|
||||||
if (selectedContact) {
|
if (selectedContact) {
|
||||||
if (selectedContact.core.allAddresses.length > 1) {
|
if (selectedContact.core.allAddresses.length > 1) {
|
||||||
startCallPopup.selectedContact = selectedContact
|
startCallPopup.contact = selectedContact
|
||||||
startCallPopup.open()
|
startCallPopup.open()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -279,6 +270,7 @@ Item {
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Control.ScrollBar.vertical.visible: false
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
initialHeadersVisible: false
|
initialHeadersVisible: false
|
||||||
displayNameCapitalization: false
|
displayNameCapitalization: false
|
||||||
|
|
@ -290,7 +282,7 @@ Item {
|
||||||
onSelectedContactChanged: {
|
onSelectedContactChanged: {
|
||||||
if (selectedContact) {
|
if (selectedContact) {
|
||||||
if (selectedContact.core.allAddresses.length > 1) {
|
if (selectedContact.core.allAddresses.length > 1) {
|
||||||
startCallPopup.selectedContact = selectedContact
|
startCallPopup.contact = selectedContact
|
||||||
startCallPopup.open()
|
startCallPopup.open()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -326,19 +318,4 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: numPad.implicitHeight
|
|
||||||
NumericPad {
|
|
||||||
id: numPad
|
|
||||||
width: parent.width
|
|
||||||
onLaunchCall: {
|
|
||||||
UtilsCpp.createCall(searchBar.text + "@sip.linphone.org")
|
|
||||||
// TODO : auto completion instead of sip linphone
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Controls as Control
|
||||||
|
|
||||||
import Linphone
|
import Linphone
|
||||||
import UtilsCpp 1.0
|
import UtilsCpp 1.0
|
||||||
|
|
@ -9,7 +10,7 @@ ListView {
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
visible: contentHeight > 0
|
visible: contentHeight > 0
|
||||||
clip: true
|
clip: true
|
||||||
rightMargin: 5 * DefaultStyle.dp
|
// rightMargin: 5 * DefaultStyle.dp
|
||||||
|
|
||||||
property string searchBarText
|
property string searchBarText
|
||||||
|
|
||||||
|
|
@ -67,11 +68,19 @@ ListView {
|
||||||
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Control.ScrollBar.vertical: ScrollBar {
|
||||||
|
id: scrollbar
|
||||||
|
active: true
|
||||||
|
interactive: true
|
||||||
|
// anchors.top: parent.top
|
||||||
|
// anchors.bottom: parent.bottom
|
||||||
|
// anchors.right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
id: itemDelegate
|
id: itemDelegate
|
||||||
height: display ? 56 * DefaultStyle.dp : 0
|
height: display ? 56 * DefaultStyle.dp : 0
|
||||||
width: mainItem.width
|
width: mainItem.width - scrollbar.width - 12 * DefaultStyle.dp
|
||||||
property var previousItem : mainItem.model.count > 0 && index > 0 ? mainItem.model.getAt(index-1) : null
|
property var previousItem : mainItem.model.count > 0 && index > 0 ? mainItem.model.getAt(index-1) : null
|
||||||
property var previousDisplayName: previousItem ? previousItem.core.displayName : ""
|
property var previousDisplayName: previousItem ? previousItem.core.displayName : ""
|
||||||
property var displayName: modelData.core.displayName
|
property var displayName: modelData.core.displayName
|
||||||
|
|
@ -103,7 +112,7 @@ ListView {
|
||||||
anchors.left: initial.visible ? initial.right : parent.left
|
anchors.left: initial.visible ? initial.right : parent.left
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp
|
anchors.leftMargin: 10 * DefaultStyle.dp
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
// anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
z: 1
|
z: 1
|
||||||
|
|
@ -141,7 +150,7 @@ ListView {
|
||||||
// visible: mainItem.actionLayoutVisible || friendPopup.visible
|
// visible: mainItem.actionLayoutVisible || friendPopup.visible
|
||||||
// anchors.fill: parent
|
// anchors.fill: parent
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp
|
// anchors.rightMargin: 10 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
RowLayout{
|
RowLayout{
|
||||||
visible: mainItem.actionLayoutVisible
|
visible: mainItem.actionLayoutVisible
|
||||||
|
|
|
||||||
|
|
@ -31,58 +31,6 @@ ColumnLayout {
|
||||||
startDate.calendar.selectedDate = mainItem.conferenceInfoGui.core.dateTime
|
startDate.calendar.selectedDate = mainItem.conferenceInfoGui.core.dateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Button {
|
|
||||||
background: Item{}
|
|
||||||
icon.source: AppIcons.leftArrow
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
icon.width: 24 * DefaultStyle.dp
|
|
||||||
icon.height: 24 * DefaultStyle.dp
|
|
||||||
onClicked: mainItem.returnRequested()
|
|
||||||
}
|
|
||||||
TextInput {
|
|
||||||
visible: !mainItem.isCreation
|
|
||||||
Component.onCompleted: text = conferenceInfoGui.core.subject
|
|
||||||
color: DefaultStyle.main2_600
|
|
||||||
font {
|
|
||||||
pixelSize: 20 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Layout.fillWidth: true
|
|
||||||
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
|
||||||
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
visible: mainItem.isCreation
|
|
||||||
text: qsTr("Nouvelle réunion")
|
|
||||||
color: DefaultStyle.main2_700
|
|
||||||
font {
|
|
||||||
pixelSize: 22 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
topPadding: 6 * DefaultStyle.dp
|
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
|
||||||
leftPadding: 12 * DefaultStyle.dp
|
|
||||||
rightPadding: 12 * DefaultStyle.dp
|
|
||||||
text: mainItem.isCreation ? qsTr("Créer") : qsTr("Save")
|
|
||||||
textSize: 13 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
if (mainItem.conferenceInfoGui.core.subject.length === 0) {
|
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
|
||||||
} else if (mainItem.conferenceInfoGui.core.duration <= 0) {
|
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
|
||||||
} else if (mainItem.conferenceInfoGui.core.participantCount === 0) {
|
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
|
|
||||||
} else {
|
|
||||||
mainItem.conferenceInfoGui.core.save()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
component CheckableButton: Button {
|
component CheckableButton: Button {
|
||||||
id: checkableButton
|
id: checkableButton
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
@ -115,8 +63,8 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
Layout.bottomMargin: 20 * DefaultStyle.dp
|
Layout.bottomMargin: 20 * DefaultStyle.dp
|
||||||
Layout.alignment: Qt.AlignHCenter
|
// Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: 20 * DefaultStyle.dp
|
spacing: 18 * DefaultStyle.dp
|
||||||
CheckableButton {
|
CheckableButton {
|
||||||
Layout.preferredWidth: 151 * DefaultStyle.dp
|
Layout.preferredWidth: 151 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.usersThree
|
icon.source: AppIcons.usersThree
|
||||||
|
|
|
||||||
|
|
@ -5,17 +5,17 @@ import QtQuick.Effects
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
Control.Popup {
|
Control.Popup {
|
||||||
clip: true
|
|
||||||
id: mainItem
|
id: mainItem
|
||||||
signal buttonPressed(string text)
|
signal buttonPressed(string text)
|
||||||
signal launchCall()
|
signal launchCall()
|
||||||
signal wipe()
|
signal wipe()
|
||||||
property bool closeButtonVisible: true
|
property bool closeButtonVisible: true
|
||||||
closePolicy: Control.Popup.CloseOnEscape
|
closePolicy: Control.Popup.CloseOnEscape
|
||||||
leftPadding: closeButton.width
|
leftPadding: 72 * DefaultStyle.dp
|
||||||
rightPadding: closeButton.width
|
rightPadding: 72 * DefaultStyle.dp
|
||||||
rightInset: closeButton.width
|
topPadding: 41 * DefaultStyle.dp
|
||||||
topPadding: closeButton.height
|
bottomPadding: 18 * DefaultStyle.dp
|
||||||
|
// topPadding: closeButton.height + 4 * DefaultStyle.dp
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -24,16 +24,15 @@ Control.Popup {
|
||||||
color: DefaultStyle.grey_100
|
color: DefaultStyle.grey_100
|
||||||
radius: 20 * DefaultStyle.dp
|
radius: 20 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
// MultiEffect {
|
MultiEffect {
|
||||||
// id: effect
|
id: effect
|
||||||
// anchors.fill: parent
|
anchors.fill: parent
|
||||||
// source: numPadBackground
|
source: numPadBackground
|
||||||
// shadowEnabled: true
|
shadowEnabled: true
|
||||||
// shadowColor: DefaultStyle.grey_1000
|
shadowColor: DefaultStyle.grey_1000
|
||||||
// shadowOpacity: 0.1
|
shadowOpacity: 0.1
|
||||||
// shadowVerticalOffset: -200 * DefaultStyle.dp
|
shadowBlur: 1
|
||||||
// shadowBlur: 1
|
}
|
||||||
// }
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height / 2
|
height: parent.height / 2
|
||||||
|
|
@ -61,9 +60,8 @@ Control.Popup {
|
||||||
}
|
}
|
||||||
contentItem: Layout.GridLayout {
|
contentItem: Layout.GridLayout {
|
||||||
columns: 3
|
columns: 3
|
||||||
columnSpacing: 3
|
columnSpacing: 40 * DefaultStyle.dp
|
||||||
Layout.Layout.fillWidth: true
|
rowSpacing: 10 * DefaultStyle.dp
|
||||||
Layout.Layout.fillHeight: true
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: 9
|
model: 9
|
||||||
Button {
|
Button {
|
||||||
|
|
|
||||||
16
Linphone/view/Item/ScrollBar.qml
Normal file
16
Linphone/view/Item/ScrollBar.qml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.2 as Control
|
||||||
|
import QtQuick.Effects
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Linphone
|
||||||
|
|
||||||
|
Control.ScrollBar {
|
||||||
|
id: mainItem
|
||||||
|
padding: 0
|
||||||
|
background: Item{}
|
||||||
|
contentItem: Rectangle {
|
||||||
|
implicitWidth: 6
|
||||||
|
radius: 32 * DefaultStyle.dp
|
||||||
|
color: "#D9D9D9"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,7 @@ import Linphone
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property string placeholderText: ""
|
property string placeholderText: ""
|
||||||
|
property color placeholderTextColor: DefaultStyle.main2_400
|
||||||
property int textInputWidth: 350 * DefaultStyle.dp
|
property int textInputWidth: 350 * DefaultStyle.dp
|
||||||
property color borderColor: "transparent"
|
property color borderColor: "transparent"
|
||||||
property string text: textField.text
|
property string text: textField.text
|
||||||
|
|
@ -52,6 +53,7 @@ Rectangle {
|
||||||
anchors.right: clearTextButton.left
|
anchors.right: clearTextButton.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
placeholderText: mainItem.placeholderText
|
placeholderText: mainItem.placeholderText
|
||||||
|
placeholderTextColor: mainItem.placeholderTextColor
|
||||||
width: mainItem.width - dialerButton.width
|
width: mainItem.width - dialerButton.width
|
||||||
echoMode: (mainItem.hidden && !dialerButton.checked) ? TextInput.Password : TextInput.Normal
|
echoMode: (mainItem.hidden && !dialerButton.checked) ? TextInput.Password : TextInput.Normal
|
||||||
font {
|
font {
|
||||||
|
|
|
||||||
|
|
@ -7,78 +7,22 @@ import UtilsCpp 1.0
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
spacing: 10 * DefaultStyle.dp
|
|
||||||
property string title
|
|
||||||
property string validateButtonText
|
|
||||||
property string placeHolderText: qsTr("Rechercher des contacts")
|
property string placeHolderText: qsTr("Rechercher des contacts")
|
||||||
property color titleColor: DefaultStyle.main2_700
|
|
||||||
property list<string> selectedParticipants: contactList.selectedContacts
|
property list<string> selectedParticipants: contactList.selectedContacts
|
||||||
property int selectedParticipantsCount: selectedParticipants.length
|
property int selectedParticipantsCount: selectedParticipants.length
|
||||||
property alias titleLayout: titleLayout
|
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
property bool nameGroupCall: false
|
property bool nameGroupCall: false
|
||||||
readonly property string groupName: groupCallName.text
|
readonly property string groupName: groupCallName.text
|
||||||
signal returnRequested()
|
|
||||||
signal validateRequested()
|
|
||||||
// Layout.preferredWidth: 362 * DefaultStyle.dp
|
// Layout.preferredWidth: 362 * DefaultStyle.dp
|
||||||
|
|
||||||
function clearSelectedParticipants() {
|
function clearSelectedParticipants() {
|
||||||
contactList.selectedContacts.clear()
|
contactList.selectedContacts.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: titleLayout
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Button {
|
|
||||||
background: Item{}
|
|
||||||
icon.source: AppIcons.leftArrow
|
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
icon.width: 24 * DefaultStyle.dp
|
|
||||||
icon.height: 24 * DefaultStyle.dp
|
|
||||||
onClicked: mainItem.returnRequested()
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
Text {
|
|
||||||
text: mainItem.title
|
|
||||||
color: mainItem.titleColor
|
|
||||||
maximumLineCount: 1
|
|
||||||
font {
|
|
||||||
pixelSize: 18 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
text: qsTr("%1 participant%2 sélectionné").arg(mainItem.selectedParticipantsCount).arg(mainItem.selectedParticipantsCount > 1 ? "s" : "")
|
|
||||||
color: DefaultStyle.main2_500main
|
|
||||||
maximumLineCount: 1
|
|
||||||
font {
|
|
||||||
pixelSize: 12 * DefaultStyle.dp
|
|
||||||
weight: 300 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Layout.preferredWidth: 70 * DefaultStyle.dp
|
|
||||||
topPadding: 6 * DefaultStyle.dp
|
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
|
||||||
enabled: contactList.selectedContacts.length != 0
|
|
||||||
// leftPadding: 12 * DefaultStyle.dp
|
|
||||||
// rightPadding: 12 * DefaultStyle.dp
|
|
||||||
text: mainItem.validateButtonText
|
|
||||||
textSize: 13 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
mainItem.validateRequested()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: mainItem.nameGroupCall
|
visible: mainItem.nameGroupCall
|
||||||
spacing: 0
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
Layout.rightMargin: 38 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Text {
|
Text {
|
||||||
font.pixelSize: 13 * DefaultStyle.dp
|
font.pixelSize: 13 * DefaultStyle.dp
|
||||||
|
|
@ -101,7 +45,7 @@ ColumnLayout {
|
||||||
ListView {
|
ListView {
|
||||||
id: participantList
|
id: participantList
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
// Layout.fillHeight: true
|
Layout.topMargin: 15 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
Layout.maximumHeight: mainItem.height / 3
|
Layout.maximumHeight: mainItem.height / 3
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
|
|
@ -109,7 +53,7 @@ ColumnLayout {
|
||||||
clip: true
|
clip: true
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
height: 56 * DefaultStyle.dp
|
height: 56 * DefaultStyle.dp
|
||||||
width: participantList.width
|
width: participantList.width - scrollbar.implicitWidth - 12 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Avatar {
|
Avatar {
|
||||||
|
|
@ -138,13 +82,26 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Control.ScrollBar.vertical: ScrollBar {
|
||||||
|
id: scrollbar
|
||||||
|
active: true
|
||||||
|
interactive: true
|
||||||
|
policy: Control.ScrollBar.AsNeeded
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 8 * DefaultStyle.dp
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SearchBar {
|
SearchBar {
|
||||||
id: searchbar
|
id: searchbar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 21 * DefaultStyle.dp
|
||||||
|
Layout.rightMargin: 28 * DefaultStyle.dp
|
||||||
placeholderText: mainItem.placeHolderText
|
placeholderText: mainItem.placeHolderText
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
Layout.topMargin: 21 * DefaultStyle.dp
|
||||||
text: qsTr("Contacts")
|
text: qsTr("Contacts")
|
||||||
font {
|
font {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
|
@ -156,6 +113,8 @@ ColumnLayout {
|
||||||
visible: contentHeight > 0 || searchbar.text.length > 0
|
visible: contentHeight > 0 || searchbar.text.length > 0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: 8 * DefaultStyle.dp
|
||||||
|
Layout.rightMargin: 8 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
multiSelectionEnabled: true
|
multiSelectionEnabled: true
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
|
|
@ -188,6 +147,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ AbstractMainPage {
|
||||||
property var selectedRowHistoryGui
|
property var selectedRowHistoryGui
|
||||||
signal listViewUpdated()
|
signal listViewUpdated()
|
||||||
|
|
||||||
|
//Group call properties
|
||||||
property ConferenceInfoGui confInfoGui
|
property ConferenceInfoGui confInfoGui
|
||||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||||
property AccountGui account: accountProxy.defaultAccount
|
property AccountGui account: accountProxy.defaultAccount
|
||||||
|
|
@ -21,6 +22,8 @@ AbstractMainPage {
|
||||||
onStateChanged: console.log(state)
|
onStateChanged: console.log(state)
|
||||||
property bool isRegistered: account ? account.core.registrationState == LinphoneEnums.RegistrationState.Ok : false
|
property bool isRegistered: account ? account.core.registrationState == LinphoneEnums.RegistrationState.Ok : false
|
||||||
onIsRegisteredChanged: console.log(isRegistered)
|
onIsRegisteredChanged: console.log(isRegistered)
|
||||||
|
property int selectedParticipantsCount
|
||||||
|
signal startGroupCallRequested()
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
enabled: confInfoGui
|
enabled: confInfoGui
|
||||||
|
|
@ -62,366 +65,438 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: titleLoader
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: listStackView
|
id: listStackView
|
||||||
clip: true
|
clip: true
|
||||||
initialItem: historyListItem
|
initialItem: historyListItem
|
||||||
anchors.fill: parent
|
anchors.top: titleLoader.bottom
|
||||||
property int leftMargin: 45 * DefaultStyle.dp
|
anchors.topMargin: 18 * DefaultStyle.dp
|
||||||
property int rightMargin: 39 * DefaultStyle.dp
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.leftMargin: 45 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Item {
|
||||||
id: historyListItem
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: 402 * DefaultStyle.dp
|
||||||
|
NumericPad {
|
||||||
|
id: numericPad
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
onLaunchCall: {
|
||||||
|
UtilsCpp.createCall(searchBar.text + "@sip.linphone.org")
|
||||||
|
// TODO : auto completion instead of sip linphone
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
Component {
|
||||||
spacing: 30 * DefaultStyle.dp
|
id: historyListTitle
|
||||||
property alias listView: historyListView
|
RowLayout {
|
||||||
RowLayout {
|
spacing: 16 * DefaultStyle.dp
|
||||||
spacing: 16 * DefaultStyle.dp
|
Text {
|
||||||
Layout.fillWidth: true
|
text: qsTr("Appels")
|
||||||
Layout.leftMargin: listStackView.leftMargin
|
Layout.leftMargin: 45 * DefaultStyle.dp
|
||||||
Layout.rightMargin: listStackView.rightMargin
|
color: DefaultStyle.main2_700
|
||||||
Text {
|
font.pixelSize: 29 * DefaultStyle.dp
|
||||||
text: qsTr("Appels")
|
font.weight: 800 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_700
|
}
|
||||||
font.pixelSize: 29 * DefaultStyle.dp
|
Item {
|
||||||
font.weight: 800 * DefaultStyle.dp
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Item {
|
PopupButton {
|
||||||
Layout.fillWidth: true
|
id: removeHistory
|
||||||
}
|
width: 24 * DefaultStyle.dp
|
||||||
PopupButton {
|
height: 24 * DefaultStyle.dp
|
||||||
id: removeHistory
|
popup.x: 0
|
||||||
width: 24 * DefaultStyle.dp
|
popup.padding: 10 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
popup.contentItem: Button {
|
||||||
popup.x: 0
|
background: Item{}
|
||||||
popup.padding: 10 * DefaultStyle.dp
|
contentItem: RowLayout {
|
||||||
popup.contentItem: Button {
|
EffectImage {
|
||||||
background: Item{}
|
imageSource: AppIcons.trashCan
|
||||||
contentItem: RowLayout {
|
width: 24 * DefaultStyle.dp
|
||||||
EffectImage {
|
height: 24 * DefaultStyle.dp
|
||||||
imageSource: AppIcons.trashCan
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
width: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
fillMode: Image.PreserveAspectFit
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
colorizationColor: DefaultStyle.danger_500main
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
}
|
||||||
fillMode: Image.PreserveAspectFit
|
Text {
|
||||||
colorizationColor: DefaultStyle.danger_500main
|
text: qsTr("Supprimer l’historique")
|
||||||
}
|
color: DefaultStyle.danger_500main
|
||||||
Text {
|
font {
|
||||||
text: qsTr("Supprimer l’historique")
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
color: DefaultStyle.danger_500main
|
weight: 400 * DefaultStyle.dp
|
||||||
font {
|
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
|
||||||
weight: 400 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Connections {
|
|
||||||
target: deleteHistoryPopup
|
|
||||||
onAccepted: {
|
|
||||||
historyListView.model.removeAllEntries()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
removeHistory.close()
|
|
||||||
deleteHistoryPopup.open()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Connections {
|
||||||
background: Item {}
|
target: deleteHistoryPopup
|
||||||
icon.source: AppIcons.newCall
|
onAccepted: {
|
||||||
Layout.preferredWidth: 28 * DefaultStyle.dp
|
historyListView.model.removeAllEntries()
|
||||||
Layout.preferredHeight: 28 * DefaultStyle.dp
|
|
||||||
icon.width: 28 * DefaultStyle.dp
|
|
||||||
icon.height: 28 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
console.debug("[CallPage]User: create new call")
|
|
||||||
listStackView.push(newCallItem)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onClicked: {
|
||||||
|
removeHistory.close()
|
||||||
|
deleteHistoryPopup.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
}
|
||||||
SearchBar {
|
Button {
|
||||||
id: searchBar
|
background: Item {}
|
||||||
Layout.fillWidth: true
|
icon.source: AppIcons.newCall
|
||||||
Layout.leftMargin: listStackView.leftMargin
|
Layout.preferredWidth: 28 * DefaultStyle.dp
|
||||||
Layout.rightMargin: listStackView.rightMargin
|
Layout.preferredHeight: 28 * DefaultStyle.dp
|
||||||
placeholderText: qsTr("Rechercher un appel")
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
}
|
icon.width: 28 * DefaultStyle.dp
|
||||||
RowLayout {
|
icon.height: 28 * DefaultStyle.dp
|
||||||
Layout.topMargin: 30 * DefaultStyle.dp
|
onClicked: {
|
||||||
spacing: 0
|
console.debug("[CallPage]User: create new call")
|
||||||
Control.Control {
|
listStackView.push(newCallItem)
|
||||||
id: listLayout
|
}
|
||||||
Layout.fillWidth: true
|
}
|
||||||
Layout.fillHeight: true
|
}
|
||||||
Layout.leftMargin: listStackView.leftMargin
|
}
|
||||||
Layout.rightMargin: listStackView.rightMargin - (scrollbar.visible? scrollbar.width : 0)
|
Component {
|
||||||
|
id: historyListItem
|
||||||
|
ColumnLayout {
|
||||||
|
Control.StackView.onActivated: titleLoader.sourceComponent = historyListTitle
|
||||||
|
property alias listView: historyListView
|
||||||
|
SearchBar {
|
||||||
|
id: searchBar
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
|
placeholderText: qsTr("Rechercher un appel")
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.topMargin: 38 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Control.Control {
|
||||||
|
id: listLayout
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.rightMargin: 39 * DefaultStyle.dp
|
||||||
|
|
||||||
background: Rectangle {
|
background: Item{}
|
||||||
anchors.fill: parent
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
ColumnLayout {
|
||||||
|
Text {
|
||||||
|
text: qsTr("Aucun appel")
|
||||||
|
font {
|
||||||
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
visible: historyListView.count === 0
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ListView {
|
||||||
anchors.fill: parent
|
id: historyListView
|
||||||
ColumnLayout {
|
clip: true
|
||||||
Text {
|
Layout.fillWidth: true
|
||||||
text: qsTr("Aucun appel")
|
Layout.fillHeight: true
|
||||||
font {
|
model: CallHistoryProxy {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
filterText: searchBar.text
|
||||||
weight: 800 * DefaultStyle.dp
|
}
|
||||||
}
|
|
||||||
visible: historyListView.count === 0
|
currentIndex: -1
|
||||||
Layout.alignment: Qt.AlignHCenter
|
flickDeceleration: 10000
|
||||||
}
|
spacing: 10 * DefaultStyle.dp
|
||||||
ListView {
|
|
||||||
id: historyListView
|
|
||||||
clip: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
model: CallHistoryProxy {
|
|
||||||
filterText: searchBar.text
|
|
||||||
}
|
|
||||||
|
|
||||||
currentIndex: -1
|
|
||||||
flickDeceleration: 10000
|
|
||||||
spacing: 10 * DefaultStyle.dp
|
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width:historyListView.width
|
width:historyListView.width
|
||||||
height: 56 * DefaultStyle.dp
|
height: 56 * DefaultStyle.dp
|
||||||
anchors.topMargin: 5 * DefaultStyle.dp
|
anchors.topMargin: 5 * DefaultStyle.dp
|
||||||
anchors.bottomMargin: 5 * DefaultStyle.dp
|
anchors.bottomMargin: 5 * DefaultStyle.dp
|
||||||
|
RowLayout {
|
||||||
|
z: 1
|
||||||
|
anchors.fill: parent
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: historyAvatar.width
|
||||||
|
Layout.preferredHeight: historyAvatar.height
|
||||||
|
Layout.leftMargin: 5 * DefaultStyle.dp
|
||||||
|
MultiEffect {
|
||||||
|
source: historyAvatar
|
||||||
|
anchors.fill: historyAvatar
|
||||||
|
shadowEnabled: true
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowColor: DefaultStyle.grey_900
|
||||||
|
shadowOpacity: 0.1
|
||||||
|
}
|
||||||
|
Avatar {
|
||||||
|
id: historyAvatar
|
||||||
|
address: modelData.core.remoteAddress
|
||||||
|
width: 45 * DefaultStyle.dp
|
||||||
|
height: 45 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
Text {
|
||||||
|
id: friendAddress
|
||||||
|
Layout.fillWidth: true
|
||||||
|
maximumLineCount: 1
|
||||||
|
property var remoteAddress: modelData ? UtilsCpp.getDisplayName(modelData.core.remoteAddress) : null
|
||||||
|
text: remoteAddress ? remoteAddress.value : ""
|
||||||
|
font {
|
||||||
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
|
weight: 400 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
z: 1
|
spacing: 3 * DefaultStyle.dp
|
||||||
anchors.fill: parent
|
EffectImage {
|
||||||
Item {
|
id: statusIcon
|
||||||
Layout.preferredWidth: historyAvatar.width
|
imageSource: modelData.core.status === LinphoneEnums.CallStatus.Declined
|
||||||
Layout.preferredHeight: historyAvatar.height
|
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere
|
||||||
Layout.leftMargin: 5 * DefaultStyle.dp
|
|| modelData.core.status === LinphoneEnums.CallStatus.Aborted
|
||||||
MultiEffect {
|
|| modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted
|
||||||
source: historyAvatar
|
? AppIcons.arrowElbow
|
||||||
anchors.fill: historyAvatar
|
: modelData.core.isOutgoing
|
||||||
shadowEnabled: true
|
? AppIcons.arrowUpRight
|
||||||
shadowBlur: 1
|
: AppIcons.arrowDownLeft
|
||||||
shadowColor: DefaultStyle.grey_900
|
colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined
|
||||||
shadowOpacity: 0.1
|
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere
|
||||||
}
|
|| modelData.core.status === LinphoneEnums.CallStatus.Aborted
|
||||||
Avatar {
|
|| modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted
|
||||||
id: historyAvatar
|
|| modelData.core.status === LinphoneEnums.CallStatus.Missed
|
||||||
address: modelData.core.remoteAddress
|
? DefaultStyle.danger_500main
|
||||||
width: 45 * DefaultStyle.dp
|
: modelData.core.isOutgoing
|
||||||
height: 45 * DefaultStyle.dp
|
? DefaultStyle.info_500_main
|
||||||
}
|
: DefaultStyle.success_500main
|
||||||
}
|
Layout.preferredWidth: 12 * DefaultStyle.dp
|
||||||
ColumnLayout {
|
Layout.preferredHeight: 12 * DefaultStyle.dp
|
||||||
Layout.fillHeight: true
|
transform: Rotation {
|
||||||
Layout.fillWidth: true
|
angle: modelData.core.isOutgoing && (modelData.core.status === LinphoneEnums.CallStatus.Declined
|
||||||
spacing: 5 * DefaultStyle.dp
|
|
||||||
Text {
|
|
||||||
id: friendAddress
|
|
||||||
Layout.fillWidth: true
|
|
||||||
maximumLineCount: 1
|
|
||||||
property var remoteAddress: modelData ? UtilsCpp.getDisplayName(modelData.core.remoteAddress) : null
|
|
||||||
text: remoteAddress ? remoteAddress.value : ""
|
|
||||||
font {
|
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
|
||||||
weight: 400 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
spacing: 3 * DefaultStyle.dp
|
|
||||||
EffectImage {
|
|
||||||
id: statusIcon
|
|
||||||
imageSource: modelData.core.status === LinphoneEnums.CallStatus.Declined
|
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere
|
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.Aborted
|
|| modelData.core.status === LinphoneEnums.CallStatus.Aborted
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted
|
|| modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0
|
||||||
? AppIcons.arrowElbow
|
origin {
|
||||||
: modelData.core.isOutgoing
|
x: statusIcon.width/2
|
||||||
? AppIcons.arrowUpRight
|
y: statusIcon.height/2
|
||||||
: 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_500main
|
|
||||||
: modelData.core.isOutgoing
|
|
||||||
? DefaultStyle.info_500_main
|
|
||||||
: DefaultStyle.success_500main
|
|
||||||
Layout.preferredWidth: 12 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 12 * DefaultStyle.dp
|
|
||||||
transform: Rotation {
|
|
||||||
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
|
|
||||||
origin {
|
|
||||||
x: statusIcon.width/2
|
|
||||||
y: statusIcon.height/2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
// text: modelData.core.date
|
|
||||||
text: UtilsCpp.formatDateElapsedTime(modelData.core.date)
|
|
||||||
font {
|
|
||||||
pixelSize: 12 * DefaultStyle.dp
|
|
||||||
weight: 300 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Text {
|
||||||
Layout.rightMargin: 5 * DefaultStyle.dp
|
// text: modelData.core.date
|
||||||
padding: 0
|
text: UtilsCpp.formatDateElapsedTime(modelData.core.date)
|
||||||
background: Item {
|
font {
|
||||||
visible: false
|
pixelSize: 12 * DefaultStyle.dp
|
||||||
}
|
weight: 300 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.phone
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
icon.width: 24 * DefaultStyle.dp
|
|
||||||
icon.height: 24 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
var addr = UtilsCpp.generateLinphoneSipAddress(modelData.core.remoteAddress)
|
|
||||||
UtilsCpp.createCall(addr)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
}
|
||||||
hoverEnabled: true
|
Button {
|
||||||
anchors.fill: parent
|
Layout.rightMargin: 5 * DefaultStyle.dp
|
||||||
Rectangle {
|
padding: 0
|
||||||
anchors.fill: parent
|
background: Item {
|
||||||
opacity: 0.1
|
visible: false
|
||||||
color: DefaultStyle.main2_500main
|
}
|
||||||
visible: parent.containsMouse
|
icon.source: AppIcons.phone
|
||||||
}
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Rectangle {
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
anchors.fill: parent
|
icon.width: 24 * DefaultStyle.dp
|
||||||
visible: historyListView.currentIndex === model.index
|
icon.height: 24 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_100
|
onClicked: {
|
||||||
}
|
var addr = UtilsCpp.generateLinphoneSipAddress(modelData.core.remoteAddress)
|
||||||
onPressed: {
|
UtilsCpp.createCall(addr)
|
||||||
historyListView.currentIndex = model.index
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onCurrentIndexChanged: {
|
}
|
||||||
positionViewAtIndex(currentIndex, ListView.Visible)
|
MouseArea {
|
||||||
mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
hoverEnabled: true
|
||||||
|
anchors.fill: parent
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
opacity: 0.1
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
visible: parent.containsMouse
|
||||||
}
|
}
|
||||||
onCountChanged: mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
Rectangle {
|
||||||
onVisibleChanged: {
|
anchors.fill: parent
|
||||||
if (!visible) currentIndex = -1
|
visible: historyListView.currentIndex === model.index
|
||||||
|
color: DefaultStyle.main2_100
|
||||||
}
|
}
|
||||||
|
onPressed: {
|
||||||
Connections {
|
historyListView.currentIndex = model.index
|
||||||
target: mainItem
|
|
||||||
onListViewUpdated: {
|
|
||||||
historyListView.model.updateView()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Control.ScrollBar.vertical: scrollbar
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
onCurrentIndexChanged: {
|
||||||
}
|
positionViewAtIndex(currentIndex, ListView.Visible)
|
||||||
Control.ScrollBar {
|
mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
||||||
id: scrollbar
|
}
|
||||||
active: true
|
onCountChanged: mainItem.selectedRowHistoryGui = model.getAt(currentIndex)
|
||||||
policy: Control.ScrollBar.AlwaysOn //Control.ScrollBar.AsNeeded
|
onVisibleChanged: {
|
||||||
Layout.fillHeight: true
|
if (!visible) currentIndex = -1
|
||||||
Layout.rightMargin: 8 * DefaultStyle.dp
|
}
|
||||||
Rectangle{// TODO: change colors of scrollbar!
|
|
||||||
anchors.fill: parent
|
Connections {
|
||||||
color: 'red'
|
target: mainItem
|
||||||
opacity:0.2
|
onListViewUpdated: {
|
||||||
|
historyListView.model.updateView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Control.ScrollBar.vertical: scrollbar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ScrollBar {
|
||||||
|
id: scrollbar
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 8 * DefaultStyle.dp
|
||||||
|
active: true
|
||||||
|
policy: Control.ScrollBar.AsNeeded
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
}
|
||||||
id: newCallItem
|
|
||||||
|
Component {
|
||||||
|
id: newCallTitle
|
||||||
|
RowLayout {
|
||||||
|
Button {
|
||||||
|
Layout.leftMargin: 45 * DefaultStyle.dp
|
||||||
|
background: Item {
|
||||||
|
}
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
console.debug("[CallPage]User: return to call history")
|
||||||
|
listStackView.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: qsTr("Nouvel appel")
|
||||||
|
color: DefaultStyle.main2_700
|
||||||
|
font.pixelSize: 29 * DefaultStyle.dp
|
||||||
|
font.weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: newCallItem
|
||||||
|
CallContactsLists {
|
||||||
|
Control.StackView.onActivated: titleLoader.sourceComponent = newCallTitle
|
||||||
|
numPad: numericPad
|
||||||
|
groupCallVisible: true
|
||||||
|
searchBarColor: DefaultStyle.grey_100
|
||||||
|
|
||||||
|
onCallButtonPressed: (address) => {
|
||||||
|
UtilsCpp.createCall(UtilsCpp.generateLinphoneSipAddress(address))
|
||||||
|
// var window = UtilsCpp.getCallsWindow()
|
||||||
|
}
|
||||||
|
onGroupCallCreationRequested: {
|
||||||
|
console.log("groupe call requetsed")
|
||||||
|
listStackView.push(groupCallItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: groupCallTitle
|
||||||
|
RowLayout {
|
||||||
|
Button {
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
Layout.leftMargin: 21 * DefaultStyle.dp
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
onClicked: listStackView.pop()
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 30 * DefaultStyle.dp
|
spacing: 3 * DefaultStyle.dp
|
||||||
RowLayout {
|
Text {
|
||||||
Layout.leftMargin: listStackView.leftMargin
|
text: qsTr("Appel de groupe")
|
||||||
Layout.rightMargin: listStackView.rightMargin
|
color: DefaultStyle.main1_500_main
|
||||||
Button {
|
maximumLineCount: 1
|
||||||
background: Item {
|
font {
|
||||||
}
|
pixelSize: 18 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
icon.source: AppIcons.leftArrow
|
|
||||||
icon.width: 24 * DefaultStyle.dp
|
|
||||||
icon.height: 24 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
console.debug("[CallPage]User: return to call history")
|
|
||||||
listStackView.pop()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Text {
|
|
||||||
text: qsTr("Nouvel appel")
|
|
||||||
color: DefaultStyle.main2_700
|
|
||||||
font.pixelSize: 29 * DefaultStyle.dp
|
|
||||||
font.weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CallContactsLists {
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
}
|
||||||
groupCallVisible: true
|
Text {
|
||||||
searchBarColor: DefaultStyle.grey_100
|
text: qsTr("%1 participant%2 sélectionné").arg(mainItem.selectedParticipantsCount).arg(mainItem.selectedParticipantsCount > 1 ? "s" : "")
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
onCallButtonPressed: (address) => {
|
maximumLineCount: 1
|
||||||
UtilsCpp.createCall(UtilsCpp.generateLinphoneSipAddress(address))
|
font {
|
||||||
// var window = UtilsCpp.getCallsWindow()
|
pixelSize: 12 * DefaultStyle.dp
|
||||||
}
|
weight: 300 * DefaultStyle.dp
|
||||||
onGroupCallCreationRequested: {
|
|
||||||
console.log("groupe call requetsed")
|
|
||||||
listStackView.push(groupCallItem)
|
|
||||||
}
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
enabled: mainItem.selectedParticipantsCount.length != 0
|
||||||
|
Layout.rightMargin: 21 * DefaultStyle.dp
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
|
text: qsTr("Lancer")
|
||||||
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
mainItem.startGroupCallRequested()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
}
|
||||||
id: groupCallItem
|
|
||||||
// RowLayout {
|
Component {
|
||||||
AddParticipantsLayout {
|
id: groupCallItem
|
||||||
Control.StackView.onActivated: mainItem.confInfoGui = Qt.createQmlObject('import Linphone
|
// RowLayout {
|
||||||
ConferenceInfoGui{
|
AddParticipantsLayout {
|
||||||
}', mainItem)
|
Control.StackView.onActivated: titleLoader.sourceComponent = groupCallTitle
|
||||||
Layout.leftMargin: 21 * DefaultStyle.dp
|
id: addParticipantsLayout
|
||||||
title: qsTr("Appel de groupe")
|
onSelectedParticipantsCountChanged: mainItem.selectedParticipantsCount = selectedParticipantsCount
|
||||||
titleColor: DefaultStyle.main1_500_main
|
nameGroupCall: true
|
||||||
nameGroupCall: true
|
Connections {
|
||||||
validateButtonText: qsTr("Lancer")
|
target: mainItem
|
||||||
onReturnRequested: listStackView.pop()
|
onStartGroupCallRequested: {
|
||||||
onValidateRequested: {
|
|
||||||
if (groupName.length === 0) {
|
if (groupName.length === 0) {
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Un nom doit être donné à l'appel de groupe"), false)
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Un nom doit être donné à l'appel de groupe"), false)
|
||||||
} if(!mainItem.isRegistered) {
|
} if(!mainItem.isRegistered) {
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Vous n'etes pas connecté"), false)
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Vous n'etes pas connecté"), false)
|
||||||
}else {
|
} else {
|
||||||
mainItem.confInfoGui.core.subject = groupName
|
mainItem.confInfoGui = Qt.createQmlObject('import Linphone
|
||||||
|
ConferenceInfoGui{
|
||||||
|
}', mainItem)
|
||||||
|
mainItem.confInfoGui.core.subject = addParticipantsLayout.groupName
|
||||||
mainItem.confInfoGui.core.isScheduled = false
|
mainItem.confInfoGui.core.isScheduled = false
|
||||||
mainItem.confInfoGui.core.addParticipants(selectedParticipants)
|
mainItem.confInfoGui.core.addParticipants(addParticipantsLayout.selectedParticipants)
|
||||||
mainItem.confInfoGui.core.save()
|
mainItem.confInfoGui.core.save()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
|
|
|
||||||
|
|
@ -57,18 +57,20 @@ AbstractMainPage {
|
||||||
onAccepted: contact.core.remove()
|
onAccepted: contact.core.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
leftPanelContent: ColumnLayout {
|
leftPanelContent: Item {
|
||||||
id: leftPanel
|
id: leftPanel
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
property int leftMargin: 45 * DefaultStyle.dp
|
property int leftMargin: 45 * DefaultStyle.dp
|
||||||
property int rightMargin: 39 * DefaultStyle.dp
|
property int rightMargin: 39 * DefaultStyle.dp
|
||||||
spacing: 30 * DefaultStyle.dp
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
id: title
|
||||||
Layout.leftMargin: leftPanel.leftMargin
|
anchors.top: leftPanel.top
|
||||||
Layout.rightMargin: leftPanel.rightMargin
|
anchors.right: leftPanel.right
|
||||||
|
anchors.left: leftPanel.left
|
||||||
|
anchors.leftMargin: leftPanel.leftMargin
|
||||||
|
anchors.rightMargin: leftPanel.rightMargin
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Contacts")
|
text: qsTr("Contacts")
|
||||||
|
|
@ -94,10 +96,14 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.leftMargin: leftPanel.leftMargin
|
anchors.top: title.bottom
|
||||||
|
anchors.right: leftPanel.right
|
||||||
|
anchors.left: leftPanel.left
|
||||||
|
anchors.bottom: leftPanel.bottom
|
||||||
enabled: mainItem.leftPanelEnabled
|
enabled: mainItem.leftPanelEnabled
|
||||||
SearchBar {
|
SearchBar {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
|
Layout.leftMargin: leftPanel.leftMargin
|
||||||
Layout.rightMargin: leftPanel.rightMargin
|
Layout.rightMargin: leftPanel.rightMargin
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr("Rechercher un contact")
|
placeholderText: qsTr("Rechercher un contact")
|
||||||
|
|
@ -106,10 +112,10 @@ AbstractMainPage {
|
||||||
id: contactsArea
|
id: contactsArea
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
Control.ScrollView {
|
Control.ScrollView {
|
||||||
id: listLayout
|
id: listLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: leftPanel.rightMargin
|
|
||||||
anchors.topMargin: 25 * DefaultStyle.dp
|
anchors.topMargin: 25 * DefaultStyle.dp
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
|
|
@ -132,6 +138,8 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: favoriteList.contentHeight > 0
|
visible: favoriteList.contentHeight > 0
|
||||||
|
Layout.leftMargin: leftPanel.leftMargin
|
||||||
|
Layout.rightMargin: leftPanel.rightMargin
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Favoris")
|
text: qsTr("Favoris")
|
||||||
|
|
@ -158,6 +166,7 @@ AbstractMainPage {
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
|
Control.ScrollBar.vertical.visible: false
|
||||||
showOnlyFavourites: true
|
showOnlyFavourites: true
|
||||||
contactMenuVisible: true
|
contactMenuVisible: true
|
||||||
model: allFriends
|
model: allFriends
|
||||||
|
|
@ -175,6 +184,8 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: contactList.count > 0
|
visible: contactList.count > 0
|
||||||
|
Layout.leftMargin: leftPanel.leftMargin
|
||||||
|
Layout.rightMargin: leftPanel.rightMargin
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -202,6 +213,7 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
interactive: false
|
interactive: false
|
||||||
|
Control.ScrollBar.vertical.visible: false
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
contactMenuVisible: true
|
contactMenuVisible: true
|
||||||
searchBarText: searchBar.text
|
searchBarText: searchBar.text
|
||||||
|
|
@ -219,22 +231,21 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Control.ScrollBar {
|
|
||||||
id: contactsScrollbar
|
|
||||||
// Parent is changed from Scrollview. Do not use it.
|
|
||||||
x: contactsArea.width - width
|
|
||||||
height: listLayout.availableHeight
|
|
||||||
active: true
|
|
||||||
interactive: true
|
|
||||||
policy: Control.ScrollBar.AlwaysOn //Control.ScrollBar.AsNeeded
|
|
||||||
|
|
||||||
Rectangle{// TODO: change colors of scrollbar!
|
ScrollBar {
|
||||||
anchors.fill: parent
|
id: contactsScrollbar
|
||||||
color: 'red'
|
anchors.right: listLayout.right
|
||||||
opacity:0.2
|
anchors.rightMargin: 8 * DefaultStyle.dp
|
||||||
|
anchors.top: listLayout.top
|
||||||
|
anchors.bottom: listLayout.bottom
|
||||||
|
height: listLayout.availableHeight
|
||||||
|
active: true
|
||||||
|
interactive: true
|
||||||
|
policy: Control.ScrollBar.AlwaysOn //Control.ScrollBar.AsNeeded
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ AbstractMainPage {
|
||||||
property ConferenceInfoGui selectedConference
|
property ConferenceInfoGui selectedConference
|
||||||
property int meetingListCount
|
property int meetingListCount
|
||||||
signal newConfCreated()
|
signal newConfCreated()
|
||||||
|
signal returnRequested()
|
||||||
|
signal addParticipantsValidated(list<string> selectedParticipants)
|
||||||
Component.onCompleted: rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
Component.onCompleted: rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
||||||
|
|
||||||
onSelectedConferenceChanged: {
|
onSelectedConferenceChanged: {
|
||||||
|
|
@ -39,9 +41,11 @@ AbstractMainPage {
|
||||||
confInfoGui = Qt.createQmlObject('import Linphone
|
confInfoGui = Qt.createQmlObject('import Linphone
|
||||||
ConferenceInfoGui{
|
ConferenceInfoGui{
|
||||||
}', mainItem)
|
}', mainItem)
|
||||||
leftPanelStackView.push(createConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
mainItem.selectedConference = confInfoGui
|
||||||
|
leftPanelStackView.push(createConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
||||||
} else {
|
} else {
|
||||||
overridenRightPanelStackView.push(editConf, {"conferenceInfoGui": confInfoGui, "isCreation": isCreation})
|
mainItem.selectedConference = confInfoGui
|
||||||
|
overridenRightPanelStackView.push(editConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -94,70 +98,28 @@ AbstractMainPage {
|
||||||
leftPanelContent: Item {
|
leftPanelContent: Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
RowLayout {
|
|
||||||
id: leftPanel
|
|
||||||
anchors.fill: parent
|
|
||||||
spacing: 0
|
|
||||||
ColumnLayout {
|
|
||||||
enabled: mainItem.leftPanelEnabled
|
|
||||||
Layout.leftMargin: 45 * DefaultStyle.dp
|
|
||||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
|
||||||
spacing: 0
|
|
||||||
RowLayout {
|
|
||||||
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
|
||||||
// Layout.rightMargin: leftPanel.sideMargin
|
|
||||||
spacing: 0
|
|
||||||
Text {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Réunions")
|
|
||||||
color: DefaultStyle.main2_700
|
|
||||||
font.pixelSize: 29 * DefaultStyle.dp
|
|
||||||
font.weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
background: Item {
|
|
||||||
}
|
|
||||||
icon.source: AppIcons.plusCircle
|
|
||||||
Layout.preferredWidth: 28 * DefaultStyle.dp
|
|
||||||
Layout.preferredHeight: 28 * DefaultStyle.dp
|
|
||||||
icon.width: 28 * DefaultStyle.dp
|
|
||||||
icon.height: 28 * DefaultStyle.dp
|
|
||||||
onClicked: {
|
|
||||||
mainItem.setUpConference()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Control.StackView {
|
||||||
Layout.fillWidth: true
|
id: leftPanelStackView
|
||||||
Layout.fillHeight: true
|
initialItem: listLayout
|
||||||
|
|
||||||
Control.StackView {
|
|
||||||
id: leftPanelStackView
|
|
||||||
initialItem: listLayout
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{// TODO: change colors of scrollbar!
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 18 * DefaultStyle.dp
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: 10
|
anchors.leftMargin: 45 * DefaultStyle.dp
|
||||||
color: 'red'
|
|
||||||
opacity:0.2
|
|
||||||
}
|
}
|
||||||
Control.ScrollBar {
|
|
||||||
|
ScrollBar {
|
||||||
id: meetingsScrollbar
|
id: meetingsScrollbar
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.rightMargin: 8 * DefaultStyle.dp
|
||||||
|
anchors.top: leftPanelStackView.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: 10
|
visible: leftPanelStackView.currentItem == listLayout
|
||||||
//visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
|
||||||
active: true
|
active: true
|
||||||
interactive: true
|
interactive: true
|
||||||
policy: Control.ScrollBar.AlwaysOn //Control.ScrollBar.AsNeeded
|
policy: Control.ScrollBar.AsNeeded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,8 +130,8 @@ AbstractMainPage {
|
||||||
width: 393 * DefaultStyle.dp
|
width: 393 * DefaultStyle.dp
|
||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// anchors.bottom: parent.bottom
|
anchors.centerIn: parent
|
||||||
// Layout.fillWidth: false
|
anchors.horizontalCenter: parent.horiztonalCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,12 +144,42 @@ AbstractMainPage {
|
||||||
mainItem.selectedConference = null
|
mainItem.selectedConference = null
|
||||||
// mainItem.righPanelStackView.clear()
|
// mainItem.righPanelStackView.clear()
|
||||||
}
|
}
|
||||||
Control.StackView.onActivated: mainItem.selectedConference = conferenceList.selectedConference
|
Control.StackView.onActivated: {
|
||||||
|
mainItem.selectedConference = conferenceList.selectedConference
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
visible: leftPanelStackView.currentItem.objectName == "listLayout"
|
||||||
|
enabled: mainItem.leftPanelEnabled
|
||||||
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
|
spacing: 0
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Réunions")
|
||||||
|
color: DefaultStyle.main2_700
|
||||||
|
font.pixelSize: 29 * DefaultStyle.dp
|
||||||
|
font.weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Item{Layout.fillWidth: true}
|
||||||
|
Button {
|
||||||
|
background: Item {
|
||||||
|
}
|
||||||
|
icon.source: AppIcons.plusCircle
|
||||||
|
Layout.preferredWidth: 28 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 28 * DefaultStyle.dp
|
||||||
|
icon.width: 28 * DefaultStyle.dp
|
||||||
|
icon.height: 28 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
mainItem.setUpConference()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
SearchBar {
|
SearchBar {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
Layout.fillWidth: true
|
Layout.topMargin: 18 * DefaultStyle.dp
|
||||||
|
// Layout.fillWidth: true
|
||||||
//Layout.topMargin: 18 * DefaultStyle.dp
|
//Layout.topMargin: 18 * DefaultStyle.dp
|
||||||
placeholderText: qsTr("Rechercher une réunion")
|
placeholderText: qsTr("Rechercher une réunion")
|
||||||
|
Layout.preferredWidth: 331 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -229,64 +221,222 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: createConf
|
id: createConf
|
||||||
MeetingSetUp {
|
ColumnLayout {
|
||||||
id: meetingSetup
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
onSaveSucceed: {
|
property bool isCreation
|
||||||
mainItem.newConfCreated()
|
|
||||||
leftPanelStackView.pop()
|
RowLayout {
|
||||||
UtilsCpp.showInformationPopup(qsTr("Nouvelle réunion"), qsTr("Réunion planifiée avec succès"), true)
|
width: 320 * DefaultStyle.dp
|
||||||
|
Layout.rightMargin: 35 * DefaultStyle.dp
|
||||||
|
Button {
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
meetingSetup.conferenceInfoGui.core.undo()
|
||||||
|
leftPanelStackView.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: qsTr("Nouvelle réunion")
|
||||||
|
color: DefaultStyle.main2_700
|
||||||
|
font {
|
||||||
|
pixelSize: 22 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
text: qsTr("Créer")
|
||||||
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
if (meetingSetup.conferenceInfoGui.core.subject.length === 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
||||||
|
} else if (meetingSetup.conferenceInfoGui.core.duration <= 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
||||||
|
} else if (meetingSetup.conferenceInfoGui.core.participantCount === 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
|
||||||
|
} else {
|
||||||
|
meetingSetup.conferenceInfoGui.core.save()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onReturnRequested: {
|
MeetingSetUp {
|
||||||
leftPanelStackView.pop()
|
id: meetingSetup
|
||||||
}
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
onAddParticipantsRequested: {
|
isCreation: parent.isCreation
|
||||||
leftPanelStackView.push(addParticipants, {"conferenceInfoGui": meetingSetup.conferenceInfoGui, "container": leftPanelStackView})
|
Layout.rightMargin: 35 * DefaultStyle.dp
|
||||||
|
onSaveSucceed: {
|
||||||
|
mainItem.newConfCreated()
|
||||||
|
leftPanelStackView.pop()
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Nouvelle réunion"), qsTr("Réunion planifiée avec succès"), true)
|
||||||
|
}
|
||||||
|
onAddParticipantsRequested: {
|
||||||
|
leftPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": leftPanelStackView})
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: mainItem
|
||||||
|
onAddParticipantsValidated: (selectedParticipants) => {
|
||||||
|
meetingSetup.conferenceInfoGui.core.resetParticipants(selectedParticipants)
|
||||||
|
leftPanelStackView.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: editConf
|
id: editConf
|
||||||
MeetingSetUp {
|
ColumnLayout {
|
||||||
property bool isCreation
|
property bool isCreation
|
||||||
isCreation: parent.isCreation
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
onReturnRequested: {
|
Section {
|
||||||
overridenRightPanelStackView.pop()
|
content: RowLayout {
|
||||||
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
Button {
|
||||||
|
background: Item{}
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
conferenceEdit.conferenceInfoGui.core.undo()
|
||||||
|
overridenRightPanelStackView.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextInput {
|
||||||
|
Component.onCompleted: text = mainItem.selectedConference.core.subject
|
||||||
|
color: DefaultStyle.main2_600
|
||||||
|
font {
|
||||||
|
pixelSize: 20 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
||||||
|
onEditingFinished: mainItem.selectedConference.core.subject = text
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
|
text: qsTr("Save")
|
||||||
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
if (mainItem.selectedConference.core.subject.length === 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
||||||
|
} else if (mainItem.selectedConference.core.duration <= 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
||||||
|
} else if (mainItem.selectedConference.core.participantCount === 0) {
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
|
||||||
|
} else {
|
||||||
|
mainItem.selectedConference.core.save()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onSaveSucceed: {
|
MeetingSetUp {
|
||||||
overridenRightPanelStackView.pop()
|
id: conferenceEdit
|
||||||
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
property bool isCreation
|
||||||
}
|
isCreation: parent.isCreation
|
||||||
onAddParticipantsRequested: {
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
overridenRightPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": overridenRightPanelStackView})
|
onSaveSucceed: {
|
||||||
|
overridenRightPanelStackView.pop()
|
||||||
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
||||||
|
}
|
||||||
|
onAddParticipantsRequested: {
|
||||||
|
overridenRightPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": overridenRightPanelStackView})
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: mainItem
|
||||||
|
onAddParticipantsValidated: (selectedParticipants) => {
|
||||||
|
conferenceEdit.conferenceInfoGui.core.resetParticipants(selectedParticipants)
|
||||||
|
overridenRightPanelStackView.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: addParticipants
|
id: addParticipants
|
||||||
AddParticipantsLayout {
|
ColumnLayout {
|
||||||
id: addParticipantLayout
|
|
||||||
property Control.StackView container
|
property Control.StackView container
|
||||||
// Layout.fillHeight: true
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
title: qsTr("Ajouter des participants")
|
RowLayout {
|
||||||
validateButtonText: qsTr("Ajouter")
|
Button {
|
||||||
titleColor: DefaultStyle.main1_500_main
|
background: Item{}
|
||||||
onReturnRequested: {
|
icon.source: AppIcons.leftArrow
|
||||||
container.pop()
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
icon.width: 24 * DefaultStyle.dp
|
||||||
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
onClicked: mainItem.returnRequested()
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 3 * DefaultStyle.dp
|
||||||
|
Text {
|
||||||
|
text: qsTr("Appel de groupe")
|
||||||
|
color: DefaultStyle.main1_500_main
|
||||||
|
maximumLineCount: 1
|
||||||
|
font {
|
||||||
|
pixelSize: 18 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: qsTr("%1 participant%2 sélectionné%2").arg(addParticipantLayout.selectedParticipantsCount).arg(addParticipantLayout.selectedParticipantsCount > 1 ? "s" : "")
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
maximumLineCount: 1
|
||||||
|
font {
|
||||||
|
pixelSize: 12 * DefaultStyle.dp
|
||||||
|
weight: 300 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
enabled: addParticipantLayout.selectedParticipantsCount.length != 0
|
||||||
|
Layout.rightMargin: 21 * DefaultStyle.dp
|
||||||
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
|
text: qsTr("Ajouter")
|
||||||
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
onClicked: {
|
||||||
|
mainItem.addParticipantsValidated(addParticipantLayout.selectedParticipants)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onValidateRequested: {
|
AddParticipantsLayout {
|
||||||
conferenceInfoGui.core.resetParticipants(addParticipantLayout.selectedParticipants)
|
id: addParticipantLayout
|
||||||
returnRequested()
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: meetingDetail
|
id: meetingDetail
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: mainItem.selectedConference
|
visible: mainItem.selectedConference
|
||||||
spacing: 25 * DefaultStyle.dp
|
spacing: 25 * DefaultStyle.dp
|
||||||
Section {
|
Section {
|
||||||
|
visible: mainItem.selectedConference
|
||||||
content: RowLayout {
|
content: RowLayout {
|
||||||
spacing: 8 * DefaultStyle.dp
|
spacing: 8 * DefaultStyle.dp
|
||||||
Image {
|
Image {
|
||||||
|
|
@ -343,10 +493,12 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
cancelAndDeleteConfDialog.cancel = UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
if (mainItem.selectedConference) {
|
||||||
cancelAndDeleteConfDialog.open()
|
cancelAndDeleteConfDialog.cancel = UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
||||||
// mainItem.contactDeletionRequested(mainItem.selectedConference)
|
cancelAndDeleteConfDialog.open()
|
||||||
deletePopup.close()
|
// mainItem.contactDeletionRequested(mainItem.selectedConference)
|
||||||
|
deletePopup.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: cancelAndDeleteConfDialog
|
target: cancelAndDeleteConfDialog
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue