linphone-desktop/Linphone/view/Item/Call/Menu/ScreencastPanel.qml
2024-04-22 18:16:32 +02:00

86 lines
No EOL
2.1 KiB
QML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import QtQuick 2.15
import QtQuick.Layouts
import QtQuick.Effects
import QtQuick.Controls as Control
import Linphone
import UtilsCpp 1.0
ColumnLayout {
property CallGui call
spacing: 12 * DefaultStyle.dp
Text {
Layout.fillWidth: true
text: qsTr("Veuillez choisir lécran ou la fenêtre que vous souihaitez partager au autres participants")
font.pixelSize: 14 * DefaultStyle.dp
color: DefaultStyle.main2_500main
}
TabBar {
Layout.fillWidth: true
id: bar
pixelSize: 16 * DefaultStyle.dp
model: [qsTr("Ecran entier"), qsTr("Fenêtre")]
}
component ScreenPreviewLayout: Control.Control {
id: screenPreview
signal clicked()
property var screenSource
property int screenIndex
property bool selected: false
leftPadding: 18 * DefaultStyle.dp
rightPadding: 18 * DefaultStyle.dp
topPadding: 13 * DefaultStyle.dp
bottomPadding: 13 * DefaultStyle.dp
background: Rectangle {
anchors.fill: parent
color: screenPreview.selected ? DefaultStyle.main2_100 : DefaultStyle.grey_0
border.width: 2 * DefaultStyle.dp
border.color: screenPreview.selected ? DefaultStyle.main2_400 : DefaultStyle.main2_200
radius: 10 * DefaultStyle.dp
MouseArea {
anchors.fill: parent
onClicked: {
screenPreview.clicked()
}
}
}
contentItem: ColumnLayout {
// TODO : replace this by screen preview
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 170 * DefaultStyle.dp
}
Text {
text: qsTr("Ecran %1").arg(screenIndex)
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 14 * DefaultStyle.dp
Layout.fillWidth: true
}
}
}
StackLayout {
currentIndex: bar.currentIndex
ColumnLayout {
id: screensLayout
property int selectedIndex
Repeater {
model: 2 //TODO : screensModel
ScreenPreviewLayout {
Layout.fillWidth: true
screenIndex: index
onClicked: screensLayout.selectedIndex = index
selected: screensLayout.selectedIndex === index
}
}
}
Text {
Layout.topMargin: 30 * DefaultStyle.dp
font.pixelSize: 20 * DefaultStyle.dp
text: qsTr("Cliquez sur la fenêtre à partager")
}
}
Button {
text: qsTr("Partager")
}
}