Keyboard shortcuts
This commit is contained in:
parent
4143d15f34
commit
ab64d0479a
46 changed files with 2696 additions and 1854 deletions
|
|
@ -1,4 +0,0 @@
|
||||||
<svg width="32" height="20" viewBox="0 0 32 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect width="32" height="20" rx="10" fill="#9AABB5"/>
|
|
||||||
<circle cx="10" cy="10" r="6" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 202 B |
|
|
@ -1,4 +0,0 @@
|
||||||
<svg width="32" height="20" viewBox="0 0 32 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect width="32" height="20" rx="10" fill="#4FAE80"/>
|
|
||||||
<circle cx="22" cy="10" r="6" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 202 B |
|
|
@ -280,9 +280,9 @@ AppWindow {
|
||||||
id: callStatusText
|
id: callStatusText
|
||||||
text: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released)
|
text: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released)
|
||||||
? qsTr("End of the call")
|
? qsTr("End of the call")
|
||||||
: mainWindow.call && mainWindow.call.core.paused
|
: mainWindow.call && (mainWindow.call.core.paused
|
||||||
|| (mainWindow.callState === LinphoneEnums.CallState.Paused
|
|| (mainWindow.callState === LinphoneEnums.CallState.Paused
|
||||||
|| mainWindow.callState === LinphoneEnums.CallState.PausedByRemote)
|
|| mainWindow.callState === LinphoneEnums.CallState.PausedByRemote))
|
||||||
? (mainWindow.conference ? qsTr('Réunion mise ') : qsTr('Appel mis')) + qsTr(" en pause")
|
? (mainWindow.conference ? qsTr('Réunion mise ') : qsTr('Appel mis')) + qsTr(" en pause")
|
||||||
: mainWindow.conference
|
: mainWindow.conference
|
||||||
? mainWindow.conference.core.subject
|
? mainWindow.conference.core.subject
|
||||||
|
|
@ -348,8 +348,9 @@ AppWindow {
|
||||||
visible: mainWindow.call && mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
visible: mainWindow.call && mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning
|
||||||
imageSource: mainWindow.call
|
imageSource: mainWindow.call
|
||||||
? mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Srtp
|
? mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Srtp
|
||||||
|
|
||||||
? AppIcons.lockSimple
|
? AppIcons.lockSimple
|
||||||
: mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp
|
: mainWindow.call && mainWindow.call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp
|
||||||
? mainWindow.call.core.isMismatch || !mainWindow.call.core.tokenVerified
|
? mainWindow.call.core.isMismatch || !mainWindow.call.core.tokenVerified
|
||||||
? AppIcons.warningCircle
|
? AppIcons.warningCircle
|
||||||
: AppIcons.lockKey
|
: AppIcons.lockKey
|
||||||
|
|
@ -500,6 +501,12 @@ AppWindow {
|
||||||
id: contactsListPanel
|
id: contactsListPanel
|
||||||
Item {
|
Item {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transfert d'appel")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Transfert d'appel")
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
CallContactsLists {
|
CallContactsLists {
|
||||||
id: callcontactslist
|
id: callcontactslist
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -520,6 +527,12 @@ AppWindow {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Dialer")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Dialer")
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -559,8 +572,14 @@ AppWindow {
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: changeLayoutPanel
|
id: changeLayoutPanel
|
||||||
Item {
|
FocusScope {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Modifier la disposition")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Modifier la disposition")
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: 16 * DefaultStyle.dp
|
anchors.topMargin: 16 * DefaultStyle.dp
|
||||||
|
|
@ -631,6 +650,12 @@ AppWindow {
|
||||||
rightPanel.headerTitleText = qsTr("Liste d'appel")
|
rightPanel.headerTitleText = qsTr("Liste d'appel")
|
||||||
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(rightPanel)
|
rightPanel.customHeaderButtons = mergeCallPopupButton.createObject(rightPanel)
|
||||||
}
|
}
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Component {
|
Component {
|
||||||
id: mergeCallPopupButton
|
id: mergeCallPopupButton
|
||||||
|
|
@ -725,6 +750,10 @@ AppWindow {
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Button {
|
Button {
|
||||||
|
id: pausingButton
|
||||||
|
onClicked: modelData.core.lSetPaused(!modelData.core.paused)
|
||||||
|
KeyNavigation.up: endCallButton
|
||||||
|
KeyNavigation.down: endCallButton
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
spacing: 5 * DefaultStyle.dp
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
|
@ -743,16 +772,18 @@ AppWindow {
|
||||||
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
|
||||||
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
? qsTr("Reprendre l'appel") : qsTr("Mettre en pause")
|
||||||
color: DefaultStyle.main2_500main
|
color: DefaultStyle.main2_500main
|
||||||
|
font.bold: pausingButton.shadowEnabled
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
|
||||||
modelData.core.lSetPaused(!modelData.core.paused)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: endCallButton
|
||||||
|
onClicked: mainWindow.endCall(modelData)
|
||||||
|
KeyNavigation.up: pausingButton
|
||||||
|
KeyNavigation.down: pausingButton
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
spacing: 5 * DefaultStyle.dp
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
|
@ -765,12 +796,12 @@ AppWindow {
|
||||||
Text {
|
Text {
|
||||||
color: DefaultStyle.danger_500main
|
color: DefaultStyle.danger_500main
|
||||||
text: qsTr("Terminer l'appel")
|
text: qsTr("Terminer l'appel")
|
||||||
|
font.bold: endCallButton.shadowEnabled
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: mainWindow.endCall(modelData)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -789,6 +820,12 @@ AppWindow {
|
||||||
Control.StackView.onActivated: {
|
Control.StackView.onActivated: {
|
||||||
rightPanel.headerTitleText = qsTr("Paramètres")
|
rightPanel.headerTitleText = qsTr("Paramètres")
|
||||||
}
|
}
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
InCallSettingsPanel {
|
InCallSettingsPanel {
|
||||||
id: inSettingsPanel
|
id: inSettingsPanel
|
||||||
call: mainWindow.call
|
call: mainWindow.call
|
||||||
|
|
@ -804,6 +841,12 @@ AppWindow {
|
||||||
id: screencastPanel
|
id: screencastPanel
|
||||||
Item {
|
Item {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Partage de votre écran")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Partage de votre écran")
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
ScreencastPanel {
|
ScreencastPanel {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: 16 * DefaultStyle.dp
|
anchors.topMargin: 16 * DefaultStyle.dp
|
||||||
|
|
@ -817,6 +860,12 @@ AppWindow {
|
||||||
Component {
|
Component {
|
||||||
id: participantListPanel
|
id: participantListPanel
|
||||||
Item {
|
Item {
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
rightPanel.visible = false
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: participantsStack
|
id: participantsStack
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: aboutButton
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
background: Item{}
|
background: Item{}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
|
@ -45,6 +46,7 @@ Rectangle {
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
text: qsTr("À propos")
|
text: qsTr("À propos")
|
||||||
font {
|
font {
|
||||||
|
underline: aboutButton.underline
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,11 @@ Item {
|
||||||
closeContextualMenuComponent()
|
closeContextualMenuComponent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Keys.onPressed: (event)=>{
|
||||||
|
if(event.key == Qt.Key_Right){
|
||||||
|
mainStackView.currentItem.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing:0
|
spacing:0
|
||||||
|
|
@ -138,6 +143,9 @@ Item {
|
||||||
if (text.length != 0) listPopup.open()
|
if (text.length != 0) listPopup.open()
|
||||||
else listPopup.close()
|
else listPopup.close()
|
||||||
}
|
}
|
||||||
|
KeyNavigation.down: contactList.count > 0 ? contactList : contactList.footerItem
|
||||||
|
KeyNavigation.up: contactList.footerItem
|
||||||
|
|
||||||
component MagicSearchButton: Button {
|
component MagicSearchButton: Button {
|
||||||
id: button
|
id: button
|
||||||
width: 45 * DefaultStyle.dp
|
width: 45 * DefaultStyle.dp
|
||||||
|
|
@ -159,7 +167,9 @@ Item {
|
||||||
Popup {
|
Popup {
|
||||||
id: listPopup
|
id: listPopup
|
||||||
width: magicSearchBar.width
|
width: magicSearchBar.width
|
||||||
height: Math.min(magicSearchContent.contentHeight + topPadding + bottomPadding, 400 * DefaultStyle.dp)
|
property int maxHeight: 400 * DefaultStyle.dp
|
||||||
|
property bool displayScrollbar: contactList.contentHeight + topPadding + bottomPadding> maxHeight
|
||||||
|
height: Math.min(contactList.contentHeight + topPadding + bottomPadding, maxHeight)
|
||||||
y: magicSearchBar.height
|
y: magicSearchBar.height
|
||||||
// closePolicy: Popup.NoAutoClose
|
// closePolicy: Popup.NoAutoClose
|
||||||
topPadding: 20 * DefaultStyle.dp
|
topPadding: 20 * DefaultStyle.dp
|
||||||
|
|
@ -174,6 +184,9 @@ Item {
|
||||||
radius: 16 * DefaultStyle.dp
|
radius: 16 * DefaultStyle.dp
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
border.color: DefaultStyle.main1_500_main
|
||||||
|
border.width: contactList.activeFocus ? 2 : 0
|
||||||
|
|
||||||
}
|
}
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
source: popupBg
|
source: popupBg
|
||||||
|
|
@ -183,35 +196,20 @@ Item {
|
||||||
shadowColor: DefaultStyle.grey_1000
|
shadowColor: DefaultStyle.grey_1000
|
||||||
shadowOpacity: 0.1
|
shadowOpacity: 0.1
|
||||||
}
|
}
|
||||||
}
|
ScrollBar {
|
||||||
|
|
||||||
contentItem: Control.ScrollView {
|
|
||||||
id: magicSearchContent
|
|
||||||
contentWidth: width
|
|
||||||
contentHeight: content.height
|
|
||||||
Control.ScrollBar.vertical: ScrollBar {
|
|
||||||
id: scrollbar
|
id: scrollbar
|
||||||
policy: Control.ScrollBar.AsNeeded
|
Component.onCompleted: x = -10 * DefaultStyle.dp
|
||||||
|
policy: Control.ScrollBar.AsNeeded// Don't work as expected
|
||||||
|
visible: listPopup.displayScrollbar
|
||||||
interactive: true
|
interactive: true
|
||||||
height: magicSearchContent.availableHeight
|
anchors.top: parent.top
|
||||||
anchors.top: listPopup.top
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottom: listPopup.bottom
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
}
|
anchors.margins: 10 * DefaultStyle.dp
|
||||||
ColumnLayout {
|
|
||||||
id: content
|
|
||||||
spacing: 10 * DefaultStyle.dp
|
|
||||||
width: magicSearchContent.width - scrollbar.width - 5 * DefaultStyle.dp
|
|
||||||
Text {
|
|
||||||
visible: contactList.count > 0
|
|
||||||
text: qsTr("Contact")
|
|
||||||
color: DefaultStyle.main2_500main
|
|
||||||
font {
|
|
||||||
pixelSize: 13 * DefaultStyle.dp
|
|
||||||
weight: 700 * DefaultStyle.dp
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ContactsList {
|
contentItem: ContactsList {
|
||||||
id: contactList
|
id: contactList
|
||||||
visible: magicSearchBar.text.length != 0
|
visible: magicSearchBar.text.length != 0
|
||||||
Layout.preferredHeight: contentHeight
|
Layout.preferredHeight: contentHeight
|
||||||
|
|
@ -221,12 +219,54 @@ Item {
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
actionLayoutVisible: true
|
actionLayoutVisible: true
|
||||||
selectionEnabled: false
|
selectionEnabled: false
|
||||||
Control.ScrollBar.vertical.visible: false
|
Control.ScrollBar.vertical: scrollbar
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
searchText: magicSearchBar.text.length === 0 ? "*" : magicSearchBar.text
|
searchText: magicSearchBar.text.length === 0 ? "*" : magicSearchBar.text
|
||||||
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Down){
|
||||||
|
if(contactList.currentIndex == contactList.count -1) {
|
||||||
|
contactList.currentIndex = -1
|
||||||
|
contactList.footerItem.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
}
|
}
|
||||||
|
} else if(event.key == Qt.Key_Up){
|
||||||
|
if(contactList.currentIndex <= 0) {
|
||||||
|
contactList.currentIndex = -1
|
||||||
|
contactList.footerItem.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header: Text {
|
||||||
|
visible: contactList.count > 0
|
||||||
|
text: qsTr("Contact")
|
||||||
|
color: DefaultStyle.main2_500main
|
||||||
|
font {
|
||||||
|
pixelSize: 13 * DefaultStyle.dp
|
||||||
|
weight: 700 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
footer: FocusScope{
|
||||||
|
id: suggestionFocusScope
|
||||||
|
width: contactList.width
|
||||||
|
height: content.implicitHeight
|
||||||
|
onActiveFocusChanged: if(activeFocus) contactList.positionViewAtEnd()
|
||||||
|
Rectangle{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
height: suggestionRow.implicitHeight
|
||||||
|
color: suggestionFocusScope.activeFocus ? DefaultStyle.numericPadPressedButtonColor : 'transparent'
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
id: content
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.rightMargin: 5 * DefaultStyle.dp
|
||||||
|
|
||||||
|
spacing: 10 * DefaultStyle.dp
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Suggestion")
|
text: qsTr("Suggestion")
|
||||||
color: DefaultStyle.main2_500main
|
color: DefaultStyle.main2_500main
|
||||||
|
|
@ -235,9 +275,19 @@ Item {
|
||||||
weight: 700 * DefaultStyle.dp
|
weight: 700 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(contactList.count <= 0) return;
|
||||||
|
if(event.key == Qt.Key_Down){
|
||||||
|
contactList.currentIndex = 0
|
||||||
|
event.accepted = true
|
||||||
|
} else if(event.key == Qt.Key_Up){
|
||||||
|
contactList.currentIndex = contactList.count - 1
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
id: suggestionRow
|
||||||
Layout.rightMargin: 5 * DefaultStyle.dp
|
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
Avatar {
|
Avatar {
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
|
|
@ -257,20 +307,28 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
MagicSearchButton {
|
MagicSearchButton {
|
||||||
|
id: callButton
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.phone
|
icon.source: AppIcons.phone
|
||||||
|
focus: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UtilsCpp.createCall(magicSearchBar.text)
|
UtilsCpp.createCall(magicSearchBar.text)
|
||||||
magicSearchBar.clearText()
|
magicSearchBar.clearText()
|
||||||
}
|
}
|
||||||
|
KeyNavigation.right: chatButton
|
||||||
|
KeyNavigation.left: chatButton
|
||||||
}
|
}
|
||||||
MagicSearchButton {
|
MagicSearchButton {
|
||||||
|
id: chatButton
|
||||||
// TODO : visible true when chat available
|
// TODO : visible true when chat available
|
||||||
// visible: false
|
// visible: false
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.chatTeardropText
|
icon.source: AppIcons.chatTeardropText
|
||||||
|
KeyNavigation.right: callButton
|
||||||
|
KeyNavigation.left: callButton
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -281,7 +339,6 @@ Item {
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: avatarButton
|
id: avatarButton
|
||||||
background.visible: false
|
|
||||||
Layout.preferredWidth: 54 * DefaultStyle.dp
|
Layout.preferredWidth: 54 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: width
|
Layout.preferredHeight: width
|
||||||
popup.padding: 14 * DefaultStyle.dp
|
popup.padding: 14 * DefaultStyle.dp
|
||||||
|
|
@ -300,42 +357,92 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
id: settingsButton
|
id: settingsMenuButton
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
popup.width: 271 * DefaultStyle.dp
|
popup.width: 271 * DefaultStyle.dp
|
||||||
popup.padding: 14 * DefaultStyle.dp
|
popup.padding: 14 * DefaultStyle.dp
|
||||||
popup.contentItem: ColumnLayout {
|
popup.contentItem: FocusScope {
|
||||||
|
id: popupFocus
|
||||||
|
implicitHeight: settingsButtons.implicitHeight
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Left || event.key == Qt.Key_Escape) {
|
||||||
|
settingsMenuButton.popup.close()
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
id: settingsButtons
|
||||||
|
anchors.fill: parent
|
||||||
spacing: 20 * DefaultStyle.dp
|
spacing: 20 * DefaultStyle.dp
|
||||||
|
|
||||||
|
function getPreviousItem(index){
|
||||||
|
if(visibleChildren.length == 0) return null
|
||||||
|
--index
|
||||||
|
while(index >= 0){
|
||||||
|
if( index!= 4 && children[index].visible) return children[index]
|
||||||
|
--index
|
||||||
|
}
|
||||||
|
return getPreviousItem(children.length)
|
||||||
|
}
|
||||||
|
function getNextItem(index){
|
||||||
|
++index
|
||||||
|
while(index < children.length){
|
||||||
|
if( index!= 4 && children[index].visible) return children[index]
|
||||||
|
++index
|
||||||
|
}
|
||||||
|
return getNextItem(-1)
|
||||||
|
}
|
||||||
|
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: accountButton
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: !SettingsCpp.hideAccountSettings
|
visible: !SettingsCpp.hideAccountSettings
|
||||||
|
focus: visible
|
||||||
iconSize: 32 * DefaultStyle.dp
|
iconSize: 32 * DefaultStyle.dp
|
||||||
text: qsTr("Mon compte")
|
text: qsTr("Mon compte")
|
||||||
iconSource: AppIcons.manageProfile
|
iconSource: AppIcons.manageProfile
|
||||||
onClicked: openContextualMenuComponent(myAccountSettingsPageComponent)
|
onClicked: openContextualMenuComponent(myAccountSettingsPageComponent)
|
||||||
|
KeyNavigation.up: visibleChildren.length != 0 ? settingsButtons.getPreviousItem(0) : null
|
||||||
|
KeyNavigation.down: visibleChildren.length != 0 ? settingsButtons.getNextItem(0) : null
|
||||||
}
|
}
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: settingsButton
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: !SettingsCpp.hideSettings
|
visible: !SettingsCpp.hideSettings
|
||||||
|
focus: !accountButton.visible && visible
|
||||||
iconSize: 32 * DefaultStyle.dp
|
iconSize: 32 * DefaultStyle.dp
|
||||||
text: qsTr("Paramètres")
|
text: qsTr("Paramètres")
|
||||||
iconSource: AppIcons.settings
|
iconSource: AppIcons.settings
|
||||||
onClicked: openContextualMenuComponent(settingsPageComponent)
|
onClicked: openContextualMenuComponent(settingsPageComponent)
|
||||||
|
KeyNavigation.up: visibleChildren.length != 0 ? settingsButtons.getPreviousItem(1) : null
|
||||||
|
KeyNavigation.down: visibleChildren.length != 0 ? settingsButtons.getNextItem(1) : null
|
||||||
}
|
}
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: recordsButton
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: !SettingsCpp.disableCallRecordingsFeature
|
visible: !SettingsCpp.disableCallRecordingsFeature
|
||||||
|
focus: !accountButton.visible && !settingsButton.visible && visible
|
||||||
iconSize: 32 * DefaultStyle.dp
|
iconSize: 32 * DefaultStyle.dp
|
||||||
text: qsTr("Enregistrements")
|
text: qsTr("Enregistrements")
|
||||||
iconSource: AppIcons.micro
|
iconSource: AppIcons.micro
|
||||||
|
KeyNavigation.up: visibleChildren.length != 0 ? settingsButtons.getPreviousItem(2) : null
|
||||||
|
KeyNavigation.down: visibleChildren.length != 0 ? settingsButtons.getNextItem(2) : null
|
||||||
}
|
}
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: helpButton
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
iconSize: 32 * DefaultStyle.dp
|
iconSize: 32 * DefaultStyle.dp
|
||||||
|
focus: !accountButton.visible && !settingsButton.visible && !recordsButton.visible
|
||||||
text: qsTr("Aide")
|
text: qsTr("Aide")
|
||||||
iconSource: AppIcons.question
|
iconSource: AppIcons.question
|
||||||
onClicked: openContextualMenuComponent(helpPageComponent)
|
onClicked: openContextualMenuComponent(helpPageComponent)
|
||||||
|
KeyNavigation.up: visibleChildren.length != 0 ? settingsButtons.getPreviousItem(3) : null
|
||||||
|
KeyNavigation.down: visibleChildren.length != 0 ? settingsButtons.getNextItem(3) : null
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -346,11 +453,15 @@ Item {
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
id: addAccountButton
|
id: addAccountButton
|
||||||
Layout.preferredHeight: 32 * DefaultStyle.dp
|
Layout.preferredHeight: 32 * DefaultStyle.dp
|
||||||
|
Layout.fillWidth: true
|
||||||
visible: SettingsCpp.maxAccount == 0 || SettingsCpp.maxAccount > accountProxy.count
|
visible: SettingsCpp.maxAccount == 0 || SettingsCpp.maxAccount > accountProxy.count
|
||||||
iconSize: 32 * DefaultStyle.dp
|
iconSize: 32 * DefaultStyle.dp
|
||||||
text: qsTr("Ajouter un compte")
|
text: qsTr("Ajouter un compte")
|
||||||
iconSource: AppIcons.plusCircle
|
iconSource: AppIcons.plusCircle
|
||||||
onClicked: mainItem.addAccountRequest()
|
onClicked: mainItem.addAccountRequest()
|
||||||
|
KeyNavigation.up: visibleChildren.length != 0 ? settingsButtons.getPreviousItem(5) : null
|
||||||
|
KeyNavigation.down: visibleChildren.length != 0 ? settingsButtons.getNextItem(5) : null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -361,6 +472,7 @@ Item {
|
||||||
StackLayout {
|
StackLayout {
|
||||||
id: mainStackLayout
|
id: mainStackLayout
|
||||||
currentIndex: tabbar.currentIndex
|
currentIndex: tabbar.currentIndex
|
||||||
|
onActiveFocusChanged: if(activeFocus) children[currentIndex].forceActiveFocus()
|
||||||
CallPage {
|
CallPage {
|
||||||
id: callPage
|
id: callPage
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
||||||
view/Item/Carousel.qml
|
view/Item/Carousel.qml
|
||||||
view/Item/CheckableButton.qml
|
view/Item/CheckableButton.qml
|
||||||
view/Item/CheckBox.qml
|
view/Item/CheckBox.qml
|
||||||
view/Item/SwitchButton.qml
|
|
||||||
view/Item/ComboBox.qml
|
view/Item/ComboBox.qml
|
||||||
view/Item/DesktopPopup.qml
|
view/Item/DesktopPopup.qml
|
||||||
view/Item/Dialog.qml
|
view/Item/Dialog.qml
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Controls.Basic 2.2 as Control
|
import QtQuick.Controls.Basic as Control
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
@ -16,17 +16,19 @@ Control.Button {
|
||||||
property int textWeight: 600 * DefaultStyle.dp
|
property int textWeight: 600 * DefaultStyle.dp
|
||||||
property int radius: 48 * DefaultStyle.dp
|
property int radius: 48 * DefaultStyle.dp
|
||||||
property color textColor: DefaultStyle.grey_0
|
property color textColor: DefaultStyle.grey_0
|
||||||
property bool underline: false
|
property bool underline: mainItem.activeFocus || containsMouse
|
||||||
property bool shadowEnabled: false
|
property bool shadowEnabled: mainItem.activeFocus || containsMouse
|
||||||
property var contentImageColor
|
property var contentImageColor
|
||||||
|
property alias containsMouse: mouseArea.containsMouse
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
activeFocusOnTab: true
|
||||||
// leftPadding: 20 * DefaultStyle.dp
|
// leftPadding: 20 * DefaultStyle.dp
|
||||||
// rightPadding: 20 * DefaultStyle.dp
|
// rightPadding: 20 * DefaultStyle.dp
|
||||||
// topPadding: 11 * DefaultStyle.dp
|
// topPadding: 11 * DefaultStyle.dp
|
||||||
// bottomPadding: 11 * DefaultStyle.dp
|
// bottomPadding: 11 * DefaultStyle.dp
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
|
@ -39,10 +41,10 @@ Control.Button {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
color: mainItem.enabled
|
color: mainItem.enabled
|
||||||
? inversedColors
|
? inversedColors
|
||||||
? mainItem.pressed
|
? mainItem.pressed || mainItem.shadowEnabled
|
||||||
? DefaultStyle.grey_100
|
? DefaultStyle.grey_100
|
||||||
: mainItem.borderColor
|
: mainItem.borderColor
|
||||||
: mainItem.pressed
|
: mainItem.pressed || mainItem.shadowEnabled
|
||||||
? mainItem.pressedColor
|
? mainItem.pressedColor
|
||||||
: mainItem.color
|
: mainItem.color
|
||||||
: mainItem.disabledColor
|
: mainItem.disabledColor
|
||||||
|
|
@ -59,10 +61,12 @@ Control.Button {
|
||||||
enabled: mainItem.shadowEnabled
|
enabled: mainItem.shadowEnabled
|
||||||
anchors.fill: buttonBackground
|
anchors.fill: buttonBackground
|
||||||
source: buttonBackground
|
source: buttonBackground
|
||||||
shadowEnabled: mainItem.shadowEnabled
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
shadowColor: DefaultStyle.grey_1000
|
shadowColor: DefaultStyle.grey_1000
|
||||||
shadowBlur: 1
|
shadowBlur: 1
|
||||||
shadowOpacity: 0.1
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,6 +87,7 @@ Control.Button {
|
||||||
family: DefaultStyle.defaultFont
|
family: DefaultStyle.defaultFont
|
||||||
capitalization: mainItem.capitalization
|
capitalization: mainItem.capitalization
|
||||||
underline: mainItem.underline
|
underline: mainItem.underline
|
||||||
|
bold: mainItem.font.bold
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,6 +98,7 @@ Control.Button {
|
||||||
imageWidth: mainItem.icon.width
|
imageWidth: mainItem.icon.width
|
||||||
imageHeight: mainItem.icon.height
|
imageHeight: mainItem.icon.height
|
||||||
colorizationColor: mainItem.contentImageColor
|
colorizationColor: mainItem.contentImageColor
|
||||||
|
shadowEnabled: mainItem.shadowEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: StackLayout {
|
contentItem: StackLayout {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls as Control
|
import QtQuick.Controls as Control
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
|
||||||
|
|
@ -23,6 +23,8 @@ ListView {
|
||||||
property int currentYear: calendarModel.yearAt(currentIndex)
|
property int currentYear: calendarModel.yearAt(currentIndex)
|
||||||
onCurrentYearChanged: console.log("currentyear", currentYear)
|
onCurrentYearChanged: console.log("currentyear", currentYear)
|
||||||
onCurrentMonthChanged: console.log("current month", currentMonth)
|
onCurrentMonthChanged: console.log("current month", currentMonth)
|
||||||
|
currentIndex: 0
|
||||||
|
keyNavigationEnabled: false
|
||||||
|
|
||||||
model: Control.CalendarModel {
|
model: Control.CalendarModel {
|
||||||
id: calendarModel
|
id: calendarModel
|
||||||
|
|
@ -30,9 +32,13 @@ ListView {
|
||||||
to: UtilsCpp.addYears(new Date(), 5)
|
to: UtilsCpp.addYears(new Date(), 5)
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: ColumnLayout {
|
delegate: FocusScope{
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
height: mainItem.height
|
height: mainItem.height
|
||||||
|
property bool isCurrentIndex: index == mainItem.currentIndex
|
||||||
|
onIsCurrentIndexChanged: if( isCurrentIndex) monthGrid.forceActiveFocus()
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
property int currentMonth: model.month
|
property int currentMonth: model.month
|
||||||
spacing: 18 * DefaultStyle.dp
|
spacing: 18 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -50,6 +56,7 @@ ListView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: previousButton
|
||||||
Layout.preferredWidth: 20 * DefaultStyle.dp
|
Layout.preferredWidth: 20 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 20 * DefaultStyle.dp
|
Layout.preferredHeight: 20 * DefaultStyle.dp
|
||||||
icon.width: width
|
icon.width: width
|
||||||
|
|
@ -59,6 +66,7 @@ ListView {
|
||||||
onClicked: if (mainItem.currentIndex > 0) mainItem.currentIndex = mainItem.currentIndex - 1
|
onClicked: if (mainItem.currentIndex > 0) mainItem.currentIndex = mainItem.currentIndex - 1
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: nextButton
|
||||||
Layout.preferredWidth: 20 * DefaultStyle.dp
|
Layout.preferredWidth: 20 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 20 * DefaultStyle.dp
|
Layout.preferredHeight: 20 * DefaultStyle.dp
|
||||||
icon.width: width
|
icon.width: width
|
||||||
|
|
@ -94,18 +102,63 @@ ListView {
|
||||||
year: model.year
|
year: model.year
|
||||||
month: model.month
|
month: model.month
|
||||||
property var curDate: model.date
|
property var curDate: model.date
|
||||||
onMonthChanged: console.log("cur date changed", month)
|
onMonthChanged: {
|
||||||
|
console.log("cur date changed", month)
|
||||||
|
}
|
||||||
locale: Qt.locale(ConstantsCpp.DefaultLocale)
|
locale: Qt.locale(ConstantsCpp.DefaultLocale)
|
||||||
delegate: Item {
|
delegate: FocusScope {
|
||||||
|
id: focusDay
|
||||||
property bool isSelectedDay: mainItem.selectedDate ? UtilsCpp.datesAreEqual(mainItem.selectedDate, model.date) : false
|
property bool isSelectedDay: mainItem.selectedDate ? UtilsCpp.datesAreEqual(mainItem.selectedDate, model.date) : false
|
||||||
|
property var d: model.date
|
||||||
|
objectName: 'focusDay'
|
||||||
// width: 30 * DefaultStyle.dp
|
// width: 30 * DefaultStyle.dp
|
||||||
// height: 30 * DefaultStyle.dp
|
// height: 30 * DefaultStyle.dp
|
||||||
|
activeFocusOnTab: true
|
||||||
|
focus: index == 0
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
||||||
|
monthGrid.clicked(model.date)
|
||||||
|
event.accepted = true;
|
||||||
|
}else if(event.key == Qt.Key_Left){
|
||||||
|
var previous = nextItemInFocusChain(false)
|
||||||
|
if( previous.objectName != 'focusDay'){
|
||||||
|
previousButton.clicked(undefined)
|
||||||
|
}else{
|
||||||
|
previous.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}else if(event.key == Qt.Key_Right){
|
||||||
|
var next = nextItemInFocusChain()
|
||||||
|
console.log(next.objectName)
|
||||||
|
if( next.objectName != 'focusDay'){
|
||||||
|
nextButton.clicked(undefined)
|
||||||
|
} else {
|
||||||
|
next.forceActiveFocus()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
id: hoveringArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
onPressed: (event) =>{
|
||||||
|
focusDay.forceActiveFocus()
|
||||||
|
event.accepted = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: 30 * DefaultStyle.dp
|
width: 30 * DefaultStyle.dp
|
||||||
height: 30 * DefaultStyle.dp
|
height: 30 * DefaultStyle.dp
|
||||||
radius: 50 * DefaultStyle.dp
|
radius: 50 * DefaultStyle.dp
|
||||||
color: isSelectedDay ? DefaultStyle.main1_500_main : "transparent"
|
color: isSelectedDay ? DefaultStyle.main1_500_main : "transparent"
|
||||||
|
border.color: DefaultStyle.main1_500_main_darker
|
||||||
|
border.width: focusDay.activeFocus || hoveringArea.containsMouse ? 1 : 0
|
||||||
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
@ -130,4 +183,5 @@ ListView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -22,6 +22,7 @@ ComboBox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
popup: Control.Popup {
|
popup: Control.Popup {
|
||||||
|
id: popupItem
|
||||||
y: mainItem.height
|
y: mainItem.height
|
||||||
width: 321 * DefaultStyle.dp
|
width: 321 * DefaultStyle.dp
|
||||||
height: 270 * DefaultStyle.dp
|
height: 270 * DefaultStyle.dp
|
||||||
|
|
@ -30,6 +31,7 @@ ComboBox {
|
||||||
bottomPadding: 24 * DefaultStyle.dp
|
bottomPadding: 24 * DefaultStyle.dp
|
||||||
leftPadding: 21 * DefaultStyle.dp
|
leftPadding: 21 * DefaultStyle.dp
|
||||||
rightPadding: 19 * DefaultStyle.dp
|
rightPadding: 19 * DefaultStyle.dp
|
||||||
|
onOpened: calendar.forceActiveFocus()
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -37,6 +39,8 @@ ComboBox {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
radius: 16 * DefaultStyle.dp
|
radius: 16 * DefaultStyle.dp
|
||||||
|
border.color: DefaultStyle.main1_500_main
|
||||||
|
border.width: calendar.activeFocus? 1 : 0
|
||||||
}
|
}
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
anchors.fill: calendarBg
|
anchors.fill: calendarBg
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,18 @@ import Linphone
|
||||||
import UtilsCpp
|
import UtilsCpp
|
||||||
import SettingsCpp
|
import SettingsCpp
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
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"
|
||||||
property alias searchBar: searchBar
|
property alias searchBar: searchBar
|
||||||
signal callButtonPressed(string address)
|
|
||||||
signal groupCallCreationRequested()
|
|
||||||
property FriendGui selectedContact
|
property FriendGui selectedContact
|
||||||
property NumericPad numPad
|
property NumericPad numPad
|
||||||
|
signal callButtonPressed(string address)
|
||||||
|
signal callSelectedContact()
|
||||||
|
signal groupCallCreationRequested()
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Control.Control {
|
Control.Control {
|
||||||
|
|
@ -33,10 +35,12 @@ Item {
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumWidth: mainItem.width
|
Layout.maximumWidth: mainItem.width
|
||||||
|
focus: true
|
||||||
color: mainItem.searchBarColor
|
color: mainItem.searchBarColor
|
||||||
borderColor: mainItem.searchBarBorderColor
|
borderColor: mainItem.searchBarBorderColor
|
||||||
placeholderText: qsTr("Rechercher un contact")
|
placeholderText: qsTr("Rechercher un contact")
|
||||||
numericPad: mainItem.numPad
|
numericPad: mainItem.numPad
|
||||||
|
KeyNavigation.down: grouCallButton
|
||||||
}
|
}
|
||||||
Control.ScrollView {
|
Control.ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -60,9 +64,13 @@ Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 32 * DefaultStyle.dp
|
spacing: 32 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
|
id: grouCallButton
|
||||||
visible: mainItem.groupCallVisible && !SettingsCpp.disableMeetingsFeature
|
visible: mainItem.groupCallVisible && !SettingsCpp.disableMeetingsFeature
|
||||||
Layout.preferredWidth: 320 * DefaultStyle.dp
|
Layout.preferredWidth: 320 * DefaultStyle.dp
|
||||||
padding: 0
|
padding: 0
|
||||||
|
KeyNavigation.up: searchBar
|
||||||
|
KeyNavigation.down: contactList.count >0 ? contactList : searchList
|
||||||
|
onClicked: mainItem.groupCallCreationRequested()
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
orientation: Gradient.Horizontal
|
orientation: Gradient.Horizontal
|
||||||
|
|
@ -87,6 +95,7 @@ Item {
|
||||||
font {
|
font {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
|
underline: grouCallButton.shadowEnabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -98,7 +107,6 @@ Item {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: mainItem.groupCallCreationRequested()
|
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 18 * DefaultStyle.dp
|
spacing: 18 * DefaultStyle.dp
|
||||||
|
|
@ -120,6 +128,7 @@ Item {
|
||||||
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
searchText: searchBar.text.length === 0 ? "*" : searchBar.text
|
||||||
}
|
}
|
||||||
onSelectedContactChanged: mainItem.selectedContact = selectedContact
|
onSelectedContactChanged: mainItem.selectedContact = selectedContact
|
||||||
|
onClicked: mainItem.callSelectedContact()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -132,6 +141,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ContactsList{
|
ContactsList{
|
||||||
|
id: searchList
|
||||||
contactMenuVisible: false
|
contactMenuVisible: false
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -145,6 +155,7 @@ Item {
|
||||||
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
aggregationFlag: LinphoneEnums.MagicSearchAggregation.Friend
|
||||||
}
|
}
|
||||||
onSelectedContactChanged: mainItem.selectedContact = selectedContact
|
onSelectedContactChanged: mainItem.selectedContact = selectedContact
|
||||||
|
onClicked: mainItem.callSelectedContact()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Controls 2.2 as Control
|
import QtQuick.Controls as Control
|
||||||
import Linphone
|
import Linphone
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
Control.CheckBox {
|
Control.CheckBox {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered
|
||||||
indicator: Rectangle {
|
indicator: Item{
|
||||||
implicitWidth: 20 * DefaultStyle.dp
|
implicitWidth: 20 * DefaultStyle.dp
|
||||||
implicitHeight: 20 * DefaultStyle.dp
|
implicitHeight: 20 * DefaultStyle.dp
|
||||||
x: (parent.width - width) / 2
|
x: (parent.width - width) / 2
|
||||||
y: (parent.height - height) / 2
|
y: (parent.height - height) / 2
|
||||||
|
Rectangle {
|
||||||
|
id: backgroundArea
|
||||||
|
anchors.fill: parent
|
||||||
radius: 3 * DefaultStyle.dp
|
radius: 3 * DefaultStyle.dp
|
||||||
border.color: DefaultStyle.main1_500_main
|
border.color: DefaultStyle.main1_500_main
|
||||||
border.width: 2.2 * DefaultStyle.dp
|
border.width: 2.2 * DefaultStyle.dp
|
||||||
|
|
@ -21,4 +25,16 @@ Control.CheckBox {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: backgroundArea
|
||||||
|
source: backgroundArea
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ Control.ComboBox {
|
||||||
property int weight: 400 * DefaultStyle.dp
|
property int weight: 400 * DefaultStyle.dp
|
||||||
property int leftMargin: 10 * DefaultStyle.dp
|
property int leftMargin: 10 * DefaultStyle.dp
|
||||||
property bool oneLine: false
|
property bool oneLine: false
|
||||||
|
property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered
|
||||||
|
|
||||||
onConstantImageSourceChanged: if (constantImageSource) selectedItemImg.source = constantImageSource
|
onConstantImageSourceChanged: if (constantImageSource) selectedItemImg.source = constantImageSource
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
|
@ -34,11 +35,36 @@ Control.ComboBox {
|
||||||
: ""
|
: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
Keys.onPressed: (event)=>{
|
||||||
anchors.fill: mainItem
|
if(!mainItem.contentItem.activeFocus && (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return)){
|
||||||
|
mainItem.popup.open()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Item{
|
||||||
|
Rectangle {
|
||||||
|
id: buttonBackground
|
||||||
|
anchors.fill: parent
|
||||||
radius: 63 * DefaultStyle.dp
|
radius: 63 * DefaultStyle.dp
|
||||||
color: mainItem.enabled ? DefaultStyle.grey_100 : DefaultStyle.grey_200
|
color: mainItem.enabled ? DefaultStyle.grey_100 : DefaultStyle.grey_200
|
||||||
border.color: mainItem.enabled ? DefaultStyle.grey_200 : DefaultStyle.grey_400
|
border.color: mainItem.enabled
|
||||||
|
? mainItem.activeFocus
|
||||||
|
? DefaultStyle.main1_500_main
|
||||||
|
: DefaultStyle.grey_200
|
||||||
|
: DefaultStyle.grey_400
|
||||||
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: buttonBackground
|
||||||
|
source: buttonBackground
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 0.5
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.1 : 0.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -105,8 +131,12 @@ Control.ComboBox {
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
padding: 1 * DefaultStyle.dp
|
padding: 1 * DefaultStyle.dp
|
||||||
height: Math.min(listView.contentHeight, 300)
|
//height: Math.min(implicitHeight, 300)
|
||||||
|
|
||||||
|
onOpened: {
|
||||||
|
listView.positionViewAtIndex(listView.currentIndex, ListView.Center)
|
||||||
|
listView.forceActiveFocus()
|
||||||
|
}
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
id: listView
|
id: listView
|
||||||
clip: true
|
clip: true
|
||||||
|
|
@ -124,6 +154,14 @@ Control.ComboBox {
|
||||||
y: listView.currentItem? listView.currentItem.y : 0
|
y: listView.currentItem? listView.currentItem.y : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onPressed: (event)=>{
|
||||||
|
if(event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return){
|
||||||
|
event.accepted = true
|
||||||
|
mainItem.currentIndex = listView.currentIndex
|
||||||
|
popup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width:mainItem.width
|
width:mainItem.width
|
||||||
height: mainItem.height
|
height: mainItem.height
|
||||||
|
|
@ -163,6 +201,7 @@ Control.ComboBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -182,9 +221,7 @@ Control.ComboBox {
|
||||||
Control.ScrollIndicator.vertical: Control.ScrollIndicator { }
|
Control.ScrollIndicator.vertical: Control.ScrollIndicator { }
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpened: {
|
|
||||||
listView.positionViewAtIndex(listView.currentIndex, ListView.Center)
|
|
||||||
}
|
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
implicitWidth: mainItem.width
|
implicitWidth: mainItem.width
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ RightPanelLayout {
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 63 * DefaultStyle.dp
|
spacing : 0
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 8 * DefaultStyle.dp
|
spacing: 8 * DefaultStyle.dp
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
@ -78,23 +78,27 @@ RightPanelLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: addPictureButton
|
||||||
visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0
|
visible: !mainItem.contact || mainItem.contact.core.pictureUri.length === 0
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
Layout.preferredHeight: 17 * DefaultStyle.dp
|
Layout.preferredHeight: 17 * DefaultStyle.dp
|
||||||
iconSource: AppIcons.camera
|
iconSource: AppIcons.camera
|
||||||
iconSize: 17 * DefaultStyle.dp
|
iconSize: 17 * DefaultStyle.dp
|
||||||
text: qsTr("Ajouter une image")
|
text: qsTr("Ajouter une image")
|
||||||
|
KeyNavigation.down: editButton.visible ? editButton : givenNameEdit
|
||||||
onClicked: fileDialog.open()
|
onClicked: fileDialog.open()
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: mainItem.contact && mainItem.contact.core.pictureUri.length != 0
|
visible: mainItem.contact && mainItem.contact.core.pictureUri.length != 0
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: editButton
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
Layout.preferredHeight: 17 * DefaultStyle.dp
|
Layout.preferredHeight: 17 * DefaultStyle.dp
|
||||||
iconSource: AppIcons.pencil
|
iconSource: AppIcons.pencil
|
||||||
iconSize: 17 * DefaultStyle.dp
|
iconSize: 17 * DefaultStyle.dp
|
||||||
text: qsTr("Modifier")
|
text: qsTr("Modifier")
|
||||||
|
KeyNavigation.down: givenNameEdit
|
||||||
onClicked: fileDialog.open()
|
onClicked: fileDialog.open()
|
||||||
}
|
}
|
||||||
FileDialog {
|
FileDialog {
|
||||||
|
|
@ -109,11 +113,13 @@ RightPanelLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IconLabelButton {
|
IconLabelButton {
|
||||||
|
id: removeButton
|
||||||
Layout.preferredHeight: 17 * DefaultStyle.dp
|
Layout.preferredHeight: 17 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
iconSize: 17 * DefaultStyle.dp
|
iconSize: 17 * DefaultStyle.dp
|
||||||
iconSource: AppIcons.trashCan
|
iconSource: AppIcons.trashCan
|
||||||
text: qsTr("Supprimer")
|
text: qsTr("Supprimer")
|
||||||
|
KeyNavigation.down: givenNameEdit
|
||||||
onClicked: mainItem.contact.core.pictureUri = ""
|
onClicked: mainItem.contact.core.pictureUri = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -122,8 +128,8 @@ RightPanelLayout {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: 50 * DefaultStyle.dp
|
Layout.topMargin: 63 * DefaultStyle.dp
|
||||||
Layout.bottomMargin: 50 * DefaultStyle.dp
|
Layout.bottomMargin: 78 * DefaultStyle.dp
|
||||||
spacing: 100 * DefaultStyle.dp
|
spacing: 100 * DefaultStyle.dp
|
||||||
Flickable {
|
Flickable {
|
||||||
Layout.preferredWidth: contentWidth
|
Layout.preferredWidth: contentWidth
|
||||||
|
|
@ -146,30 +152,49 @@ RightPanelLayout {
|
||||||
onTextEdited: contact.core.givenName = text
|
onTextEdited: contact.core.givenName = text
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
backgroundBorderColor: givenName.errorTextItem.opacity != 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
|
backgroundBorderColor: givenName.errorTextItem.opacity != 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200
|
||||||
|
KeyNavigation.up: editButton.visible ? editButton : addPictureButton
|
||||||
|
KeyNavigation.down: nameTextField
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FormItemLayout {
|
FormItemLayout {
|
||||||
label: qsTr("Nom")
|
label: qsTr("Nom")
|
||||||
contentItem: TextField {
|
contentItem: TextField {
|
||||||
|
id: nameTextField
|
||||||
initialText: contact.core.familyName
|
initialText: contact.core.familyName
|
||||||
onTextEdited: contact.core.familyName = text
|
onTextEdited: contact.core.familyName = text
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
|
KeyNavigation.up: givenNameEdit
|
||||||
|
KeyNavigation.down: companyTextField
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FormItemLayout {
|
FormItemLayout {
|
||||||
label: qsTr("Entreprise")
|
label: qsTr("Entreprise")
|
||||||
contentItem: TextField {
|
contentItem: TextField {
|
||||||
|
id: companyTextField
|
||||||
initialText: contact.core.organization
|
initialText: contact.core.organization
|
||||||
onTextEdited: contact.core.organization = text
|
onTextEdited: contact.core.organization = text
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
|
KeyNavigation.up: nameTextField
|
||||||
|
KeyNavigation.down: jobTextField
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FormItemLayout {
|
FormItemLayout {
|
||||||
label: qsTr("Fonction")
|
label: qsTr("Fonction")
|
||||||
contentItem: TextField {
|
contentItem: TextField {
|
||||||
|
id: jobTextField
|
||||||
initialText: contact.core.job
|
initialText: contact.core.job
|
||||||
onTextEdited: contact.core.job = text
|
onTextEdited: contact.core.job = text
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
|
KeyNavigation.up: companyTextField
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Down){
|
||||||
|
if(addressesList.count > 0)
|
||||||
|
addressesList.itemAt(0).forceActiveFocus()
|
||||||
|
else
|
||||||
|
newAddressTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item{Layout.fillHeight: true}
|
Item{Layout.fillHeight: true}
|
||||||
|
|
@ -218,8 +243,25 @@ RightPanelLayout {
|
||||||
delegate: FormItemLayout {
|
delegate: FormItemLayout {
|
||||||
label: modelData.label
|
label: modelData.label
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
id: addressLayout
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
function updateFocus(event){
|
||||||
|
if(event.key == Qt.Key_Up){
|
||||||
|
if(index - 1 >=0 )
|
||||||
|
addressesList.itemAt(index - 1).forceActiveFocus()
|
||||||
|
else
|
||||||
|
jobTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}else if(event.key == Qt.Key_Down){
|
||||||
|
if(index + 1 < addressesList.count)
|
||||||
|
addressesList.itemAt(index+1).forceActiveFocus()
|
||||||
|
else
|
||||||
|
newAddressTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
id: addressTextField
|
||||||
onTextEdited: {
|
onTextEdited: {
|
||||||
if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text)
|
if (text.length != 0) mainItem.contact.core.setAddressAt(index, qsTr("Adresse SIP"), text)
|
||||||
}
|
}
|
||||||
|
|
@ -228,8 +270,12 @@ RightPanelLayout {
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
Layout.preferredHeight: height
|
Layout.preferredHeight: height
|
||||||
|
focus: true
|
||||||
|
KeyNavigation.right: removeAddressButton
|
||||||
|
Keys.onPressed: (event) => addressLayout.updateFocus(event)
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: removeAddressButton
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
@ -239,6 +285,8 @@ RightPanelLayout {
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
KeyNavigation.left: addressTextField
|
||||||
|
Keys.onPressed: (event) => addressLayout.updateFocus(event)
|
||||||
onClicked: mainItem.contact.core.removeAddress(index)
|
onClicked: mainItem.contact.core.removeAddress(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -250,12 +298,28 @@ RightPanelLayout {
|
||||||
FormItemLayout {
|
FormItemLayout {
|
||||||
label: qsTr("Adresse SIP")
|
label: qsTr("Adresse SIP")
|
||||||
contentItem: TextField {
|
contentItem: TextField {
|
||||||
|
id: newAddressTextField
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
Component.onCompleted: text = "sip:"
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Up){
|
||||||
|
if(addressesList.count > 0 )
|
||||||
|
addressesList.itemAt(addressesList.count - 1).forceActiveFocus()
|
||||||
|
else
|
||||||
|
jobTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}else if(event.key == Qt.Key_Down){
|
||||||
|
if(phoneNumberList.count > 0)
|
||||||
|
phoneNumberList.itemAt(0).forceActiveFocus()
|
||||||
|
else
|
||||||
|
phoneNumberInputTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
if (text.length != 0) mainItem.contact.core.appendAddress(text)
|
if (text.length != 0) mainItem.contact.core.appendAddress(text)
|
||||||
text = "sip:"
|
text = "sip:"
|
||||||
}
|
}
|
||||||
|
Component.onCompleted: text = "sip:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -272,8 +336,25 @@ RightPanelLayout {
|
||||||
delegate: FormItemLayout {
|
delegate: FormItemLayout {
|
||||||
label: modelData.label
|
label: modelData.label
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
id: phoneNumberLayout
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
function updateFocus(event){
|
||||||
|
if(event.key == Qt.Key_Up){
|
||||||
|
if(index - 1 >=0 )
|
||||||
|
phoneNumberList.itemAt(index - 1).forceActiveFocus()
|
||||||
|
else
|
||||||
|
newAddressTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}else if(event.key == Qt.Key_Down){
|
||||||
|
if(index + 1 < phoneNumberList.count)
|
||||||
|
addressesList.phoneNumberList(index+1).forceActiveFocus()
|
||||||
|
else
|
||||||
|
phoneNumberInputTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
id: phoneTextField
|
||||||
initialText: modelData.address
|
initialText: modelData.address
|
||||||
onTextEdited: {
|
onTextEdited: {
|
||||||
if (text.length != 0) mainItem.contact.core.setPhoneNumberAt(index, qsTr("Téléphone"), text)
|
if (text.length != 0) mainItem.contact.core.setPhoneNumberAt(index, qsTr("Téléphone"), text)
|
||||||
|
|
@ -281,8 +362,12 @@ RightPanelLayout {
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
Layout.preferredHeight: height
|
Layout.preferredHeight: height
|
||||||
|
focus: true
|
||||||
|
KeyNavigation.right: removePhoneButton
|
||||||
|
Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event)
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: removePhoneButton
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
@ -292,6 +377,8 @@ RightPanelLayout {
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
KeyNavigation.left: phoneTextField
|
||||||
|
Keys.onPressed: (event) => phoneNumberLayout.updateFocus(event)
|
||||||
onClicked: mainItem.contact.core.removePhoneNumber(index)
|
onClicked: mainItem.contact.core.removePhoneNumber(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -304,7 +391,23 @@ RightPanelLayout {
|
||||||
id: phoneNumberInput
|
id: phoneNumberInput
|
||||||
label: qsTr("Phone")
|
label: qsTr("Phone")
|
||||||
contentItem: TextField {
|
contentItem: TextField {
|
||||||
|
id: phoneNumberInputTextField
|
||||||
backgroundColor: DefaultStyle.grey_0
|
backgroundColor: DefaultStyle.grey_0
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Up){
|
||||||
|
if(phoneNumberList.count > 0 )
|
||||||
|
phoneNumberList.itemAt(phoneNumberList.count - 1).forceActiveFocus()
|
||||||
|
else
|
||||||
|
newAddressTextField.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}else if(event.key == Qt.Key_Down){
|
||||||
|
if(saveButton.enabled)
|
||||||
|
saveButton.forceActiveFocus()
|
||||||
|
else
|
||||||
|
givenNameEdit.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
if (text.length != 0) mainItem.contact.core.appendPhoneNumber(phoneNumberInput.label, text)
|
if (text.length != 0) mainItem.contact.core.appendPhoneNumber(phoneNumberInput.label, text)
|
||||||
text = ""
|
text = ""
|
||||||
|
|
@ -328,6 +431,7 @@ RightPanelLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
id: saveButton
|
||||||
Layout.bottomMargin: 100 * DefaultStyle.dp
|
Layout.bottomMargin: 100 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 165 * DefaultStyle.dp
|
Layout.preferredWidth: 165 * DefaultStyle.dp
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
@ -337,6 +441,8 @@ RightPanelLayout {
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
topPadding: 11 * DefaultStyle.dp
|
topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
|
KeyNavigation.up: phoneNumberInputTextField
|
||||||
|
KeyNavigation.down: givenNameEdit
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (givenNameEdit.text.length === 0 || (addressesList.count === 0 && phoneNumberList.count === 0)) {
|
if (givenNameEdit.text.length === 0 || (addressesList.count === 0 && phoneNumberList.count === 0)) {
|
||||||
if (givenNameEdit.text.length === 0) givenName.errorMessage = qsTr("Veuillez saisir un prénom")
|
if (givenNameEdit.text.length === 0) givenName.errorMessage = qsTr("Veuillez saisir un prénom")
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ ListView {
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
visible: contentHeight > 0
|
visible: contentHeight > 0
|
||||||
clip: true
|
clip: true
|
||||||
|
//keyNavigationWraps: true
|
||||||
// rightMargin: 5 * DefaultStyle.dp
|
// rightMargin: 5 * DefaultStyle.dp
|
||||||
|
|
||||||
property string searchBarText
|
property string searchBarText
|
||||||
|
|
@ -47,6 +48,7 @@ ListView {
|
||||||
signal contactStarredChanged()
|
signal contactStarredChanged()
|
||||||
signal contactDeletionRequested(FriendGui contact)
|
signal contactDeletionRequested(FriendGui contact)
|
||||||
signal contactAddedToSelection()
|
signal contactAddedToSelection()
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
function selectContact(address) {
|
function selectContact(address) {
|
||||||
var index = magicSearchProxy.findFriendIndexByAddress(address)
|
var index = magicSearchProxy.findFriendIndexByAddress(address)
|
||||||
|
|
@ -69,9 +71,11 @@ ListView {
|
||||||
selectedContacts.splice(indexInSelection, 1)
|
selectedContacts.splice(indexInSelection, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onActiveFocusChanged: if(activeFocus && (!footerItem || !footerItem.activeFocus)) {
|
||||||
|
currentIndex = 0
|
||||||
|
}else {
|
||||||
|
currentIndex = -1
|
||||||
|
}
|
||||||
model: MagicSearchProxy {
|
model: MagicSearchProxy {
|
||||||
id: magicSearchProxy
|
id: magicSearchProxy
|
||||||
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
searchText: searchBarText.length === 0 ? "*" : searchBarText
|
||||||
|
|
@ -88,8 +92,12 @@ ListView {
|
||||||
// anchors.bottom: parent.bottom
|
// anchors.bottom: parent.bottom
|
||||||
// anchors.right: parent.right
|
// anchors.right: parent.right
|
||||||
}
|
}
|
||||||
|
Keys.onPressed: (event)=>{
|
||||||
delegate: Item {
|
if(event.key == Qt.Key_Tab && !mainItem.itemAtIndex(mainItem.currentIndex).activeFocus){
|
||||||
|
mainItem.itemAtIndex(mainItem.currentIndex).forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delegate: FocusScope {
|
||||||
id: itemDelegate
|
id: itemDelegate
|
||||||
height: display ? 56 * DefaultStyle.dp : 0
|
height: display ? 56 * DefaultStyle.dp : 0
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
|
|
@ -163,14 +171,17 @@ ListView {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: 10 * DefaultStyle.dp // TODO : change when mockup ready
|
spacing: 10 * DefaultStyle.dp // TODO : change when mockup ready
|
||||||
RowLayout{
|
RowLayout{
|
||||||
|
id: actionButtons
|
||||||
visible: mainItem.actionLayoutVisible
|
visible: mainItem.actionLayoutVisible
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
|
id: callButton
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.phone
|
icon.source: AppIcons.phone
|
||||||
|
focus: visible
|
||||||
contentImageColor: DefaultStyle.main2_500main
|
contentImageColor: DefaultStyle.main2_500main
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -178,19 +189,25 @@ ListView {
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
}
|
}
|
||||||
onClicked: UtilsCpp.createCall(modelData.core.defaultAddress)
|
onClicked: UtilsCpp.createCall(modelData.core.defaultAddress)
|
||||||
|
KeyNavigation.right: chatButton
|
||||||
|
KeyNavigation.left: chatButton
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: chatButton
|
||||||
Layout.preferredWidth: 45 * DefaultStyle.dp
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 45 * DefaultStyle.dp
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.chatTeardropText
|
icon.source: AppIcons.chatTeardropText
|
||||||
|
focus: visible && !callButton.visible
|
||||||
contentImageColor: DefaultStyle.main2_500main
|
contentImageColor: DefaultStyle.main2_500main
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
}
|
}
|
||||||
|
KeyNavigation.right: callButton
|
||||||
|
KeyNavigation.left: callButton
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PopupButton {
|
PopupButton {
|
||||||
|
|
@ -268,14 +285,21 @@ ListView {
|
||||||
height: mainItem.height
|
height: mainItem.height
|
||||||
acceptedButtons: Qt.AllButtons
|
acceptedButtons: Qt.AllButtons
|
||||||
z: -1
|
z: -1
|
||||||
|
focus: !actionButtons.visible
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: contactArea
|
anchors.fill: contactArea
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
color: DefaultStyle.main2_100
|
color: DefaultStyle.main2_100
|
||||||
visible: contactArea.containsMouse || friendPopup.hovered || (!mainItem.multiSelectionEnabled && mainItem.currentIndex === index)
|
visible: contactArea.containsMouse || friendPopup.hovered || mainItem.currentIndex === index
|
||||||
|
}
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
||||||
|
contactArea.clicked(undefined)
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onClicked: (mouse) => {
|
onClicked: (mouse) => {
|
||||||
if (mouse.button == Qt.RightButton) {
|
if (mouse && mouse.button == Qt.RightButton) {
|
||||||
friendPopup.open()
|
friendPopup.open()
|
||||||
} else {
|
} else {
|
||||||
mainItem.currentIndex = -1
|
mainItem.currentIndex = -1
|
||||||
|
|
@ -289,6 +313,7 @@ ListView {
|
||||||
mainItem.removeContactFromSelection(indexInSelection, 1)
|
mainItem.removeContactFromSelection(indexInSelection, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mainItem.clicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,20 @@ Popup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: FocusScope{
|
||||||
|
height: contentLayout.implicitHeight
|
||||||
|
width: contentLayout.implicitWidth
|
||||||
|
onVisibleChanged: {
|
||||||
|
if(visible) forceActiveFocus()
|
||||||
|
}
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(visible && event.key == Qt.Key_Escape){
|
||||||
|
mainItem.close()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
spacing: 20 * DefaultStyle.dp
|
spacing: 20 * DefaultStyle.dp
|
||||||
Text{
|
Text{
|
||||||
id: titleText
|
id: titleText
|
||||||
|
|
@ -131,6 +144,7 @@ Popup {
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
topPadding: 11 * DefaultStyle.dp
|
topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
|
focus: !firstButtonAccept
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(firstButtonAccept)
|
if(firstButtonAccept)
|
||||||
mainItem.accepted()
|
mainItem.accepted()
|
||||||
|
|
@ -138,6 +152,8 @@ Popup {
|
||||||
mainItem.rejected()
|
mainItem.rejected()
|
||||||
mainItem.close()
|
mainItem.close()
|
||||||
}
|
}
|
||||||
|
KeyNavigation.left: secondButtonId
|
||||||
|
KeyNavigation.right: secondButtonId
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
id: secondButtonId
|
id: secondButtonId
|
||||||
|
|
@ -147,6 +163,7 @@ Popup {
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
topPadding: 11 * DefaultStyle.dp
|
topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
|
focus: !secondButtonAccept
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(secondButtonAccept)
|
if(secondButtonAccept)
|
||||||
mainItem.accepted()
|
mainItem.accepted()
|
||||||
|
|
@ -154,6 +171,9 @@ Popup {
|
||||||
mainItem.rejected()
|
mainItem.rejected()
|
||||||
mainItem.close()
|
mainItem.close()
|
||||||
}
|
}
|
||||||
|
KeyNavigation.left: firstButtonId
|
||||||
|
KeyNavigation.right: firstButtonId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ Loader {
|
||||||
property int imageWidth: width
|
property int imageWidth: width
|
||||||
property int imageHeight: height
|
property int imageHeight: height
|
||||||
property bool useColor: colorizationColor != undefined
|
property bool useColor: colorizationColor != undefined
|
||||||
|
property bool shadowEnabled: false
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
|
|
@ -49,5 +50,34 @@ Loader {
|
||||||
colorizationColor: effectEnabled && mainItem.colorizationColor ? mainItem.colorizationColor : 'black'
|
colorizationColor: effectEnabled && mainItem.colorizationColor ? mainItem.colorizationColor : 'black'
|
||||||
colorization: effectEnabled ? 1.0: 0.0
|
colorization: effectEnabled ? 1.0: 0.0
|
||||||
}
|
}
|
||||||
|
/* Alernative to shadow for no blackcolors
|
||||||
|
MultiEffect {
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
source: image
|
||||||
|
width: image.width
|
||||||
|
height: image.height
|
||||||
|
x: image.x
|
||||||
|
y: image.y + 6
|
||||||
|
z: -1
|
||||||
|
blurEnabled: true
|
||||||
|
blurMax: 12
|
||||||
|
blur: 1.0
|
||||||
|
contrast: -1.0
|
||||||
|
brightness: 1.0
|
||||||
|
colorizationColor: DefaultStyle.grey_400
|
||||||
|
colorization: 1.0
|
||||||
|
}*/
|
||||||
|
MultiEffect {
|
||||||
|
id: shadow
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: image
|
||||||
|
source: image
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730?
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 0
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.7 : 0.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,11 +139,13 @@ ColumnLayout {
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequences: ["Return", "Enter"]
|
sequences: ["Return", "Enter"]
|
||||||
onActivated: connectionButton.trigger()
|
onActivated: if(passwordEdit.activeFocus) connectionButton.trigger()
|
||||||
|
else if( usernameEdit.activeFocus) passwordEdit.forceActiveFocus()
|
||||||
}
|
}
|
||||||
onPressed: connectionButton.trigger()
|
onPressed: connectionButton.trigger()
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: forgottenButton
|
||||||
background: Item {
|
background: Item {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +153,7 @@ ColumnLayout {
|
||||||
color: DefaultStyle.main2_500main
|
color: DefaultStyle.main2_500main
|
||||||
text: qsTr("Mot de passe oublié ?")
|
text: qsTr("Mot de passe oublié ?")
|
||||||
font{
|
font{
|
||||||
underline: true
|
underline: forgottenButton.underline
|
||||||
pixelSize: 13 * DefaultStyle.dp
|
pixelSize: 13 * DefaultStyle.dp
|
||||||
weight: 600 * DefaultStyle.dp
|
weight: 600 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,18 @@ MouseArea {
|
||||||
property string title
|
property string title
|
||||||
property string subTitle
|
property string subTitle
|
||||||
property int iconSize: 32 * DefaultStyle.dp
|
property int iconSize: 32 * DefaultStyle.dp
|
||||||
|
property bool shadowEnabled: containsMouse || activeFocus
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
width: content.implicitWidth
|
width: content.implicitWidth
|
||||||
height: content.implicitHeight
|
height: content.implicitHeight
|
||||||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
activeFocusOnTab: true
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return){
|
||||||
|
mainItem.clicked(undefined)
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: content
|
id: content
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
@ -48,4 +56,15 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: content
|
||||||
|
source: content
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
MouseArea {
|
Item{
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property string iconSource
|
property string iconSource
|
||||||
property string text
|
property string text
|
||||||
|
|
@ -11,9 +11,50 @@ MouseArea {
|
||||||
property int iconSize: 17 * DefaultStyle.dp
|
property int iconSize: 17 * DefaultStyle.dp
|
||||||
property int textSize: 14 * DefaultStyle.dp
|
property int textSize: 14 * DefaultStyle.dp
|
||||||
property int textWeight: 400 * DefaultStyle.dp
|
property int textWeight: 400 * DefaultStyle.dp
|
||||||
|
property color backgroundColor: DefaultStyle.grey_0
|
||||||
|
property color backgroundPressedColor: DefaultStyle.main2_100
|
||||||
|
property int radius: 5 * DefaultStyle.dp
|
||||||
|
property bool shadowEnabled: mainItem.activeFocus// || containsMouse
|
||||||
|
property alias containsMouse: mouseArea.containsMouse
|
||||||
|
|
||||||
|
signal clicked(var mouse)
|
||||||
|
|
||||||
|
implicitWidth: content.implicitWidth
|
||||||
|
activeFocusOnTab: true
|
||||||
|
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
||||||
|
mainItem.clicked(undefined)
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle{
|
||||||
|
anchors.fill: parent
|
||||||
|
id: buttonBackground
|
||||||
|
color: mainItem.shadowEnabled ? mainItem.backgroundPressedColor : mainItem.backgroundColor
|
||||||
|
radius: mainItem.radius
|
||||||
|
}/*
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: buttonBackground
|
||||||
|
source: buttonBackground
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}*/
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
width: content.implicitWidth
|
||||||
|
height: mainItem.height
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
width: content.implicitWidth
|
|
||||||
|
onClicked: function(mouse){mainItem.clicked(mouse)}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: content
|
id: content
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
@ -36,4 +77,5 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as Control
|
import QtQuick.Controls as Control
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Effects
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
Rectangle {
|
Item {
|
||||||
|
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
|
||||||
height: visible ? 50 * DefaultStyle.dp : 0
|
height: visible ? 50 * DefaultStyle.dp : 0
|
||||||
|
|
@ -13,10 +13,17 @@ Rectangle {
|
||||||
|
|
||||||
property string titleText
|
property string titleText
|
||||||
property bool isSelected: false
|
property bool isSelected: false
|
||||||
|
property bool shadowEnabled: mainItem.activeFocus || mouseArea.containsMouse
|
||||||
|
|
||||||
signal selected()
|
signal selected()
|
||||||
|
|
||||||
|
Keys.onPressed: (event)=>{
|
||||||
|
if(event.key == Qt.Key_Space || event.key == Qt.Key_Return || event.key == Qt.Key_Enter){
|
||||||
|
mainItem.selected()
|
||||||
|
}
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -24,7 +31,7 @@ Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.main2_200
|
color: DefaultStyle.main2_200
|
||||||
radius: 35 * DefaultStyle.dp
|
radius: 35 * DefaultStyle.dp
|
||||||
visible: parent.containsMouse || isSelected
|
visible: parent.containsMouse || isSelected || mainItem.shadowEnabled
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: backgroundRightFiller
|
id: backgroundRightFiller
|
||||||
|
|
@ -34,6 +41,17 @@ Rectangle {
|
||||||
height: 50 * DefaultStyle.dp
|
height: 50 * DefaultStyle.dp
|
||||||
visible: parent.containsMouse || isSelected
|
visible: parent.containsMouse || isSelected
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: background
|
||||||
|
source: background
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.selected()
|
mainItem.selected()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ ListView {
|
||||||
property: '$sectionMonth'
|
property: '$sectionMonth'
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: FocusScope {
|
||||||
id: itemDelegate
|
id: itemDelegate
|
||||||
height: 63 * DefaultStyle.dp + topOffset
|
height: 63 * DefaultStyle.dp + topOffset
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
|
|
@ -75,6 +75,7 @@ ListView {
|
||||||
|
|
||||||
property var haveModel: $modelData && $modelData.core.haveModel || false
|
property var haveModel: $modelData && $modelData.core.haveModel || false
|
||||||
|
|
||||||
|
|
||||||
RowLayout{
|
RowLayout{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin:parent.topOffset
|
anchors.topMargin:parent.topOffset
|
||||||
|
|
@ -138,13 +139,14 @@ ListView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: 5 // margin to avoid clipping shadows at right
|
anchors.rightMargin: 5 // margin to avoid clipping shadows at right
|
||||||
radius: 10 * DefaultStyle.dp
|
radius: 10 * DefaultStyle.dp
|
||||||
visible: itemDelegate.haveModel
|
visible: itemDelegate.haveModel || itemDelegate.activeFocus
|
||||||
color: mainItem.currentIndex === index ? DefaultStyle.main2_200 : DefaultStyle.grey_0
|
color: mainItem.currentIndex === index ? DefaultStyle.main2_200 : DefaultStyle.grey_0
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 15 * DefaultStyle.dp
|
anchors.leftMargin: 15 * DefaultStyle.dp
|
||||||
spacing: 2 * DefaultStyle.dp
|
spacing: 2 * DefaultStyle.dp
|
||||||
|
visible: itemDelegate.haveModel
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8 * DefaultStyle.dp
|
spacing: 8 * DefaultStyle.dp
|
||||||
Image {
|
Image {
|
||||||
|
|
@ -200,6 +202,7 @@ ListView {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.currentIndex = index
|
mainItem.currentIndex = index
|
||||||
mainItem.conferenceSelected($modelData)
|
mainItem.conferenceSelected($modelData)
|
||||||
|
itemDelegate.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,8 @@ import Linphone
|
||||||
import UtilsCpp
|
import UtilsCpp
|
||||||
import SettingsCpp
|
import SettingsCpp
|
||||||
|
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
id: mainItem
|
id: mainItem
|
||||||
spacing: 8 * DefaultStyle.dp
|
|
||||||
property bool isCreation
|
property bool isCreation
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
signal addParticipantsRequested()
|
signal addParticipantsRequested()
|
||||||
|
|
@ -59,6 +58,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: mainItem.isCreation && !SettingsCpp.disableBroadcastFeature
|
visible: mainItem.isCreation && !SettingsCpp.disableBroadcastFeature
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
|
|
@ -100,8 +100,10 @@ ColumnLayout {
|
||||||
pixelSize: 20 * DefaultStyle.dp
|
pixelSize: 20 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
focus: true
|
||||||
|
onActiveFocusChanged: if(activeFocus) selectAll()
|
||||||
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
onEditingFinished: mainItem.conferenceInfoGui.core.subject = text
|
||||||
|
KeyNavigation.down: allDaySwitch
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -127,11 +129,13 @@ ColumnLayout {
|
||||||
Switch {
|
Switch {
|
||||||
id: allDaySwitch
|
id: allDaySwitch
|
||||||
readonly property bool isAllDay: position === 1
|
readonly property bool isAllDay: position === 1
|
||||||
Component.onCompleted: if (mainItem.conferenceInfoGui.core.isAllDayConf()) toggle
|
KeyNavigation.up: confTitle
|
||||||
|
KeyNavigation.down: startDate
|
||||||
onPositionChanged: if (position === 1) {
|
onPositionChanged: if (position === 1) {
|
||||||
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, 0, 0)
|
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, 0, 0)
|
||||||
mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, 23, 59)
|
mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, 23, 59)
|
||||||
}
|
}
|
||||||
|
Component.onCompleted: if (mainItem.conferenceInfoGui.core.isAllDayConf()) toggle
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -143,6 +147,10 @@ ColumnLayout {
|
||||||
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 200 * DefaultStyle.dp
|
Layout.preferredWidth: 200 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
|
KeyNavigation.up: allDaySwitch
|
||||||
|
KeyNavigation.down: endDate
|
||||||
|
KeyNavigation.left: startHour
|
||||||
|
KeyNavigation.right: startHour
|
||||||
onSelectedDateChanged: {
|
onSelectedDateChanged: {
|
||||||
if (!selectedDate || selectedDate == mainItem.conferenceInfoGui.core.dateTime) return
|
if (!selectedDate || selectedDate == mainItem.conferenceInfoGui.core.dateTime) return
|
||||||
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.isAllDay ? 0 : startHour.selectedHour, allDaySwitch.isAllDay ? 0 : startHour.selectedMin)
|
mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.isAllDay ? 0 : startHour.selectedHour, allDaySwitch.isAllDay ? 0 : startHour.selectedMin)
|
||||||
|
|
@ -163,6 +171,10 @@ ColumnLayout {
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
background.visible: mainItem.isCreation
|
background.visible: mainItem.isCreation
|
||||||
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
contentText.font.weight: (isCreation ? 700 : 400) * DefaultStyle.dp
|
||||||
|
KeyNavigation.up: allDaySwitch
|
||||||
|
KeyNavigation.down: endDate
|
||||||
|
KeyNavigation.left: startDate
|
||||||
|
KeyNavigation.right: startDate
|
||||||
onSelectedHourChanged: {
|
onSelectedHourChanged: {
|
||||||
mainItem.conferenceInfoGui.core.dateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
mainItem.conferenceInfoGui.core.dateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
endDate.calendar.selectedDate = UtilsCpp.addSecs(selectedDateTime, 3600)
|
endDate.calendar.selectedDate = UtilsCpp.addSecs(selectedDateTime, 3600)
|
||||||
|
|
@ -200,99 +212,6 @@ ColumnLayout {
|
||||||
onSelectedMinChanged: mainItem.conferenceInfoGui.core.endDateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
onSelectedMinChanged: mainItem.conferenceInfoGui.core.endDateTime = selectedDateTime//UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// RowLayout {
|
|
||||||
// EffectImage {
|
|
||||||
// imageSource: AppIcons.clock
|
|
||||||
// colorizationColor: DefaultStyle.main2_600
|
|
||||||
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// CalendarComboBox {
|
|
||||||
// id: startDate
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
// background.visible: mainItem.isCreation
|
|
||||||
// contentText.font.weight: (mainItem.isCreation ? 700 : 400) * DefaultStyle.dp
|
|
||||||
// onSelectedDateChanged: {
|
|
||||||
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.position === 1 ? 0 : startHour.selectedHour, allDaySwitch.position === 1 ? 0 : startHour.selectedMin)
|
|
||||||
// if (allDaySwitch.position === 0) endDate.calendar.selectedDate = UtilsCpp.addSecs(selectedDate, 3600)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// RowLayout {
|
|
||||||
// Item {
|
|
||||||
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// RowLayout {
|
|
||||||
// visible: allDaySwitch.position === 0
|
|
||||||
// TimeComboBox {
|
|
||||||
// id: startHour
|
|
||||||
// onSelectedHourChanged: {
|
|
||||||
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// endHour.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 23 : selectedHour + 1, selectedHour == 23 ? 59 : selectedMin), "hh:mm")
|
|
||||||
// }
|
|
||||||
// onSelectedMinChanged: {
|
|
||||||
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// endHour.selectedTimeString = Qt.formatDateTime(UtilsCpp.createDateTime(new Date(), selectedHour == 23 ? 23 : selectedHour + 1, selectedHour == 23 ? 59 : selectedMin), "hh:mm")
|
|
||||||
// }
|
|
||||||
// Layout.preferredWidth: 94 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// TimeComboBox {
|
|
||||||
// id: endHour
|
|
||||||
// // property date startTime: new Date()
|
|
||||||
// onSelectedHourChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// onSelectedMinChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, selectedHour, selectedMin)
|
|
||||||
// Layout.preferredWidth: 94 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// Item {
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
// }
|
|
||||||
// Text {
|
|
||||||
// property int durationSec: UtilsCpp.secsTo(startHour.selectedTime, endHour.selectedTime)
|
|
||||||
// property int hour: durationSec/3600
|
|
||||||
// property int min: (durationSec - hour*3600)/60
|
|
||||||
// text: (hour > 0 ? hour + "h" : "") + (min > 0 ? min + "mn" : "")
|
|
||||||
// font {
|
|
||||||
// pixelSize: 14 * DefaultStyle.dp
|
|
||||||
// weight: 700 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// CalendarComboBox {
|
|
||||||
// id: endDate
|
|
||||||
// visible: allDaySwitch.position === 1
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
// // Layout.fillHeight: false
|
|
||||||
// contentText.font.weight: (mainItem.isCreation ? 700 : 400) * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 30 * DefaultStyle.dp
|
|
||||||
// onSelectedDateChanged: mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(selectedDate, allDaySwitch.position === 1 ? 23 : endHour.selectedHour, allDaySwitch.position === 1 ? 59 : endHour.selectedMin)
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// RowLayout {
|
|
||||||
// Item {
|
|
||||||
// Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
||||||
// Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
||||||
// }
|
|
||||||
// RowLayout {
|
|
||||||
// Switch {
|
|
||||||
// id: allDaySwitch
|
|
||||||
// text: qsTr("Toute la journée")
|
|
||||||
// onPositionChanged: {
|
|
||||||
// if (position == 1) {
|
|
||||||
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, 0, 0)
|
|
||||||
// mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, 23, 59)
|
|
||||||
// } else {
|
|
||||||
// mainItem.conferenceInfoGui.core.dateTime = UtilsCpp.createDateTime(startDate.selectedDate, startHour.selectedHour, startHour.selectedMin)
|
|
||||||
// mainItem.conferenceInfoGui.core.endDateTime = UtilsCpp.createDateTime(endDate.selectedDate, endHour.selectedHour, endHour.selectedMin)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: timeZoneCbox
|
id: timeZoneCbox
|
||||||
|
|
@ -316,33 +235,6 @@ ColumnLayout {
|
||||||
mainItem.conferenceInfoGui.core.timeZoneModel = timeZoneCbox.model.data(modelIndex, Qt.DisplayRole + 1)
|
mainItem.conferenceInfoGui.core.timeZoneModel = timeZoneCbox.model.data(modelIndex, Qt.DisplayRole + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ComboBox {
|
|
||||||
// id: repeaterCbox
|
|
||||||
// enabled: false
|
|
||||||
// Component.onCompleted: console.log("TODO : handle conf repetition")
|
|
||||||
// constantImageSource: AppIcons.reloadArrow
|
|
||||||
// Layout.fillWidth: true
|
|
||||||
// Layout.preferredHeight: height
|
|
||||||
// height: 30 * DefaultStyle.dp
|
|
||||||
// width: 307 * DefaultStyle.dp
|
|
||||||
// weight: 700 * DefaultStyle.dp
|
|
||||||
// leftMargin: 0
|
|
||||||
// currentIndex: 0
|
|
||||||
// background: Rectangle {
|
|
||||||
// visible: parent.hovered || parent.down
|
|
||||||
// anchors.fill: parent
|
|
||||||
// color: DefaultStyle.grey_100
|
|
||||||
// }
|
|
||||||
// model: [
|
|
||||||
// {text: qsTr("Une fois")},
|
|
||||||
// {text: qsTr("Tous les jours")},
|
|
||||||
// {text: qsTr("Tous les jours de la semaine (Lun-Ven)")},
|
|
||||||
// {text: qsTr("Toutes les semaines")},
|
|
||||||
// {text: qsTr("Tous les mois")}
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -370,12 +262,19 @@ ColumnLayout {
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
onEditingFinished: mainItem.conferenceInfoGui.core.description = text
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Escape) {
|
||||||
|
text = mainItem.conferenceInfoGui.core.description
|
||||||
|
nextItemInFocusChain().forceActiveFocus()
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: descriptionEdit.hovered || descriptionEdit.activeFocus ? DefaultStyle.grey_100 : "transparent"
|
color: descriptionEdit.hovered || descriptionEdit.activeFocus ? DefaultStyle.grey_100 : "transparent"
|
||||||
radius: 4 * DefaultStyle.dp
|
radius: 4 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
onEditingFinished: mainItem.conferenceInfoGui.core.description = text
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -387,7 +286,7 @@ ColumnLayout {
|
||||||
Layout.preferredHeight: 30 * DefaultStyle.dp
|
Layout.preferredHeight: 30 * DefaultStyle.dp
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: addParticipantsButton.hovered ? DefaultStyle.grey_100 : "transparent"
|
color: addParticipantsButton.hovered || addParticipantsButton.activeFocus ? DefaultStyle.grey_100 : "transparent"
|
||||||
radius: 4 * DefaultStyle.dp
|
radius: 4 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Controls 2.2 as Control
|
import QtQuick.Controls as Control
|
||||||
import QtQuick.Layouts as Layout
|
import QtQuick.Layouts as Layout
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
@ -16,6 +16,7 @@ Control.Popup {
|
||||||
rightPadding: 72 * DefaultStyle.dp
|
rightPadding: 72 * DefaultStyle.dp
|
||||||
topPadding: 41 * DefaultStyle.dp
|
topPadding: 41 * DefaultStyle.dp
|
||||||
bottomPadding: 18 * DefaultStyle.dp
|
bottomPadding: 18 * DefaultStyle.dp
|
||||||
|
onOpened: numPad.forceActiveFocus()
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -61,11 +62,36 @@ Control.Popup {
|
||||||
onClicked: mainItem.close()
|
onClicked: mainItem.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentItem: Layout.GridLayout {
|
contentItem: FocusScope{
|
||||||
|
id: numPad
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.topMargin: 41 * DefaultStyle.dp
|
||||||
|
anchors.bottomMargin: 18 * DefaultStyle.dp
|
||||||
|
anchors.rightMargin: 72 * DefaultStyle.dp
|
||||||
|
anchors.leftMargin: 72 * DefaultStyle.dp
|
||||||
|
|
||||||
|
Layout.GridLayout {
|
||||||
|
id: numPadGrid
|
||||||
|
anchors.fill: parent
|
||||||
columns: 3
|
columns: 3
|
||||||
columnSpacing: 40 * DefaultStyle.dp
|
columnSpacing: 40 * DefaultStyle.dp
|
||||||
rowSpacing: 10 * DefaultStyle.dp
|
rowSpacing: 10 * DefaultStyle.dp
|
||||||
|
function getButtonAt(index){
|
||||||
|
index = (index+15) % 15
|
||||||
|
if(index >= 0){
|
||||||
|
if( index < 9){
|
||||||
|
return numPadRepeater.itemAt(index)
|
||||||
|
}else if( index < 12){
|
||||||
|
return digitRepeater.itemAt(index-9)
|
||||||
|
}else if (index < 14){
|
||||||
|
return launchCallButton
|
||||||
|
}else if( index < 15){
|
||||||
|
return eraseButton
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Repeater {
|
Repeater {
|
||||||
|
id: numPadRepeater
|
||||||
model: 9
|
model: 9
|
||||||
Button {
|
Button {
|
||||||
id: numPadButton
|
id: numPadButton
|
||||||
|
|
@ -73,9 +99,17 @@ Control.Popup {
|
||||||
required property int index
|
required property int index
|
||||||
implicitWidth: 60 * DefaultStyle.dp
|
implicitWidth: 60 * DefaultStyle.dp
|
||||||
implicitHeight: 60 * DefaultStyle.dp
|
implicitHeight: 60 * DefaultStyle.dp
|
||||||
|
focus: index == 4
|
||||||
|
onClicked: {
|
||||||
|
mainItem.buttonPressed(innerText.text)
|
||||||
|
}
|
||||||
|
KeyNavigation.left: numPadGrid.getButtonAt(index - 1)
|
||||||
|
KeyNavigation.right: numPadGrid.getButtonAt(index + 1)
|
||||||
|
KeyNavigation.up: numPadGrid.getButtonAt(index - 3)
|
||||||
|
KeyNavigation.down: numPadGrid.getButtonAt(index + 3)
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: numPadButton.down ? DefaultStyle.numericPadPressedButtonColor : DefaultStyle.grey_0
|
color: numPadButton.down || numPadButton.shadowEnabled? DefaultStyle.numericPadPressedButtonColor : DefaultStyle.grey_0
|
||||||
radius: 71 * DefaultStyle.dp
|
radius: 71 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
|
@ -89,12 +123,10 @@ Control.Popup {
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
|
||||||
mainItem.buttonPressed(innerText.text)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Repeater {
|
Repeater {
|
||||||
|
id: digitRepeater
|
||||||
model: [
|
model: [
|
||||||
{pressText: "*"},
|
{pressText: "*"},
|
||||||
{pressText: "0", longPressText: "+"},
|
{pressText: "0", longPressText: "+"},
|
||||||
|
|
@ -103,13 +135,20 @@ Control.Popup {
|
||||||
Button {
|
Button {
|
||||||
id: digitButton
|
id: digitButton
|
||||||
Layout.Layout.alignment: Qt.AlignHCenter
|
Layout.Layout.alignment: Qt.AlignHCenter
|
||||||
shadowEnabled: true
|
|
||||||
implicitWidth: 60 * DefaultStyle.dp
|
implicitWidth: 60 * DefaultStyle.dp
|
||||||
implicitHeight: 60 * DefaultStyle.dp
|
implicitHeight: 60 * DefaultStyle.dp
|
||||||
|
|
||||||
|
onClicked: mainItem.buttonPressed(pressText.text)
|
||||||
|
onPressAndHold: mainItem.buttonPressed(longPressText.text)
|
||||||
|
|
||||||
|
KeyNavigation.left: numPadGrid.getButtonAt((index - 1)+9)
|
||||||
|
KeyNavigation.right: numPadGrid.getButtonAt((index + 1)+9)
|
||||||
|
KeyNavigation.up: numPadGrid.getButtonAt((index - 3)+9)
|
||||||
|
KeyNavigation.down: numPadGrid.getButtonAt((index + 3)+9)
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: digitButton.down ? DefaultStyle.numericPadPressedButtonColor : DefaultStyle.grey_0
|
color: digitButton.down || digitButton.shadowEnabled? DefaultStyle.numericPadPressedButtonColor : DefaultStyle.grey_0
|
||||||
radius: 71 * DefaultStyle.dp
|
radius: 71 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
|
|
@ -136,8 +175,6 @@ Control.Popup {
|
||||||
font.pixelSize: 22 * DefaultStyle.dp
|
font.pixelSize: 22 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: mainItem.buttonPressed(pressText.text)
|
|
||||||
onPressAndHold: mainItem.buttonPressed(longPressText.text)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -148,30 +185,46 @@ Control.Popup {
|
||||||
implicitWidth: 75 * DefaultStyle.dp
|
implicitWidth: 75 * DefaultStyle.dp
|
||||||
implicitHeight: 55 * DefaultStyle.dp
|
implicitHeight: 55 * DefaultStyle.dp
|
||||||
Layout.Layout.alignment: Qt.AlignHCenter
|
Layout.Layout.alignment: Qt.AlignHCenter
|
||||||
|
icon.source: AppIcons.phone
|
||||||
|
icon.width: 32 * DefaultStyle.dp
|
||||||
|
icon.height: 32 * DefaultStyle.dp
|
||||||
|
contentImageColor: DefaultStyle.grey_0
|
||||||
|
|
||||||
|
onClicked: mainItem.launchCall()
|
||||||
|
|
||||||
|
KeyNavigation.left: eraseButton
|
||||||
|
KeyNavigation.right: eraseButton
|
||||||
|
KeyNavigation.up: numPadGrid.getButtonAt(10)
|
||||||
|
KeyNavigation.down: numPadGrid.getButtonAt(1)
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.success_500main
|
color: DefaultStyle.success_500main
|
||||||
radius: 71 * DefaultStyle.dp
|
radius: 71 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
icon.source: AppIcons.phone
|
|
||||||
icon.width: 32 * DefaultStyle.dp
|
|
||||||
icon.height: 32 * DefaultStyle.dp
|
|
||||||
contentImageColor: DefaultStyle.grey_0
|
|
||||||
onClicked: mainItem.launchCall()
|
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: eraseButton
|
||||||
leftPadding: 5 * DefaultStyle.dp
|
leftPadding: 5 * DefaultStyle.dp
|
||||||
rightPadding: 5 * DefaultStyle.dp
|
rightPadding: 5 * DefaultStyle.dp
|
||||||
topPadding: 5 * DefaultStyle.dp
|
topPadding: 5 * DefaultStyle.dp
|
||||||
bottomPadding: 5 * DefaultStyle.dp
|
bottomPadding: 5 * DefaultStyle.dp
|
||||||
Layout.Layout.alignment: Qt.AlignHCenter
|
Layout.Layout.alignment: Qt.AlignHCenter
|
||||||
background: Item {
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
icon.source: AppIcons.backspaceFill
|
icon.source: AppIcons.backspaceFill
|
||||||
icon.width: 38 * DefaultStyle.dp
|
icon.width: 38 * DefaultStyle.dp
|
||||||
icon.height: 38 * DefaultStyle.dp
|
icon.height: 38 * DefaultStyle.dp
|
||||||
|
|
||||||
onClicked: mainItem.wipe()
|
onClicked: mainItem.wipe()
|
||||||
|
|
||||||
|
KeyNavigation.left: launchCallButton
|
||||||
|
KeyNavigation.right: launchCallButton
|
||||||
|
KeyNavigation.up: numPadGrid.getButtonAt(11)
|
||||||
|
KeyNavigation.down: numPadGrid.getButtonAt(1)
|
||||||
|
|
||||||
|
background: Item {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ Control.Popup{
|
||||||
property color underlineColor : DefaultStyle.main1_500_main
|
property color underlineColor : DefaultStyle.main1_500_main
|
||||||
property int radius: 16 * DefaultStyle.dp
|
property int radius: 16 * DefaultStyle.dp
|
||||||
property bool hovered: mouseArea.containsMouse
|
property bool hovered: mouseArea.containsMouse
|
||||||
|
|
||||||
background: Item{
|
background: Item{
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: mainItem.underlineColor != undefined
|
visible: mainItem.underlineColor != undefined
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ Button {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property alias popup: popup
|
property alias popup: popup
|
||||||
property var contentImageColor
|
property var contentImageColor
|
||||||
|
property bool shadowEnabled: mainItem.activeFocus || hovered
|
||||||
|
property alias popupBackgroundColor: popupBackground.color
|
||||||
checked: popup.visible
|
checked: popup.visible
|
||||||
implicitWidth: 24 * DefaultStyle.dp
|
implicitWidth: 24 * DefaultStyle.dp
|
||||||
implicitHeight: 24 * DefaultStyle.dp
|
implicitHeight: 24 * DefaultStyle.dp
|
||||||
|
|
@ -26,12 +28,33 @@ Button {
|
||||||
popup.open()
|
popup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
Keys.onPressed: (event) => {
|
||||||
|
if(popup.checked && event.key == Qt.Key_Escape){
|
||||||
|
mainItem.close()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
background: Item {
|
||||||
anchors.fill: mainItem
|
anchors.fill: mainItem
|
||||||
visible: mainItem.checked
|
Rectangle {
|
||||||
color: DefaultStyle.main2_300
|
id: buttonBackground
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: mainItem.checked || mainItem.shadowEnabled
|
||||||
|
color: mainItem.checked ? DefaultStyle.main2_300 : DefaultStyle.grey_100
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: buttonBackground
|
||||||
|
source: buttonBackground
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
contentItem: EffectImage {
|
contentItem: EffectImage {
|
||||||
imageSource: mainItem.icon.source
|
imageSource: mainItem.icon.source
|
||||||
imageWidth: mainItem.icon.width
|
imageWidth: mainItem.icon.width
|
||||||
|
|
@ -46,7 +69,7 @@ Button {
|
||||||
id: popup
|
id: popup
|
||||||
x: 0
|
x: 0
|
||||||
y: mainItem.height
|
y: mainItem.height
|
||||||
closePolicy: Popup.CloseOnPressOutsideParent | Popup.CloseOnPressOutside
|
closePolicy: Popup.CloseOnPressOutsideParent | Popup.CloseOnPressOutside | Popup.CloseOnEscape
|
||||||
padding: 10 * DefaultStyle.dp
|
padding: 10 * DefaultStyle.dp
|
||||||
parent: mainItem // Explicit define for coordinates references.
|
parent: mainItem // Explicit define for coordinates references.
|
||||||
|
|
||||||
|
|
@ -64,19 +87,20 @@ Button {
|
||||||
} else {
|
} else {
|
||||||
x = 0
|
x = 0
|
||||||
}
|
}
|
||||||
|
popup.contentItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: callOptionsMenuPopup
|
id: popupBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
radius: 16 * DefaultStyle.dp
|
radius: 16 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
source: callOptionsMenuPopup
|
source: popupBackground
|
||||||
anchors.fill: callOptionsMenuPopup
|
anchors.fill: popupBackground
|
||||||
shadowEnabled: true
|
shadowEnabled: true
|
||||||
shadowBlur: 1
|
shadowBlur: 1
|
||||||
shadowColor: DefaultStyle.grey_900
|
shadowColor: DefaultStyle.grey_900
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Controls 2.2 as Control
|
import QtQuick.Controls as Control
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Effects
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
Control.RadioButton {
|
Control.RadioButton {
|
||||||
|
|
@ -11,24 +12,28 @@ Control.RadioButton {
|
||||||
property bool checkOnClick: true
|
property bool checkOnClick: true
|
||||||
property color color
|
property color color
|
||||||
property int indicatorSize: 16 * DefaultStyle.dp
|
property int indicatorSize: 16 * DefaultStyle.dp
|
||||||
|
property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered
|
||||||
//onClicked: if (checkOnClick && !mainItem.checked) mainItem.toggle()
|
//onClicked: if (checkOnClick && !mainItem.checked) mainItem.toggle()
|
||||||
|
|
||||||
MouseArea{
|
MouseArea{
|
||||||
|
id: mouseArea
|
||||||
anchors.fill:parent
|
anchors.fill:parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.NoButton
|
acceptedButtons: Qt.NoButton
|
||||||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
indicator: Rectangle {
|
indicator: Item{
|
||||||
implicitWidth: mainItem.indicatorSize
|
implicitWidth: mainItem.indicatorSize
|
||||||
implicitHeight: mainItem.indicatorSize
|
implicitHeight: mainItem.indicatorSize
|
||||||
radius: implicitWidth/2
|
anchors.verticalCenter: mainItem.verticalCenter
|
||||||
|
Rectangle {
|
||||||
|
id: backgroundArea
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: mainItem.indicatorSize/2
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.color: mainItem.color
|
border.color: mainItem.color
|
||||||
border.width: 2 * DefaultStyle.dp
|
border.width: 2 * DefaultStyle.dp
|
||||||
anchors.verticalCenter: mainItem.verticalCenter
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width/2
|
width: parent.width/2
|
||||||
height: parent.height/2
|
height: parent.height/2
|
||||||
|
|
@ -39,4 +44,16 @@ Control.RadioButton {
|
||||||
visible: mainItem.checked
|
visible: mainItem.checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: backgroundArea
|
||||||
|
source: backgroundArea
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import QtQuick.Layouts 1.0
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
FocusScope {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property string placeholderText: ""
|
property string placeholderText: ""
|
||||||
property color placeholderTextColor: DefaultStyle.main2_400
|
property color placeholderTextColor: DefaultStyle.main2_400
|
||||||
|
|
@ -17,6 +17,7 @@ Rectangle {
|
||||||
property Control.Popup numericPad
|
property Control.Popup numericPad
|
||||||
property alias numericPadButton: dialerButton
|
property alias numericPadButton: dialerButton
|
||||||
readonly property bool hasActiveFocus: textField.activeFocus
|
readonly property bool hasActiveFocus: textField.activeFocus
|
||||||
|
property alias color: backgroundItem.color
|
||||||
|
|
||||||
onVisibleChanged: if (!visible && numericPad) numericPad.close()
|
onVisibleChanged: if (!visible && numericPad) numericPad.close()
|
||||||
|
|
||||||
|
|
@ -38,9 +39,14 @@ Rectangle {
|
||||||
|
|
||||||
implicitWidth: mainItem.textInputWidth
|
implicitWidth: mainItem.textInputWidth
|
||||||
implicitHeight: 50 * DefaultStyle.dp
|
implicitHeight: 50 * DefaultStyle.dp
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
id: backgroundItem
|
||||||
|
anchors.fill: parent
|
||||||
radius: 28 * DefaultStyle.dp
|
radius: 28 * DefaultStyle.dp
|
||||||
color: DefaultStyle.grey_100
|
color: DefaultStyle.grey_100
|
||||||
border.color: textField.activeFocus ? mainItem.focusedBorderColor : mainItem.borderColor
|
border.color: textField.activeFocus ? mainItem.focusedBorderColor : mainItem.borderColor
|
||||||
|
}
|
||||||
Image {
|
Image {
|
||||||
id: magnifier
|
id: magnifier
|
||||||
visible: mainItem.magnifierVisible
|
visible: mainItem.magnifierVisible
|
||||||
|
|
@ -57,6 +63,7 @@ Rectangle {
|
||||||
anchors.leftMargin: magnifier.visible ? 0 : 10 * DefaultStyle.dp
|
anchors.leftMargin: magnifier.visible ? 0 : 10 * DefaultStyle.dp
|
||||||
anchors.right: clearTextButton.left
|
anchors.right: clearTextButton.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
focus: true
|
||||||
placeholderText: mainItem.placeholderText
|
placeholderText: mainItem.placeholderText
|
||||||
placeholderTextColor: mainItem.placeholderTextColor
|
placeholderTextColor: mainItem.placeholderTextColor
|
||||||
width: mainItem.width - dialerButton.width
|
width: mainItem.width - dialerButton.width
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SwitchButton {
|
Switch {
|
||||||
id: switchButton
|
id: switchButton
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
checked: propertyOwner[mainItem.propertyName]
|
checked: propertyOwner[mainItem.propertyName]
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,18 @@ import Linphone
|
||||||
|
|
||||||
Control.Slider {
|
Control.Slider {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
property bool shadowEnabled: mainItem.hovered || mainItem.activeFocus
|
||||||
background: Rectangle {
|
hoverEnabled: true
|
||||||
|
background: Item{
|
||||||
x: mainItem.leftPadding
|
x: mainItem.leftPadding
|
||||||
y: mainItem.topPadding + mainItem.availableHeight / 2 - height / 2
|
y: mainItem.topPadding + mainItem.availableHeight / 2 - height / 2
|
||||||
implicitWidth: 200 * DefaultStyle.dp
|
implicitWidth: 200 * DefaultStyle.dp
|
||||||
implicitHeight: 4 * DefaultStyle.dp
|
implicitHeight: 4 * DefaultStyle.dp
|
||||||
width: mainItem.availableWidth
|
width: mainItem.availableWidth
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
|
Rectangle {
|
||||||
|
id: sliderBackground
|
||||||
|
anchors.fill: parent
|
||||||
radius: 30 * DefaultStyle.dp
|
radius: 30 * DefaultStyle.dp
|
||||||
// TODO : change the colors when mockup indicates their names
|
// TODO : change the colors when mockup indicates their names
|
||||||
color: DefaultStyle.grey_850
|
color: DefaultStyle.grey_850
|
||||||
|
|
@ -29,6 +33,18 @@ Control.Slider {
|
||||||
radius: 40 * DefaultStyle.dp
|
radius: 40 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: sliderBackground
|
||||||
|
source: sliderBackground
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handle: Item {
|
handle: Item {
|
||||||
x: mainItem.leftPadding + mainItem.visualPosition * (mainItem.availableWidth - width)
|
x: mainItem.leftPadding + mainItem.visualPosition * (mainItem.availableWidth - width)
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,27 @@
|
||||||
import QtQuick 2.12
|
import QtQuick
|
||||||
import QtQuick.Controls as Control
|
import QtQuick.Controls as Control
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
Control.Switch {
|
Control.Switch {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
property bool shadowEnabled: mainItem.hovered || mainItem.activeFocus
|
||||||
|
hoverEnabled: true
|
||||||
font {
|
font {
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
indicator: Rectangle {
|
indicator: Item{
|
||||||
implicitWidth: 32 * DefaultStyle.dp
|
implicitWidth: 32 * DefaultStyle.dp
|
||||||
implicitHeight: 20 * DefaultStyle.dp
|
implicitHeight: 20 * DefaultStyle.dp
|
||||||
x: mainItem.leftPadding
|
x: mainItem.leftPadding
|
||||||
y: parent.height / 2 - height / 2
|
y: parent.height / 2 - height / 2
|
||||||
|
Rectangle {
|
||||||
|
id: indicatorBackground
|
||||||
|
anchors.fill: parent
|
||||||
radius: 10 * DefaultStyle.dp
|
radius: 10 * DefaultStyle.dp
|
||||||
color: mainItem.checked ? DefaultStyle.success_500main : DefaultStyle.main2_400
|
color: mainItem.checked? DefaultStyle.success_500main : DefaultStyle.main2_400
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
@ -30,6 +36,18 @@ Control.Switch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: mainItem.shadowEnabled
|
||||||
|
anchors.fill: indicatorBackground
|
||||||
|
source: indicatorBackground
|
||||||
|
visible: mainItem.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: mainItem.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
text: mainItem.text
|
text: mainItem.text
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
import QtQuick 2.7
|
|
||||||
import QtQuick.Controls 2.2 as Control
|
|
||||||
import Linphone
|
|
||||||
|
|
||||||
Control.AbstractButton {
|
|
||||||
id: mainItem
|
|
||||||
checkable: true
|
|
||||||
width: 32 * DefaultStyle.dp
|
|
||||||
height: 20 * DefaultStyle.dp
|
|
||||||
EffectImage {
|
|
||||||
visible: mainItem.checked
|
|
||||||
imageSource: AppIcons.switchOn
|
|
||||||
//colorizationColor: DefaultStyle.success_500main - not working on this icon.
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
EffectImage {
|
|
||||||
visible: !mainItem.checked
|
|
||||||
imageSource: AppIcons.switchOff
|
|
||||||
//colorizationColor: DefaultStyle.main2_400 - not working on this icon.
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls 2.2 as Control
|
import QtQuick.Controls as Control
|
||||||
|
import QtQuick.Effects
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
Control.TabBar {
|
Control.TabBar {
|
||||||
|
|
@ -44,9 +45,12 @@ Control.TabBar {
|
||||||
Repeater {
|
Repeater {
|
||||||
model: mainItem.model
|
model: mainItem.model
|
||||||
Control.TabButton {
|
Control.TabButton {
|
||||||
|
id: tabButton
|
||||||
required property string modelData
|
required property string modelData
|
||||||
required property int index
|
required property int index
|
||||||
|
property bool shadowEnabled: activeFocus || hovered
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
|
activeFocusOnTab: true
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ToolTip {
|
ToolTip {
|
||||||
visible: tabText.truncated && hovered
|
visible: tabText.truncated && hovered
|
||||||
|
|
@ -58,6 +62,7 @@ Control.TabBar {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: tabBackground
|
||||||
visible: mainItem.currentIndex === index
|
visible: mainItem.currentIndex === index
|
||||||
height: 5 * DefaultStyle.dp
|
height: 5 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main1_500_main
|
color: DefaultStyle.main1_500_main
|
||||||
|
|
@ -65,6 +70,17 @@ Control.TabBar {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
}
|
}
|
||||||
|
MultiEffect {
|
||||||
|
enabled: tabButton.shadowEnabled
|
||||||
|
anchors.fill: tabBackground
|
||||||
|
source: tabBackground
|
||||||
|
visible: tabButton.shadowEnabled
|
||||||
|
// Crash : https://bugreports.qt.io/browse/QTBUG-124730
|
||||||
|
shadowEnabled: true //mainItem.shadowEnabled
|
||||||
|
shadowColor: DefaultStyle.grey_1000
|
||||||
|
shadowBlur: 1
|
||||||
|
shadowOpacity: tabButton.shadowEnabled ? 0.5 : 0.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import QtQuick 2.7 as Quick
|
import QtQuick as Quick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ TextEdit {
|
||||||
property bool hovered: mouseArea.hoverEnabled && mouseArea.containsMouse
|
property bool hovered: mouseArea.hoverEnabled && mouseArea.containsMouse
|
||||||
topPadding: 5 * DefaultStyle.dp
|
topPadding: 5 * DefaultStyle.dp
|
||||||
bottomPadding: 5 * DefaultStyle.dp
|
bottomPadding: 5 * DefaultStyle.dp
|
||||||
|
activeFocusOnTab: true
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ Control.TextField {
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
activeFocusOnTab: true
|
||||||
|
|
||||||
property bool controlIsDown: false
|
property bool controlIsDown: false
|
||||||
property bool hidden: false
|
property bool hidden: false
|
||||||
|
|
@ -111,10 +112,9 @@ Control.TextField {
|
||||||
icon.source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
|
icon.source: eyeButton.checked ? AppIcons.eyeShow : AppIcons.eyeHide
|
||||||
width: 20 * DefaultStyle.dp
|
width: 20 * DefaultStyle.dp
|
||||||
height: 20 * DefaultStyle.dp
|
height: 20 * DefaultStyle.dp
|
||||||
icon.width: 20 * DefaultStyle.dp
|
icon.width: width
|
||||||
icon.height: 20 * DefaultStyle.dp
|
icon.height: height
|
||||||
anchors.top: parent.top
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: rightMargin
|
anchors.rightMargin: rightMargin
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ Control.TabBar {
|
||||||
font {
|
font {
|
||||||
weight: mainItem.currentIndex === index ? 800 * DefaultStyle.dp : 400 * DefaultStyle.dp
|
weight: mainItem.currentIndex === index ? 800 * DefaultStyle.dp : 400 * DefaultStyle.dp
|
||||||
pixelSize: 9 * DefaultStyle.dp
|
pixelSize: 9 * DefaultStyle.dp
|
||||||
|
underline: tabButton.activeFocus || tabButton.hovered
|
||||||
}
|
}
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as Control
|
import QtQuick.Controls as Control
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import Linphone
|
import Linphone
|
||||||
|
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property alias contentItem: contentItem.data
|
property alias contentItem: contentItem.data
|
||||||
property string label: ""
|
property string label: ""
|
||||||
|
|
@ -14,6 +14,10 @@ ColumnLayout {
|
||||||
property alias errorMessage: errorText.text
|
property alias errorMessage: errorText.text
|
||||||
property bool enableErrorText: false
|
property bool enableErrorText: false
|
||||||
property bool errorTextVisible: errorText.opacity > 0
|
property bool errorTextVisible: errorText.opacity > 0
|
||||||
|
implicitHeight: layout.implicitHeight
|
||||||
|
implicitWidth: layout.implicitWidth
|
||||||
|
ColumnLayout {
|
||||||
|
id: layout
|
||||||
spacing: 5 * DefaultStyle.dp
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -48,4 +52,5 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import Linphone
|
||||||
import UtilsCpp
|
import UtilsCpp
|
||||||
import SettingsCpp
|
import SettingsCpp
|
||||||
|
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
id: mainItem
|
id: mainItem
|
||||||
spacing: 15 * DefaultStyle.dp
|
|
||||||
property string placeHolderText: qsTr("Rechercher des contacts")
|
property string placeHolderText: qsTr("Rechercher des contacts")
|
||||||
property list<string> selectedParticipants: contactList.selectedContacts
|
property list<string> selectedParticipants: contactList.selectedContacts
|
||||||
property int selectedParticipantsCount: selectedParticipants.length
|
property int selectedParticipantsCount: selectedParticipants.length
|
||||||
|
|
@ -23,6 +23,9 @@ ColumnLayout {
|
||||||
//contactList.selectedContacts.clear()
|
//contactList.selectedContacts.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 15 * DefaultStyle.dp
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
visible: mainItem.nameGroupCall
|
visible: mainItem.nameGroupCall
|
||||||
spacing: 5 * DefaultStyle.dp
|
spacing: 5 * DefaultStyle.dp
|
||||||
|
|
@ -45,6 +48,13 @@ ColumnLayout {
|
||||||
id: groupCallName
|
id: groupCallName
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 49 * DefaultStyle.dp
|
Layout.preferredHeight: 49 * DefaultStyle.dp
|
||||||
|
focus: mainItem.nameGroupCall
|
||||||
|
KeyNavigation.down: participantList.count > 0 ? participantList : searchbar
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(currentIndex <=0 && event.key == Qt.Key_Up){
|
||||||
|
nextItemInFocusChain(false).forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListView {
|
ListView {
|
||||||
|
|
@ -55,7 +65,13 @@ ColumnLayout {
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
model: contactList.selectedContacts
|
model: contactList.selectedContacts
|
||||||
clip: true
|
clip: true
|
||||||
delegate: Item {
|
focus: !groupCallName.visible && participantList.count > 0
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(currentIndex <=0 && event.key == Qt.Key_Up){
|
||||||
|
nextItemInFocusChain(false).forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delegate: FocusScope {
|
||||||
height: 56 * DefaultStyle.dp
|
height: 56 * DefaultStyle.dp
|
||||||
width: participantList.width - scrollbar.implicitWidth - 12 * DefaultStyle.dp
|
width: participantList.width - scrollbar.implicitWidth - 12 * DefaultStyle.dp
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -82,6 +98,7 @@ ColumnLayout {
|
||||||
icon.source: AppIcons.closeX
|
icon.source: AppIcons.closeX
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
onClicked: contactList.selectedContacts.splice(index, 1)
|
onClicked: contactList.selectedContacts.splice(index, 1)
|
||||||
}
|
}
|
||||||
|
|
@ -104,8 +121,15 @@ ColumnLayout {
|
||||||
Layout.topMargin: 6 * DefaultStyle.dp
|
Layout.topMargin: 6 * DefaultStyle.dp
|
||||||
Layout.rightMargin: 28 * DefaultStyle.dp
|
Layout.rightMargin: 28 * DefaultStyle.dp
|
||||||
placeholderText: mainItem.placeHolderText
|
placeholderText: mainItem.placeHolderText
|
||||||
|
focus: !groupCallName.visible && participantList.count == 0
|
||||||
color: mainItem.searchBarColor
|
color: mainItem.searchBarColor
|
||||||
borderColor: mainItem.searchBarColor
|
borderColor: mainItem.searchBarColor
|
||||||
|
KeyNavigation.up: participantList.count > 0
|
||||||
|
? participantList
|
||||||
|
: groupCallName.visible
|
||||||
|
? groupCallName
|
||||||
|
: nextItemInFocusChain(false)
|
||||||
|
KeyNavigation.down: contactList
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
Layout.topMargin: 6 * DefaultStyle.dp
|
Layout.topMargin: 6 * DefaultStyle.dp
|
||||||
|
|
@ -161,4 +185,5 @@ ColumnLayout {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ LoginLayout {
|
||||||
Layout.preferredWidth: 27 * DefaultStyle.dp
|
Layout.preferredWidth: 27 * DefaultStyle.dp
|
||||||
Layout.leftMargin: 79 * DefaultStyle.dp
|
Layout.leftMargin: 79 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
icon.width: 27 * DefaultStyle.dp
|
icon.width: width
|
||||||
icon.height: 27 * DefaultStyle.dp
|
icon.height: height
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,13 +214,22 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
activeFocusOnTab: true
|
||||||
font {
|
font {
|
||||||
underline: true
|
underline: true
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
|
bold: activeFocus
|
||||||
}
|
}
|
||||||
text: qsTr("conditions d’utilisation")
|
text: qsTr("conditions d’utilisation")
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
||||||
|
cguMouseArea.clicked(undefined)
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: cguMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
|
@ -235,13 +244,22 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
activeFocusOnTab: true
|
||||||
font {
|
font {
|
||||||
underline: true
|
underline: true
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: 14 * DefaultStyle.dp
|
||||||
weight: 400 * DefaultStyle.dp
|
weight: 400 * DefaultStyle.dp
|
||||||
|
bold: activeFocus
|
||||||
}
|
}
|
||||||
text: qsTr("politique de confidentialité.")
|
text: qsTr("politique de confidentialité.")
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
||||||
|
privateMouseArea.clicked(undefined)
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: privateMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ LoginLayout {
|
||||||
<p>To enable it in a commercial projet, please contact us. </p>"
|
<p>To enable it in a commercial projet, please contact us. </p>"
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.topMargin: 18 * DefaultStyle.dp
|
Layout.topMargin: 18 * DefaultStyle.dp
|
||||||
text: "linphone.org/contact"
|
text: "linphone.org/contact"
|
||||||
textSize: 13 * DefaultStyle.dp
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
|
@ -109,7 +110,7 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.topMargin: 85 * DefaultStyle.dp
|
Layout.topMargin: 85 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
Layout.fillWidth: true
|
||||||
inversedColors: true
|
inversedColors: true
|
||||||
text: qsTr("I prefer creating an account")
|
text: qsTr("I prefer creating an account")
|
||||||
leftPadding: 20 * DefaultStyle.dp
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
|
|
@ -123,7 +124,7 @@ LoginLayout {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
Layout.fillWidth: true
|
||||||
text: qsTr("I understand")
|
text: qsTr("I understand")
|
||||||
leftPadding: 20 * DefaultStyle.dp
|
leftPadding: 20 * DefaultStyle.dp
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
|
|
@ -229,7 +230,6 @@ LoginLayout {
|
||||||
anchors.topMargin: 70 * DefaultStyle.dp
|
anchors.topMargin: 70 * DefaultStyle.dp
|
||||||
anchors.leftMargin: 127 * DefaultStyle.dp
|
anchors.leftMargin: 127 * DefaultStyle.dp
|
||||||
width: 361 * DefaultStyle.dp
|
width: 361 * DefaultStyle.dp
|
||||||
clip: true
|
|
||||||
},
|
},
|
||||||
Image {
|
Image {
|
||||||
z: -1
|
z: -1
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import QtQuick.Controls as Control
|
||||||
import Linphone
|
import Linphone
|
||||||
import UtilsCpp
|
import UtilsCpp
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property string noItemButtonText
|
property string noItemButtonText
|
||||||
property string newItemIconSource
|
property string newItemIconSource
|
||||||
|
|
@ -209,6 +209,8 @@ Item {
|
||||||
}
|
}
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: rightPanelStackView
|
id: rightPanelStackView
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,17 +33,19 @@ AbstractMainPage {
|
||||||
Layout.rightMargin: leftPanel.sideMargin
|
Layout.rightMargin: leftPanel.sideMargin
|
||||||
spacing: 5 * DefaultStyle.dp
|
spacing: 5 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
|
id: backButton
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
background: Item {
|
focus: true
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.goBack()
|
mainItem.goBack()
|
||||||
}
|
}
|
||||||
|
background: Item {
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: titleText
|
text: titleText
|
||||||
|
|
@ -63,11 +65,13 @@ AbstractMainPage {
|
||||||
Layout.topMargin: 41 * DefaultStyle.dp
|
Layout.topMargin: 41 * DefaultStyle.dp
|
||||||
Layout.leftMargin: leftPanel.sideMargin
|
Layout.leftMargin: leftPanel.sideMargin
|
||||||
property int selectedIndex: 0
|
property int selectedIndex: 0
|
||||||
|
activeFocusOnTab: true
|
||||||
|
|
||||||
delegate: MasterDetailFamily {
|
delegate: MasterDetailFamily {
|
||||||
titleText: modelData.title
|
titleText: modelData.title
|
||||||
visible: modelData.visible != undefined ? modelData.visible : true
|
visible: modelData.visible != undefined ? modelData.visible : true
|
||||||
isSelected: familiesList.selectedIndex == index
|
isSelected: familiesList.selectedIndex == index
|
||||||
|
focus: index == 0
|
||||||
onSelected: {
|
onSelected: {
|
||||||
familiesList.selectedIndex = index
|
familiesList.selectedIndex = index
|
||||||
rightPanelStackView.clear()
|
rightPanelStackView.clear()
|
||||||
|
|
@ -78,6 +82,8 @@ AbstractMainPage {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
let initialEntry = mainItem.families[familiesList.selectedIndex]
|
let initialEntry = mainItem.families[familiesList.selectedIndex]
|
||||||
rightPanelStackView.push(layoutUrl(initialEntry.layout), { titleText: initialEntry.title, model: initialEntry.model, container: rightPanelStackView})
|
rightPanelStackView.push(layoutUrl(initialEntry.layout), { titleText: initialEntry.title, model: initialEntry.model, container: rightPanelStackView})
|
||||||
|
familiesList.currentIndex = familiesList.selectedIndex
|
||||||
|
backButton.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,23 +69,32 @@ AbstractMainPage {
|
||||||
id: leftPanel
|
id: leftPanel
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: titleLoader
|
id: titleLoader
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
asynchronous: false
|
||||||
|
onActiveFocusChanged:{
|
||||||
|
if(activeFocus && item){
|
||||||
|
item.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: listStackView
|
id: listStackView
|
||||||
clip: true
|
|
||||||
initialItem: historyListItem
|
|
||||||
anchors.top: titleLoader.bottom
|
anchors.top: titleLoader.bottom
|
||||||
anchors.topMargin: 18 * DefaultStyle.dp
|
anchors.topMargin: 18 * DefaultStyle.dp
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 45 * DefaultStyle.dp
|
anchors.leftMargin: 45 * DefaultStyle.dp
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
clip: true
|
||||||
|
initialItem: historyListItem
|
||||||
|
focus: true
|
||||||
|
onActiveFocusChanged: if(activeFocus){
|
||||||
|
currentItem.forceActiveFocus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -107,7 +116,12 @@ AbstractMainPage {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: historyListTitle
|
id: historyListTitle
|
||||||
|
FocusScope{
|
||||||
|
width: parent.width
|
||||||
|
height: titleCallLayout.implicitHeight
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: titleCallLayout
|
||||||
|
anchors.fill: parent
|
||||||
spacing: 16 * DefaultStyle.dp
|
spacing: 16 * DefaultStyle.dp
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Appels")
|
text: qsTr("Appels")
|
||||||
|
|
@ -123,10 +137,15 @@ AbstractMainPage {
|
||||||
id: removeHistory
|
id: removeHistory
|
||||||
width: 24 * DefaultStyle.dp
|
width: 24 * DefaultStyle.dp
|
||||||
height: 24 * DefaultStyle.dp
|
height: 24 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
popup.x: 0
|
popup.x: 0
|
||||||
popup.padding: 10 * DefaultStyle.dp
|
popup.padding: 10 * DefaultStyle.dp
|
||||||
|
KeyNavigation.right: newCallButton
|
||||||
|
KeyNavigation.down: listStackView
|
||||||
popup.contentItem: Button {
|
popup.contentItem: Button {
|
||||||
background: Item{}
|
color: removeHistory.popupBackgroundColor
|
||||||
|
borderColor: removeHistory.popupBackgroundColor
|
||||||
|
inversedColors: true
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
EffectImage {
|
EffectImage {
|
||||||
imageSource: AppIcons.trashCan
|
imageSource: AppIcons.trashCan
|
||||||
|
|
@ -146,13 +165,14 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
removeHistory.close()
|
removeHistory.close()
|
||||||
deleteHistoryPopup.open()
|
deleteHistoryPopup.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Button {
|
Button {
|
||||||
|
id: newCallButton
|
||||||
background: Item {}
|
background: Item {}
|
||||||
icon.source: AppIcons.newCall
|
icon.source: AppIcons.newCall
|
||||||
Layout.preferredWidth: 28 * DefaultStyle.dp
|
Layout.preferredWidth: 28 * DefaultStyle.dp
|
||||||
|
|
@ -160,6 +180,8 @@ AbstractMainPage {
|
||||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
icon.width: 28 * DefaultStyle.dp
|
icon.width: 28 * DefaultStyle.dp
|
||||||
icon.height: 28 * DefaultStyle.dp
|
icon.height: 28 * DefaultStyle.dp
|
||||||
|
KeyNavigation.left: removeHistory
|
||||||
|
KeyNavigation.down: listStackView
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("[CallPage]User: create new call")
|
console.debug("[CallPage]User: create new call")
|
||||||
listStackView.push(newCallItem)
|
listStackView.push(newCallItem)
|
||||||
|
|
@ -167,16 +189,23 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
id: historyListItem
|
id: historyListItem
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
Control.StackView.onActivated: titleLoader.sourceComponent = historyListTitle
|
Control.StackView.onActivated: titleLoader.sourceComponent = historyListTitle
|
||||||
property alias listView: historyListView
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
SearchBar {
|
SearchBar {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
placeholderText: qsTr("Rechercher un appel")
|
placeholderText: qsTr("Rechercher un appel")
|
||||||
|
focus: true
|
||||||
|
KeyNavigation.up: titleLoader
|
||||||
|
KeyNavigation.down: historyListView
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.topMargin: 38 * DefaultStyle.dp
|
Layout.topMargin: 38 * DefaultStyle.dp
|
||||||
|
|
@ -192,13 +221,13 @@ AbstractMainPage {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Text {
|
Text {
|
||||||
|
visible: historyListView.count === 0
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("Aucun appel")
|
text: qsTr("Aucun appel")
|
||||||
font {
|
font {
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
visible: historyListView.count === 0
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Binding on text {
|
Binding on text {
|
||||||
when: searchBar.text.length !== 0
|
when: searchBar.text.length !== 0
|
||||||
value: qsTr("Aucun appel correspondant")
|
value: qsTr("Aucun appel correspondant")
|
||||||
|
|
@ -217,6 +246,18 @@ AbstractMainPage {
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
flickDeceleration: 10000
|
flickDeceleration: 10000
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
|
highlightFollowsCurrentItem: true
|
||||||
|
preferredHighlightBegin: height/2 - 10
|
||||||
|
preferredHighlightEnd: height/2 + 10
|
||||||
|
highlightRangeMode: ListView.ApplyRange
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Escape){
|
||||||
|
console.log("Back")
|
||||||
|
searchBar.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onActiveFocusChanged: if(activeFocus && currentIndex <0) currentIndex = 0
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: deleteHistoryPopup
|
target: deleteHistoryPopup
|
||||||
|
|
@ -225,7 +266,7 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: FocusScope {
|
||||||
width:historyListView.width
|
width:historyListView.width
|
||||||
height: 56 * DefaultStyle.dp
|
height: 56 * DefaultStyle.dp
|
||||||
anchors.topMargin: 5 * DefaultStyle.dp
|
anchors.topMargin: 5 * DefaultStyle.dp
|
||||||
|
|
@ -321,6 +362,8 @@ AbstractMainPage {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
|
activeFocusOnTab: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (modelData.core.isConference) {
|
if (modelData.core.isConference) {
|
||||||
var callsWindow = UtilsCpp.getCallsWindow()
|
var callsWindow = UtilsCpp.getCallsWindow()
|
||||||
|
|
@ -336,6 +379,7 @@ AbstractMainPage {
|
||||||
MouseArea {
|
MouseArea {
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
focus: true
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: 0.1
|
opacity: 0.1
|
||||||
|
|
@ -349,6 +393,8 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
onPressed: {
|
onPressed: {
|
||||||
historyListView.currentIndex = model.index
|
historyListView.currentIndex = model.index
|
||||||
|
historyListView.forceActiveFocus()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -384,10 +430,15 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: newCallTitle
|
id: newCallTitle
|
||||||
|
FocusScope{
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
anchors.fill: parent
|
||||||
Button {
|
Button {
|
||||||
Layout.leftMargin: 45 * DefaultStyle.dp
|
Layout.leftMargin: 45 * DefaultStyle.dp
|
||||||
background: Item {
|
background: Item {
|
||||||
|
|
@ -397,9 +448,12 @@ AbstractMainPage {
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
|
KeyNavigation.down: listStackView
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("[CallPage]User: return to call history")
|
console.debug("[CallPage]User: return to call history")
|
||||||
listStackView.pop()
|
listStackView.pop()
|
||||||
|
listStackView.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -413,18 +467,30 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Component {
|
Component {
|
||||||
id: newCallItem
|
id: newCallItem
|
||||||
|
FocusScope{
|
||||||
|
width: parent?.width
|
||||||
|
height: parent?.height
|
||||||
|
Control.StackView.onActivated:{
|
||||||
|
titleLoader.sourceComponent = newCallTitle
|
||||||
|
callContactsList.forceActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Control.StackView.onActivated: titleLoader.sourceComponent = newCallTitle
|
anchors.fill: parent
|
||||||
CallContactsLists {
|
CallContactsLists {
|
||||||
id: callContactsList
|
id: callContactsList
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
focus: true
|
||||||
numPad: numericPad
|
numPad: numericPad
|
||||||
groupCallVisible: true
|
groupCallVisible: true
|
||||||
searchBarColor: DefaultStyle.grey_100
|
searchBarColor: DefaultStyle.grey_100
|
||||||
onSelectedContactChanged: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
//onSelectedContactChanged: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
||||||
|
onCallSelectedContact: mainWindow.startCallWithContact(selectedContact, false, callContactsList)
|
||||||
|
onCallButtonPressed: mainItem.createCallFromSearchBarRequested()
|
||||||
onGroupCallCreationRequested: {
|
onGroupCallCreationRequested: {
|
||||||
console.log("groupe call requetsed")
|
console.log("groupe call requetsed")
|
||||||
listStackView.push(groupCallItem)
|
listStackView.push(groupCallItem)
|
||||||
|
|
@ -436,13 +502,19 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: groupCallTitle
|
id: groupCallTitle
|
||||||
|
FocusScope{
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
anchors.fill: parent
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
visible: !SettingsCpp.disableMeetingsFeature
|
visible: !SettingsCpp.disableMeetingsFeature
|
||||||
Button {
|
Button {
|
||||||
|
id: backGroupCallButton
|
||||||
background: Item{}
|
background: Item{}
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
|
@ -451,7 +523,13 @@ AbstractMainPage {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
onClicked: listStackView.pop()
|
KeyNavigation.down: listStackView
|
||||||
|
KeyNavigation.right: groupCallButton
|
||||||
|
KeyNavigation.left: groupCallButton
|
||||||
|
onClicked: {
|
||||||
|
listStackView.pop()
|
||||||
|
titleLoader.item.forceActiveFocus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 3 * DefaultStyle.dp
|
spacing: 3 * DefaultStyle.dp
|
||||||
|
|
@ -477,6 +555,7 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: groupCallButton
|
||||||
enabled: mainItem.selectedParticipantsCount.length != 0
|
enabled: mainItem.selectedParticipantsCount.length != 0
|
||||||
Layout.rightMargin: 21 * DefaultStyle.dp
|
Layout.rightMargin: 21 * DefaultStyle.dp
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
|
|
@ -485,21 +564,32 @@ AbstractMainPage {
|
||||||
rightPadding: 12 * DefaultStyle.dp
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
text: qsTr("Lancer")
|
text: qsTr("Lancer")
|
||||||
textSize: 13 * DefaultStyle.dp
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
KeyNavigation.down: listStackView
|
||||||
|
KeyNavigation.left: backGroupCallButton
|
||||||
|
KeyNavigation.right: backGroupCallButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.startGroupCallRequested()
|
mainItem.startGroupCallRequested()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: groupCallItem
|
id: groupCallItem
|
||||||
// RowLayout {
|
FocusScope{
|
||||||
|
width: parent?.width
|
||||||
|
height: parent?.height
|
||||||
|
Control.StackView.onActivated: {
|
||||||
|
titleLoader.sourceComponent = groupCallTitle
|
||||||
|
addParticipantsLayout.forceActiveFocus()
|
||||||
|
}
|
||||||
AddParticipantsLayout {
|
AddParticipantsLayout {
|
||||||
Control.StackView.onActivated: titleLoader.sourceComponent = groupCallTitle
|
|
||||||
id: addParticipantsLayout
|
id: addParticipantsLayout
|
||||||
|
anchors.fill: parent
|
||||||
onSelectedParticipantsCountChanged: mainItem.selectedParticipantsCount = selectedParticipantsCount
|
onSelectedParticipantsCountChanged: mainItem.selectedParticipantsCount = selectedParticipantsCount
|
||||||
nameGroupCall: true
|
nameGroupCall: true
|
||||||
|
focus: true
|
||||||
Connections {
|
Connections {
|
||||||
target: mainItem
|
target: mainItem
|
||||||
function onStartGroupCallRequested() {
|
function onStartGroupCallRequested() {
|
||||||
|
|
@ -519,7 +609,7 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
|
|
@ -528,18 +618,21 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: contactDetailComp
|
id: contactDetailComp
|
||||||
|
FocusScope{
|
||||||
|
width: parent?.width
|
||||||
|
height: parent?.height
|
||||||
ContactLayout {
|
ContactLayout {
|
||||||
id: contactDetail
|
id: contactDetail
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.topMargin: 45 * DefaultStyle.dp
|
||||||
|
anchors.bottomMargin: 45 * DefaultStyle.dp
|
||||||
visible: mainItem.selectedRowHistoryGui != undefined
|
visible: mainItem.selectedRowHistoryGui != undefined
|
||||||
property var contactObj: UtilsCpp.findFriendByAddress(contactAddress)
|
property var contactObj: UtilsCpp.findFriendByAddress(contactAddress)
|
||||||
contact: contactObj && contactObj.value || null
|
contact: contactObj && contactObj.value || null
|
||||||
conferenceInfo: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.conferenceInfo || null
|
conferenceInfo: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.conferenceInfo || null
|
||||||
contactAddress: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.remoteAddress || ""
|
contactAddress: mainItem.selectedRowHistoryGui && mainItem.selectedRowHistoryGui.core.remoteAddress || ""
|
||||||
contactName: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.displayName : ""
|
contactName: mainItem.selectedRowHistoryGui ? mainItem.selectedRowHistoryGui.core.displayName : ""
|
||||||
anchors.top: rightPanelStackView.top
|
|
||||||
anchors.bottom: rightPanelStackView.bottom
|
|
||||||
anchors.topMargin: 45 * DefaultStyle.dp
|
|
||||||
anchors.bottomMargin: 45 * DefaultStyle.dp
|
|
||||||
buttonContent: PopupButton {
|
buttonContent: PopupButton {
|
||||||
id: detailOptions
|
id: detailOptions
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
@ -588,6 +681,7 @@ AbstractMainPage {
|
||||||
Layout.preferredHeight: 2 * DefaultStyle.dp
|
Layout.preferredHeight: 2 * DefaultStyle.dp
|
||||||
color: DefaultStyle.main2_400
|
color: DefaultStyle.main2_400
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: IconLabel {
|
contentItem: IconLabel {
|
||||||
|
|
@ -627,7 +721,6 @@ AbstractMainPage {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Math.min(detailControl.implicitHeight, contentHeight)
|
height: Math.min(detailControl.implicitHeight, contentHeight)
|
||||||
|
|
||||||
|
|
||||||
spacing: 20 * DefaultStyle.dp
|
spacing: 20 * DefaultStyle.dp
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
@ -719,6 +812,7 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
component IconLabel: RowLayout {
|
component IconLabel: RowLayout {
|
||||||
id: iconLabel
|
id: iconLabel
|
||||||
|
|
|
||||||
|
|
@ -363,6 +363,8 @@ AbstractMainPage {
|
||||||
Component {
|
Component {
|
||||||
id: contactDetail
|
id: contactDetail
|
||||||
Item {
|
Item {
|
||||||
|
width: parent?.width
|
||||||
|
height: parent?.height
|
||||||
property string objectName: "contactDetail"
|
property string objectName: "contactDetail"
|
||||||
Control.StackView.onActivated: mainItem.leftPanelEnabled = true
|
Control.StackView.onActivated: mainItem.leftPanelEnabled = true
|
||||||
Control.StackView.onDeactivated: mainItem.leftPanelEnabled = false
|
Control.StackView.onDeactivated: mainItem.leftPanelEnabled = false
|
||||||
|
|
@ -791,6 +793,8 @@ AbstractMainPage {
|
||||||
Component {
|
Component {
|
||||||
id: contactEdition
|
id: contactEdition
|
||||||
ContactEdition {
|
ContactEdition {
|
||||||
|
width: rightPanelStackView.width
|
||||||
|
height: rightPanelStackView.height
|
||||||
property string objectName: "contactEdition"
|
property string objectName: "contactEdition"
|
||||||
onCloseEdition: {
|
onCloseEdition: {
|
||||||
if (rightPanelStackView.depth <= 1) rightPanelStackView.clear()
|
if (rightPanelStackView.depth <= 1) rightPanelStackView.clear()
|
||||||
|
|
|
||||||
|
|
@ -32,15 +32,18 @@ AbstractMainPage {
|
||||||
|
|
||||||
function editConference(confInfoGui = null) {
|
function editConference(confInfoGui = null) {
|
||||||
var isCreation = !confInfoGui
|
var isCreation = !confInfoGui
|
||||||
|
var item
|
||||||
if (isCreation) {
|
if (isCreation) {
|
||||||
confInfoGui = Qt.createQmlObject('import Linphone
|
confInfoGui = Qt.createQmlObject('import Linphone
|
||||||
ConferenceInfoGui{
|
ConferenceInfoGui{
|
||||||
}', mainItem)
|
}', mainItem)
|
||||||
mainItem.selectedConference = confInfoGui
|
mainItem.selectedConference = confInfoGui
|
||||||
leftPanelStackView.push(createConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
item = leftPanelStackView.push(createConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
||||||
|
item.forceActiveFocus()
|
||||||
} else {
|
} else {
|
||||||
mainItem.selectedConference = confInfoGui
|
mainItem.selectedConference = confInfoGui
|
||||||
overridenRightPanelStackView.push(editConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
item = overridenRightPanelStackView.push(editConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
||||||
|
item.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,9 +123,9 @@ AbstractMainPage {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: listLayout
|
id: listLayout
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
id: listLayoutIn
|
width: parent.width
|
||||||
spacing: 0
|
height: listLayoutIn.implicitHeight
|
||||||
property string objectName: "listLayout"
|
property string objectName: "listLayout"
|
||||||
Control.StackView.onDeactivated: {
|
Control.StackView.onDeactivated: {
|
||||||
mainItem.selectedConference = null
|
mainItem.selectedConference = null
|
||||||
|
|
@ -137,6 +140,10 @@ AbstractMainPage {
|
||||||
value: conferenceList.count === 0
|
value: conferenceList.count === 0
|
||||||
restoreMode: Binding.RestoreBindingOrValue
|
restoreMode: Binding.RestoreBindingOrValue
|
||||||
}
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
id: listLayoutIn
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 0
|
||||||
RowLayout {
|
RowLayout {
|
||||||
enabled: mainItem.leftPanelEnabled
|
enabled: mainItem.leftPanelEnabled
|
||||||
Layout.rightMargin: 39 * DefaultStyle.dp
|
Layout.rightMargin: 39 * DefaultStyle.dp
|
||||||
|
|
@ -168,10 +175,10 @@ AbstractMainPage {
|
||||||
// Layout.fillWidth: true
|
// 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")
|
||||||
focusedBorderColor: DefaultStyle.main1_500_main
|
|
||||||
Layout.preferredWidth: 331 * DefaultStyle.dp
|
Layout.preferredWidth: 331 * DefaultStyle.dp
|
||||||
|
KeyNavigation.up: conferenceList
|
||||||
|
KeyNavigation.down: conferenceList
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
Layout.topMargin: 38 * DefaultStyle.dp
|
Layout.topMargin: 38 * DefaultStyle.dp
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -188,7 +195,6 @@ AbstractMainPage {
|
||||||
restoreMode: Binding.RestoreBindingOrValue
|
restoreMode: Binding.RestoreBindingOrValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
// Remove 24 from first section padding because we cannot know that it is the first section. 24 is the margins between sections.
|
// Remove 24 from first section padding because we cannot know that it is the first section. 24 is the margins between sections.
|
||||||
Layout.topMargin: 38 * DefaultStyle.dp - 24 * DefaultStyle.dp
|
Layout.topMargin: 38 * DefaultStyle.dp - 24 * DefaultStyle.dp
|
||||||
|
|
@ -199,7 +205,20 @@ AbstractMainPage {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
visible: count != 0
|
visible: count != 0
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
|
highlightFollowsCurrentItem: true
|
||||||
|
preferredHighlightBegin: height/2 - 10
|
||||||
|
preferredHighlightEnd: height/2 + 10
|
||||||
|
highlightRangeMode: ListView.ApplyRange
|
||||||
searchBarText: searchBar.text
|
searchBarText: searchBar.text
|
||||||
|
Keys.onPressed: (event) => {
|
||||||
|
if(event.key == Qt.Key_Escape){
|
||||||
|
searchBar.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}else if(event.key == Qt.Key_Right){
|
||||||
|
overridenRightPanelStackView.currentItem.forceActiveFocus()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
onSelectedConferenceChanged: {
|
onSelectedConferenceChanged: {
|
||||||
mainItem.selectedConference = selectedConference
|
mainItem.selectedConference = selectedConference
|
||||||
}
|
}
|
||||||
|
|
@ -216,19 +235,23 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: createConf
|
id: createConf
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
id: createConfLayout
|
id: createConfLayout
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
property bool isCreation
|
property bool isCreation
|
||||||
|
ColumnLayout {
|
||||||
spacing: 33 * DefaultStyle.dp
|
spacing: 33 * DefaultStyle.dp
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
width: 320 * DefaultStyle.dp
|
width: 320 * DefaultStyle.dp
|
||||||
Layout.rightMargin: 35 * DefaultStyle.dp
|
Layout.rightMargin: 35 * DefaultStyle.dp
|
||||||
|
spacing: 5 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
|
id: backButton
|
||||||
background: Item{}
|
background: Item{}
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
|
|
@ -237,6 +260,9 @@ AbstractMainPage {
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
|
KeyNavigation.right: createButton
|
||||||
|
KeyNavigation.down: meetingSetup
|
||||||
onClicked: {
|
onClicked: {
|
||||||
meetingSetup.conferenceInfoGui.core.undo()
|
meetingSetup.conferenceInfoGui.core.undo()
|
||||||
leftPanelStackView.pop()
|
leftPanelStackView.pop()
|
||||||
|
|
@ -252,9 +278,12 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: createButton
|
||||||
Layout.preferredWidth: 57 * DefaultStyle.dp
|
Layout.preferredWidth: 57 * DefaultStyle.dp
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
|
KeyNavigation.left: backButton
|
||||||
|
KeyNavigation.down: meetingSetup
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
text: qsTr("Créer")
|
text: qsTr("Créer")
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
@ -282,8 +311,10 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
MeetingSetUp {
|
MeetingSetUp {
|
||||||
id: meetingSetup
|
id: meetingSetup
|
||||||
conferenceInfoGui: parent.conferenceInfoGui
|
conferenceInfoGui: createConfLayout.conferenceInfoGui
|
||||||
isCreation: parent.isCreation
|
isCreation: createConfLayout.isCreation
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
Layout.rightMargin: 35 * DefaultStyle.dp
|
Layout.rightMargin: 35 * DefaultStyle.dp
|
||||||
Connections {
|
Connections {
|
||||||
target: meetingSetup.conferenceInfoGui ? meetingSetup.conferenceInfoGui.core : null
|
target: meetingSetup.conferenceInfoGui ? meetingSetup.conferenceInfoGui.core : null
|
||||||
|
|
@ -311,7 +342,7 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: mainItem
|
target: mainItem
|
||||||
function onAddParticipantsValidated(selectedParticipants) {
|
onAddParticipantsValidated: (selectedParticipants) => {
|
||||||
meetingSetup.conferenceInfoGui.core.resetParticipants(selectedParticipants)
|
meetingSetup.conferenceInfoGui.core.resetParticipants(selectedParticipants)
|
||||||
leftPanelStackView.pop()
|
leftPanelStackView.pop()
|
||||||
}
|
}
|
||||||
|
|
@ -319,47 +350,71 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: editConf
|
id: editConf
|
||||||
ColumnLayout {
|
FocusScope{
|
||||||
|
id: editFocusScope
|
||||||
property bool isCreation
|
property bool isCreation
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
|
width : parent.width
|
||||||
|
height: editLayout.implicitHeight
|
||||||
|
ColumnLayout {
|
||||||
|
id: editLayout
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 0
|
||||||
Section {
|
Section {
|
||||||
content: RowLayout {
|
content: RowLayout {
|
||||||
spacing: 10 * DefaultStyle.dp
|
spacing: 10 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
background: Item{}
|
id: backButton
|
||||||
icon.source: AppIcons.leftArrow
|
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
icon.source: AppIcons.leftArrow
|
||||||
|
KeyNavigation.left: saveButton
|
||||||
|
KeyNavigation.right: titleText
|
||||||
|
KeyNavigation.down: conferenceEdit
|
||||||
|
KeyNavigation.up: conferenceEdit
|
||||||
onClicked: {
|
onClicked: {
|
||||||
conferenceEdit.conferenceInfoGui.core.undo()
|
conferenceEdit.conferenceInfoGui.core.undo()
|
||||||
overridenRightPanelStackView.pop()
|
overridenRightPanelStackView.pop()
|
||||||
}
|
}
|
||||||
|
background: Item{}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
Component.onCompleted: text = mainItem.selectedConference.core.subject
|
id: titleText
|
||||||
|
Layout.fillWidth: true
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
font {
|
font {
|
||||||
pixelSize: 20 * DefaultStyle.dp
|
pixelSize: 20 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
background: Item{}
|
KeyNavigation.left: backButton
|
||||||
Layout.fillWidth: true
|
KeyNavigation.right: saveButton
|
||||||
|
KeyNavigation.down: conferenceEdit
|
||||||
|
KeyNavigation.up: conferenceEdit
|
||||||
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
||||||
onEditingFinished: mainItem.selectedConference.core.subject = text
|
onEditingFinished: mainItem.selectedConference.core.subject = text
|
||||||
|
Component.onCompleted: text = mainItem.selectedConference.core.subject
|
||||||
|
background: Item{}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: saveButton
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
leftPadding: 12 * DefaultStyle.dp
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
rightPadding: 12 * DefaultStyle.dp
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
text: qsTr("Save")
|
text: qsTr("Save")
|
||||||
textSize: 13 * DefaultStyle.dp
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
KeyNavigation.left: titleText
|
||||||
|
KeyNavigation.right: backButton
|
||||||
|
KeyNavigation.down: conferenceEdit
|
||||||
|
KeyNavigation.up: conferenceEdit
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mainItem.selectedConference.core.subject.length === 0) {
|
if (mainItem.selectedConference.core.subject.length === 0) {
|
||||||
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
||||||
|
|
@ -377,8 +432,8 @@ AbstractMainPage {
|
||||||
MeetingSetUp {
|
MeetingSetUp {
|
||||||
id: conferenceEdit
|
id: conferenceEdit
|
||||||
property bool isCreation
|
property bool isCreation
|
||||||
isCreation: parent.isCreation
|
isCreation: editFocusScope.isCreation
|
||||||
conferenceInfoGui: parent.conferenceInfoGui
|
conferenceInfoGui: editFocusScope.conferenceInfoGui
|
||||||
onSaveSucceed: {
|
onSaveSucceed: {
|
||||||
overridenRightPanelStackView.pop()
|
overridenRightPanelStackView.pop()
|
||||||
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
||||||
|
|
@ -405,14 +460,21 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: addParticipants
|
id: addParticipants
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
property Control.StackView container
|
property Control.StackView container
|
||||||
property ConferenceInfoGui conferenceInfoGui
|
property ConferenceInfoGui conferenceInfoGui
|
||||||
|
FocusScope{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: addParticipantsButtons.implicitHeight
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: addParticipantsButtons
|
||||||
|
spacing: 5 * DefaultStyle.dp
|
||||||
Button {
|
Button {
|
||||||
|
id: removeButton
|
||||||
background: Item{}
|
background: Item{}
|
||||||
icon.source: AppIcons.leftArrow
|
icon.source: AppIcons.leftArrow
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
|
@ -420,6 +482,8 @@ AbstractMainPage {
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
|
KeyNavigation.right: addButton
|
||||||
|
KeyNavigation.down: addParticipantLayout
|
||||||
onClicked: container.pop()
|
onClicked: container.pop()
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -446,21 +510,28 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: addButton
|
||||||
enabled: addParticipantLayout.selectedParticipantsCount.length != 0
|
enabled: addParticipantLayout.selectedParticipantsCount.length != 0
|
||||||
Layout.rightMargin: 21 * DefaultStyle.dp
|
Layout.rightMargin: 21 * DefaultStyle.dp
|
||||||
topPadding: 6 * DefaultStyle.dp
|
topPadding: 6 * DefaultStyle.dp
|
||||||
bottomPadding: 6 * DefaultStyle.dp
|
bottomPadding: 6 * DefaultStyle.dp
|
||||||
leftPadding: 12 * DefaultStyle.dp
|
leftPadding: 12 * DefaultStyle.dp
|
||||||
rightPadding: 12 * DefaultStyle.dp
|
rightPadding: 12 * DefaultStyle.dp
|
||||||
|
focus: enabled
|
||||||
text: qsTr("Ajouter")
|
text: qsTr("Ajouter")
|
||||||
textSize: 13 * DefaultStyle.dp
|
textSize: 13 * DefaultStyle.dp
|
||||||
|
KeyNavigation.left: removeButton
|
||||||
|
KeyNavigation.down: addParticipantLayout
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.addParticipantsValidated(addParticipantLayout.selectedParticipants)
|
mainItem.addParticipantsValidated(addParticipantLayout.selectedParticipants)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
AddParticipantsLayout {
|
AddParticipantsLayout {
|
||||||
id: addParticipantLayout
|
id: addParticipantLayout
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
conferenceInfoGui: parent.conferenceInfoGui
|
conferenceInfoGui: parent.conferenceInfoGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -468,7 +539,12 @@ AbstractMainPage {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: meetingDetail
|
id: meetingDetail
|
||||||
|
FocusScope{
|
||||||
|
width: overridenRightPanelStackView.width
|
||||||
|
height: meetingDetailsLayout.implicitHeight
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: meetingDetailsLayout
|
||||||
|
anchors.fill: parent
|
||||||
visible: mainItem.selectedConference
|
visible: mainItem.selectedConference
|
||||||
spacing: 25 * DefaultStyle.dp
|
spacing: 25 * DefaultStyle.dp
|
||||||
Section {
|
Section {
|
||||||
|
|
@ -492,6 +568,7 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: editButton
|
||||||
visible: mainItem.selectedConference && UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
visible: mainItem.selectedConference && UtilsCpp.isMe(mainItem.selectedConference.core.organizerAddress)
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
|
|
@ -499,6 +576,10 @@ AbstractMainPage {
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
icon.source: AppIcons.pencil
|
icon.source: AppIcons.pencil
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
|
KeyNavigation.left: leftPanelStackView.currentItem
|
||||||
|
KeyNavigation.right: deletePopup
|
||||||
|
KeyNavigation.up: joinButton
|
||||||
|
KeyNavigation.down: shareNetworkButton
|
||||||
background: Item{}
|
background: Item{}
|
||||||
onClicked: mainItem.editConference(mainItem.selectedConference)
|
onClicked: mainItem.editConference(mainItem.selectedConference)
|
||||||
}
|
}
|
||||||
|
|
@ -507,9 +588,15 @@ AbstractMainPage {
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
contentImageColor: DefaultStyle.main1_500_main
|
contentImageColor: DefaultStyle.main1_500_main
|
||||||
popup.contentItem: RowLayout {
|
KeyNavigation.left: editButton.visible ? editButton : leftPanelStackView.currentItem
|
||||||
Button {
|
KeyNavigation.right: leftPanelStackView.currentItem
|
||||||
background: Item{}
|
KeyNavigation.up: joinButton
|
||||||
|
KeyNavigation.down: shareNetworkButton
|
||||||
|
|
||||||
|
popup.contentItem: Button {
|
||||||
|
color: deletePopup.popupBackgroundColor
|
||||||
|
borderColor: deletePopup.popupBackgroundColor
|
||||||
|
inversedColors: true
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
EffectImage {
|
EffectImage {
|
||||||
imageSource: AppIcons.trashCan
|
imageSource: AppIcons.trashCan
|
||||||
|
|
@ -550,7 +637,6 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Section {
|
Section {
|
||||||
content: ColumnLayout {
|
content: ColumnLayout {
|
||||||
spacing: 15 * DefaultStyle.dp
|
spacing: 15 * DefaultStyle.dp
|
||||||
|
|
@ -564,7 +650,9 @@ AbstractMainPage {
|
||||||
source: AppIcons.videoCamera
|
source: AppIcons.videoCamera
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: linkButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
font.bold: shadowEnabled
|
||||||
text: mainItem.selectedConference ? mainItem.selectedConference.core.uri : ""
|
text: mainItem.selectedConference ? mainItem.selectedConference.core.uri : ""
|
||||||
textSize: 14 * DefaultStyle.dp
|
textSize: 14 * DefaultStyle.dp
|
||||||
textWeight: 400 * DefaultStyle.dp
|
textWeight: 400 * DefaultStyle.dp
|
||||||
|
|
@ -572,18 +660,33 @@ AbstractMainPage {
|
||||||
inversedColors: true
|
inversedColors: true
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
background: Item{}
|
background: Item{}
|
||||||
|
Keys.onPressed: (event)=> {
|
||||||
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
||||||
|
clicked(undefined)
|
||||||
|
event.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
KeyNavigation.left: shareNetworkButton
|
||||||
|
KeyNavigation.right: shareNetworkButton
|
||||||
|
KeyNavigation.up: deletePopup
|
||||||
|
KeyNavigation.down: joinButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// TODO : voir si c'est en audio only quand on clique sur le lien
|
// TODO : voir si c'est en audio only quand on clique sur le lien
|
||||||
UtilsCpp.createCall(mainItem.selectedConference.core.uri)
|
UtilsCpp.createCall(mainItem.selectedConference.core.uri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: shareNetworkButton
|
||||||
Layout.preferredWidth: 24 * DefaultStyle.dp
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 24 * DefaultStyle.dp
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
||||||
icon.width: 24 * DefaultStyle.dp
|
icon.width: 24 * DefaultStyle.dp
|
||||||
icon.height: 24 * DefaultStyle.dp
|
icon.height: 24 * DefaultStyle.dp
|
||||||
background: Item{}
|
background: Item{}
|
||||||
icon.source: AppIcons.shareNetwork
|
icon.source: AppIcons.shareNetwork
|
||||||
|
KeyNavigation.left: linkButton
|
||||||
|
KeyNavigation.right: linkButton
|
||||||
|
KeyNavigation.up: deletePopup
|
||||||
|
KeyNavigation.down: joinButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UtilsCpp.copyToClipboard(mainItem.selectedConference.core.uri)
|
UtilsCpp.copyToClipboard(mainItem.selectedConference.core.uri)
|
||||||
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Le lien de la réunion a été copié dans le presse-papiers"))
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Le lien de la réunion a été copié dans le presse-papiers"))
|
||||||
|
|
@ -718,10 +821,16 @@ AbstractMainPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: joinButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Rejoindre la réunion")
|
text: qsTr("Rejoindre la réunion")
|
||||||
topPadding: 11 * DefaultStyle.dp
|
topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
|
focus: true
|
||||||
|
KeyNavigation.up: shareNetworkButton
|
||||||
|
KeyNavigation.down: deletePopup
|
||||||
|
KeyNavigation.left: leftPanelStackView.currentItem
|
||||||
|
KeyNavigation.right: leftPanelStackView.currentItem
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log(mainItem.selectedConference.core.uri)
|
console.log(mainItem.selectedConference.core.uri)
|
||||||
var callsWindow = UtilsCpp.getCallsWindow()
|
var callsWindow = UtilsCpp.getCallsWindow()
|
||||||
|
|
@ -732,4 +841,5 @@ AbstractMainPage {
|
||||||
Item { Layout.fillHeight: true}
|
Item { Layout.fillHeight: true}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue