123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- import QtQuick 2.7
- import QtQuick.Controls 2.0
- import QtPositioning 5.7
- Item {
- width: 400
- height: 400
- property alias virtualPhoneDisplay: virtualPhoneDisplay
- property alias key_2: key_2
- property alias key_3: key_3
- property alias key_4: key_4
- property alias key_5: key_5
- property alias key_6: key_6
- property alias key_7: key_7
- property alias key_8: key_8
- property alias key_asterisk: key_asterisk
- property alias key_9: key_9
- property alias key_0: key_0
- property alias key_octothorpe: key_octothorpe
- property alias eraseCharacter: eraseCharacter
- property alias key_1: key_1
- Item {
- id: virtualPhoneLayout
- //spacing: 1
- anchors.bottomMargin: 40
- anchors.fill: parent
- Item {
- id: virtualPhoneDisplayLayout
- width: parent.width
- height: 70
- //spacing: 1
- anchors.left: parent.left
- anchors.leftMargin: 0
- anchors.top: parent.top
- anchors.topMargin: 0
- TextField {
- id: virtualPhoneDisplay
- font.pointSize: this.width > 600 ? 40 : (this.width > 300 ? 20 : 14)
- placeholderText: qsTr("Введите номер")
- horizontalAlignment: Text.AlignRight
- anchors.rightMargin: 40
- anchors.fill: parent
- }
- Button {
- id: eraseCharacter
- width: 40
- height: parent.height - 1
- text: qsTr("<")
- anchors.right: parent.right
- anchors.rightMargin: 0
- }
- }
- Text {
- id: virtualPhoneDistinationInfo
- height: (parent.height - 150) / 3 - 1
- text: qsTr("")
- anchors.top: parent.top
- anchors.topMargin: 70
- anchors.right: parent.right
- anchors.rightMargin: 0
- anchors.left: parent.left
- anchors.leftMargin: 0
- font.pixelSize: 12
- }
- Grid {
- id: virtualPhonePad
- width: (parent.width > parent.height ? parent.height : parent.width) - 1
- anchors.topMargin: (parent.height - 150) / 3 + 70
- anchors.left: parent.left
- anchors.leftMargin: 0
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 60
- spacing: 1
- layoutDirection: Qt.LeftToRight
- flow: Grid.LeftToRight
- columns: 3
- Button {
- id: key_1
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("1")
- transformOrigin: Item.Center
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_2
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("2")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_3
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("3")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_4
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("4")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_5
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("5")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_6
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("6")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_7
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("7")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_8
- x: parent.width / 3
- y: (parent.height * 2 / 4)
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("8")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_9
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("9")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_asterisk
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("*")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_0
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("0")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- Button {
- id: key_octothorpe
- width: parent.width / 3 - parent.spacing
- height: parent.height / 4 - parent.spacing
- text: qsTr("#")
- font.pixelSize: (parent.width > parent.height ? parent.height : parent.width)/7
- }
- }
- Item {
- id: virtualPhoneControls
- y: 0
- width: parent.width
- height: 60
- //spacing: 1
- anchors.left: parent.left
- anchors.leftMargin: 0
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 0
- Switch {
- id: callFromPBX
- width: 220
- text: qsTr("Вызов со стороны АТС")
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 0
- anchors.top: parent.top
- anchors.topMargin: 0
- anchors.left: parent.left
- anchors.leftMargin: 0
- }
- Button {
- id: callButton
- text: qsTr("ВЫЗОВ")
- anchors.leftMargin: 220
- anchors.fill: parent
- }
- }
- BusyIndicator {
- id: busyIndicator
- visible: false
- anchors.fill: parent
- }
- }
- Item {
- id: pageNameLayout
- height: 40
- anchors.right: parent.right
- anchors.rightMargin: 0
- anchors.left: parent.left
- anchors.leftMargin: 0
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 0
- Text {
- id: pageName
- text: qsTr("Виртуальный телефон")
- font.pixelSize: parent.width > 300 ? 24 : 12
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- renderType: Text.QtRendering
- font.capitalization: Font.MixedCase
- anchors.fill: parent
- }
- }
- }
|