shift-shell/dialer/package/contents/ui/Dialpad/PhoneNumberInput.qml
Jonah Brüchert e2160d3a02 Port Dialpad to Kirigami
No functional or visual changes
2019-06-27 21:31:32 +00:00

30 lines
623 B
QML

import QtQuick 2.0
import QtQuick.Controls 2.2 as Controls
import QtQuick.Layouts 1.1
// TODO: search through contacts while typing
Controls.TextField {
id: root
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignBottom
background: Rectangle {
opacity: 0
}
// append some text to the end of this input
signal append(string digit)
onAppend: {
text += digit
}
onTextChanged: {
text = dialerUtils.formatNumber(text);
}
// remove last character from this text input
signal pop()
onPop: {
text = text.slice(0, -1)
}
}