Warning, /maui/communicator/src/widgets/MessageComposer.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.9 0002 import QtQuick.Controls 2.3 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 0007 Maui.PopupPage 0008 { 0009 id: control 0010 property var contact : ({}) 0011 0012 maxWidth: 500 0013 maxHeight: maxWidth 0014 0015 hint: 1 0016 0017 actions: Action 0018 { 0019 text: i18n("Send") 0020 icon.name: "mail-send" 0021 0022 onTriggered: 0023 { 0024 if(_combobox.currentText === contact.email) 0025 { 0026 _communicator.email(contact.email, "", "", _subjectTextField.text, _editor.text) 0027 } 0028 else if(_combobox.currentText === contact.tel) 0029 { 0030 _communicator.sendSMS(contact.tel, _subjectTextField.text, _editor.text) 0031 } 0032 0033 notify("emblem-info", i18n("Message sent"), contact.tel); 0034 close(); 0035 } 0036 } 0037 0038 headBar.forceCenterMiddleContent: false 0039 headBar.middleContent: ComboBox 0040 { 0041 id: _combobox 0042 Layout.fillWidth: true 0043 0044 model: 0045 { 0046 if(contact.email && contact.tel) 0047 return [contact.email, contact.tel] 0048 else if(contact.email) 0049 return [contact.email] 0050 else if(contact.tel) 0051 return [contact.tel] 0052 } 0053 } 0054 0055 page.headerColumn:[ Maui.ToolBar 0056 { 0057 width: parent.width 0058 visible: _combobox.currentText === contact.email 0059 0060 middleContent: TextField 0061 { 0062 id: _subjectTextField 0063 Layout.fillWidth: true 0064 placeholderText: i18n("Subject") 0065 } 0066 0067 }] 0068 0069 stack: TextArea 0070 { 0071 id: _editor 0072 Layout.fillHeight: true 0073 Layout.fillWidth: true 0074 placeholderText: i18n("Message") 0075 0076 } 0077 }