2018-07-13 21:33:28 +00:00
|
|
|
import QtQuick 2.0
|
2019-06-23 11:30:17 +00:00
|
|
|
import QtQuick.Controls 2.2 as Controls
|
2018-07-13 21:33:28 +00:00
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
|
2018-11-19 03:54:40 +00:00
|
|
|
// TODO: search through contacts while typing
|
2019-06-23 11:30:17 +00:00
|
|
|
Controls.TextField {
|
2018-07-13 21:33:28 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
horizontalAlignment: Qt.AlignHCenter
|
|
|
|
|
verticalAlignment: Qt.AlignBottom
|
|
|
|
|
|
2019-06-23 11:30:17 +00:00
|
|
|
background: Rectangle {
|
|
|
|
|
opacity: 0
|
2018-07-13 21:33:28 +00:00
|
|
|
}
|
|
|
|
|
|
2018-11-19 03:54:40 +00:00
|
|
|
// append some text to the end of this input
|
2018-07-13 21:33:28 +00:00
|
|
|
signal append(string digit)
|
|
|
|
|
onAppend: {
|
|
|
|
|
text += digit
|
|
|
|
|
}
|
|
|
|
|
onTextChanged: {
|
|
|
|
|
text = dialerUtils.formatNumber(text);
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-19 03:54:40 +00:00
|
|
|
// remove last character from this text input
|
|
|
|
|
signal pop()
|
|
|
|
|
onPop: {
|
|
|
|
|
text = text.slice(0, -1)
|
2018-07-13 21:33:28 +00:00
|
|
|
}
|
|
|
|
|
}
|