2018-07-13 21:33:28 +00:00
|
|
|
import QtQuick 2.0
|
|
|
|
|
import QtQuick.Controls.Styles 1.4
|
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
|
|
2018-11-19 03:54:40 +00:00
|
|
|
// TODO: search through contacts while typing
|
2018-07-13 21:33:28 +00:00
|
|
|
PlasmaComponents.TextField {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
horizontalAlignment: Qt.AlignHCenter
|
|
|
|
|
verticalAlignment: Qt.AlignBottom
|
|
|
|
|
|
|
|
|
|
style: TextFieldStyle {
|
|
|
|
|
background: Rectangle {
|
|
|
|
|
opacity: 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|