linux.x86.linphone/Linphone/view/Item/PhoneNumberInput.qml
Gaelle Braud 99b1fb9bde Test file for qml items :
Text
ComboBox
TextInput
Button
TabBar
Tooltip
Carousel
+ fixes on this items
2023-11-02 17:26:47 +01:00

55 lines
No EOL
1.2 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts 1.0
import Linphone
ColumnLayout {
id: mainItem
property string label: ""
property string defaultText : ""
property bool mandatory: false
property int textInputWidth: 200
readonly property string phoneNumber: textField.inputText
readonly property string countryCode: combobox.currentText
Text {
visible: label.length > 0
textItem.verticalAlignment: Text.AlignVCenter
textItem.text: mainItem.label + (mainItem.mandatory ? "*" : "")
textItem.color: DefaultStyle.formItemLabelColor
textItem.font {
pointSize: DefaultStyle.formItemLabelSize
bold: true
}
}
Rectangle {
implicitWidth: mainItem.textInputWidth
implicitHeight: 30
radius: 20
color: DefaultStyle.formItemBackgroundColor
RowLayout {
anchors.fill: parent
PhoneNumberComboBox {
id: combobox
backgroundWidth: 100
}
Rectangle {
Layout.preferredWidth: 1
Layout.fillHeight: true
Layout.topMargin: 5
Layout.bottomMargin: 5
color: DefaultStyle.defaultTextColor
}
TextInput {
id: textField
Layout.fillWidth: true
defaultText: mainItem.defaultText
inputMethodHints: Qt.ImhDigitsOnly
fillWidth: true
validator: IntValidator{}
}
}
}
}