Warning, /maui/communicator/src/views/contacts/ContactField.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.14 0002 import QtQuick.Controls 2.14 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 0007 AbstractButton 0008 { 0009 id: control 0010 0011 Maui.Theme.colorSet: Maui.Theme.View 0012 Maui.Theme.inherit: false 0013 0014 padding: Maui.Style.contentMargins 0015 hoverEnabled: !Maui.Handy.isMobile 0016 0017 property alias content: _content.data 0018 0019 property alias label1 : _template.label1 0020 property alias label2 : _template.label2 0021 property alias label3 : _template.label3 0022 property alias label4 : _template.label4 0023 property alias iconItem : _template.iconItem 0024 property alias iconVisible : _template.iconVisible 0025 property alias iconSizeHint : _template.iconSizeHint 0026 property alias imageSizeHint : _template.imageSizeHint 0027 property alias imageSource : _template.imageSource 0028 property alias iconSource : _template.iconSource 0029 0030 property alias template : _template 0031 0032 default property list<Action> actions 0033 0034 property bool editing : false 0035 property bool expanded : false 0036 0037 property alias leftLabels : _template.leftLabels 0038 0039 checked: control.expanded 0040 0041 onClicked: 0042 { 0043 if(!control.editing) 0044 { 0045 expanded = !expanded 0046 } 0047 } 0048 0049 implicitHeight: implicitContentHeight + topPadding + bottomPadding 0050 0051 background: Rectangle 0052 { 0053 color: control.hovered ? Maui.Theme.hoverColor : Maui.Theme.alternateBackgroundColor 0054 radius: Maui.Style.radiusV 0055 } 0056 0057 contentItem: ColumnLayout 0058 { 0059 id: _contentLayout 0060 spacing: Maui.Style.space.medium 0061 0062 Maui.ListItemTemplate 0063 { 0064 id: _template 0065 Layout.fillWidth: true 0066 label1.font.weight: Font.Light 0067 label2.visible: !control.editing 0068 label2.font.pointSize: Maui.Style.fontSizes.big 0069 label2.font.weight: Font.Bold 0070 label2.wrapMode: Text.WrapAnywhere 0071 iconSizeHint: Maui.Style.iconSizes.medium 0072 } 0073 0074 ColumnLayout 0075 { 0076 id: _content 0077 Layout.fillWidth: true 0078 } 0079 0080 Maui.Separator 0081 { 0082 Layout.fillWidth: true 0083 visible: control.expanded && control.actions.length 0084 } 0085 0086 RowLayout 0087 { 0088 visible: !control.editing && control.expanded && control.actions.length 0089 Layout.fillWidth: true 0090 Layout.margins: Maui.Style.space.medium 0091 implicitHeight: Maui.Style.rowHeight 0092 spacing: Maui.Style.space.medium 0093 0094 Repeater 0095 { 0096 model: control.actions 0097 0098 Button 0099 { 0100 Layout.fillWidth: true 0101 Layout.fillHeight: true 0102 action: modelData 0103 // display: ToolButton.TextBesideIcon 0104 } 0105 } 0106 } 0107 } 0108 }