Warning, /rolisteam/rolisteam/src/libraries/qml_views/CustomItems/PermissionFrame.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Layouts 1.15 0003 import QtQuick.Controls 2.15 0004 import Customization 1.0 0005 0006 GroupBox { 0007 id: root 0008 title: qsTr("Permission") 0009 property QtObject styleSheet: Theme.styleSheet("PermissionFrame") 0010 property alias permissionToAll: everyone.permission 0011 property alias playerModel: contactList.model 0012 signal permissionForUserChanged(var id, var permission) 0013 0014 ColumnLayout { 0015 anchors.fill: parent 0016 RowLayout { 0017 Layout.fillWidth: true 0018 Label { 0019 text: qsTr("All") 0020 } 0021 PermissionSlider { 0022 id: everyone 0023 Layout.fillWidth: true 0024 //onPermissionChanged: ctrl.setSharingToAll(permission) 0025 } 0026 } 0027 Repeater { 0028 id: contactList 0029 0030 RowLayout { 0031 Layout.fillWidth: true 0032 Image { 0033 source: "image://avatar/%1".arg(model.uuid) 0034 fillMode: Image.PreserveAspectFit 0035 sourceSize.width: 50 0036 sourceSize.height: 50 0037 enabled: everyone.permission === 0 0038 opacity: enabled ? 1.0 : 0.5 0039 } 0040 Label { 0041 text: model.name 0042 Layout.fillWidth: true 0043 enabled: everyone.permission === 0 0044 opacity: enabled ? 1.0 : 0.5 0045 } 0046 PermissionSlider { 0047 Layout.fillWidth: true 0048 onPermissionChanged: root.permissionForUserChanged(model.uuid, permission)//ctrl.setPermissionForUser(model.uuid,permission) 0049 enabled: everyone.permission === 0 0050 opacity: enabled ? 1.0 : 0.5 0051 } 0052 } 0053 } 0054 } 0055 }