From 81c9512458f561ef80c1e6575606d059677ee453 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 17 Jan 2018 14:17:35 +0100 Subject: [PATCH] feat(ui/modules/Linphone/TelKeypad): supports A, B, C and D keys (close #107) --- .../Styles/TelKeypad/TelKeypadStyle.qml | 2 +- ui/modules/Linphone/TelKeypad/TelKeypad.qml | 40 +++++-------------- .../Linphone/TelKeypad/TelKeypadButton.qml | 1 - 3 files changed, 10 insertions(+), 33 deletions(-) diff --git a/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml b/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml index 39837589e..b2aef9def 100644 --- a/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml +++ b/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml @@ -10,7 +10,7 @@ QtObject { property int columnSpacing: 0 property int height: 180 property int rowSpacing: 0 - property int width: 150 + property int width: 180 property color color: Colors.k property QtObject button: QtObject { diff --git a/ui/modules/Linphone/TelKeypad/TelKeypad.qml b/ui/modules/Linphone/TelKeypad/TelKeypad.qml index 1fe44f900..37ebc9f73 100644 --- a/ui/modules/Linphone/TelKeypad/TelKeypad.qml +++ b/ui/modules/Linphone/TelKeypad/TelKeypad.qml @@ -30,40 +30,19 @@ Rectangle { anchors.fill: parent - columns: 3 // Not a style. + columns: 4 // Not a style. rows: 4 // Same idea. columnSpacing: TelKeypadStyle.columnSpacing rowSpacing: TelKeypadStyle.rowSpacing Repeater { - model: [{ - text: '1', - icon: 'answering_machine' - }, { - text: '2' - },{ - text: '3' - }, { - text: '4' - }, { - text: '5' - }, { - text: '6' - }, { - text: '7' - }, { - text: '8' - }, { - text: '9' - }, { - text: '*' - }, { - text: '0', - icon: 'plus' - }, { - text: '#' - }] + model: [ + '1', '2', '3', 'A', + '4', '5', '6', 'B', + '7', '8', '9', 'C', + '*', '0', '#', 'D', + ] TelKeypadButton { property var _timeout @@ -71,10 +50,9 @@ Rectangle { Layout.fillHeight: true Layout.fillWidth: true - icon: modelData.icon || '' - text: modelData.text + text: modelData - onClicked: telKeypad.call.sendDtmf(modelData.text) + onClicked: telKeypad.call.sendDtmf(modelData) } } } diff --git a/ui/modules/Linphone/TelKeypad/TelKeypadButton.qml b/ui/modules/Linphone/TelKeypad/TelKeypadButton.qml index 0b4d8d9e5..6e088d548 100644 --- a/ui/modules/Linphone/TelKeypad/TelKeypadButton.qml +++ b/ui/modules/Linphone/TelKeypad/TelKeypadButton.qml @@ -9,7 +9,6 @@ Item { id: button property color color: TelKeypadStyle.button.color.normal - property string icon: '' property string text: '' signal clicked