new call (TODO : find crash origin)
This commit is contained in:
parent
d0bb53ddc6
commit
9fbc6f5bbf
4 changed files with 52 additions and 13 deletions
|
|
@ -192,12 +192,12 @@ FocusScope{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
visible: !mainItem.lastRowVisible
|
visible: mainItem.lastRowVisible
|
||||||
// Invisible item to move the last two buttons to the right
|
// Invisible item to move the last two buttons to the right
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
id: launchCallButton
|
id: launchCallButton
|
||||||
visible: !mainItem.lastRowVisible
|
visible: mainItem.lastRowVisible
|
||||||
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
|
||||||
|
|
@ -221,7 +221,7 @@ FocusScope{
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
id: eraseButton
|
id: eraseButton
|
||||||
visible: !mainItem.lastRowVisible
|
visible: mainItem.lastRowVisible
|
||||||
leftPadding: 5 * DefaultStyle.dp
|
leftPadding: 5 * DefaultStyle.dp
|
||||||
rightPadding: 5 * DefaultStyle.dp
|
rightPadding: 5 * DefaultStyle.dp
|
||||||
topPadding: 5 * DefaultStyle.dp
|
topPadding: 5 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ Control.Popup {
|
||||||
}
|
}
|
||||||
contentItem: NumericPad{
|
contentItem: NumericPad{
|
||||||
id: numPad
|
id: numPad
|
||||||
lastRowVisible: lastRowVisible
|
lastRowVisible: mainItem.lastRowVisible
|
||||||
currentCall: mainItem.currentCall
|
currentCall: mainItem.currentCall
|
||||||
onButtonPressed: (text) => {
|
onButtonPressed: (text) => {
|
||||||
console.log("BUTTON PRESSED NUMPAD")
|
console.log("BUTTON PRESSED NUMPAD")
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ FocusScope {
|
||||||
spacing: 22 * DefaultStyle.dp
|
spacing: 22 * DefaultStyle.dp
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 18 * DefaultStyle.dp
|
spacing: 18 * DefaultStyle.dp
|
||||||
|
visible: mainItem.displayCurrentCalls
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("Appels en cours")
|
text: qsTr("Appels en cours")
|
||||||
font {
|
font {
|
||||||
|
|
@ -38,7 +39,6 @@ FocusScope {
|
||||||
Layout.preferredHeight: callList.height
|
Layout.preferredHeight: callList.height
|
||||||
Layout.maximumHeight: mainItem.height/2
|
Layout.maximumHeight: mainItem.height/2
|
||||||
// Layout.fillHeight: true
|
// Layout.fillHeight: true
|
||||||
visible: mainItem.displayCurrentCalls
|
|
||||||
contentHeight: callList.height
|
contentHeight: callList.height
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
RoundedPane {
|
RoundedPane {
|
||||||
|
|
|
||||||
|
|
@ -610,14 +610,50 @@ AbstractWindow {
|
||||||
id: numPadPopup
|
id: numPadPopup
|
||||||
width: parent.width
|
width: parent.width
|
||||||
roundedBottom: true
|
roundedBottom: true
|
||||||
|
lastRowVisible: false
|
||||||
visible: false
|
visible: false
|
||||||
leftPadding: 40 * DefaultStyle.dp
|
leftPadding: 40 * DefaultStyle.dp
|
||||||
rightPadding: 40 * DefaultStyle.dp
|
rightPadding: 40 * DefaultStyle.dp
|
||||||
topPadding: 41 * DefaultStyle.dp
|
topPadding: 41 * DefaultStyle.dp
|
||||||
bottomPadding: 18 * DefaultStyle.dp
|
bottomPadding: 18 * DefaultStyle.dp
|
||||||
onLaunchCall: {
|
}
|
||||||
UtilsCpp.createCall(dialerTextInput.text)
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component {
|
||||||
|
id: newCallPanel
|
||||||
|
NewCallForm {
|
||||||
|
id: newCallForm
|
||||||
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Nouvel appel")
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.topMargin: 21 * DefaultStyle.dp
|
||||||
|
anchors.leftMargin: 16 * DefaultStyle.dp
|
||||||
|
anchors.rightMargin: 16 * DefaultStyle.dp
|
||||||
|
groupCallVisible: false
|
||||||
|
searchBarColor: DefaultStyle.grey_0
|
||||||
|
searchBarBorderColor: DefaultStyle.grey_200
|
||||||
|
numPadPopup: numericPad
|
||||||
|
onContactClicked: (contact) => {
|
||||||
|
startCallWithContact(contact, false, rightPanel)
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: 402 * DefaultStyle.dp
|
||||||
|
NumericPadPopup {
|
||||||
|
id: numericPad
|
||||||
|
width: parent.width
|
||||||
|
roundedBottom: true
|
||||||
|
visible: newCallForm.searchBar.numericPadButton.checked
|
||||||
|
leftPadding: 40 * DefaultStyle.dp
|
||||||
|
rightPadding: 40 * DefaultStyle.dp
|
||||||
|
topPadding: 41 * DefaultStyle.dp
|
||||||
|
bottomPadding: 18 * DefaultStyle.dp
|
||||||
|
onLaunchCall: {
|
||||||
|
UtilsCpp.createCall(newCallForm.searchBar.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1377,16 +1413,19 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
CheckableButton {
|
CheckableButton {
|
||||||
id: newCallButton
|
id: newCallButton
|
||||||
checkable: false
|
checkable: true
|
||||||
icon.source: AppIcons.newCall
|
icon.source: AppIcons.newCall
|
||||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||||
icon.width: 32 * DefaultStyle.dp
|
icon.width: 32 * DefaultStyle.dp
|
||||||
icon.height: 32 * DefaultStyle.dp
|
icon.height: 32 * DefaultStyle.dp
|
||||||
onClicked: {
|
onCheckedChanged: {
|
||||||
var mainWin = UtilsCpp.getMainWindow()
|
if (checked) {
|
||||||
UtilsCpp.smartShowWindow(mainWin)
|
rightPanel.visible = true
|
||||||
mainWin.goToNewCall()
|
rightPanel.replace(newCallPanel)
|
||||||
|
} else {
|
||||||
|
rightPanel.visible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue