Warning, /maui/index-fm/src/widgets/previewer/FileProperties.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.15
0002 import QtQuick.Controls 2.15
0003 import QtQuick.Layouts 1.13
0004 import org.mauikit.controls 1.3 as Maui
0005 import org.maui.index 1.0 as Index
0006 
0007 
0008 ColumnLayout
0009 {
0010     id: control
0011 
0012     property alias url : _permissions.url
0013 
0014     Index.FileProperties
0015     {
0016         id: _permissions
0017     }
0018 
0019     Index.Permission
0020     {
0021         id: _ownerPermissions
0022         url: control.url
0023         user: Index.Permission.OWNER
0024     }
0025 
0026     Index.Permission
0027     {
0028         id: _groupPermissions
0029         url: control.url
0030         user: Index.Permission.GROUP
0031     }
0032 
0033     Index.Permission
0034     {
0035         id: _otherPermissions
0036         url: control.url
0037         user: Index.Permission.OTHER
0038     }
0039 
0040     Maui.SectionGroup
0041     {
0042         Layout.fillWidth: true
0043         title: i18n("Permissions")
0044         description: i18n("Set file permissions to access this file")
0045 
0046         Maui.SectionItem
0047         {
0048             label1.text: i18n("Owner")
0049             columns: 1
0050 
0051             Maui.ToolActions
0052             {
0053                 Layout.fillWidth: true
0054                 autoExclusive: false
0055 
0056                 Action
0057                 {
0058                     text: i18n("Read")
0059                     checked: _ownerPermissions.read
0060                     onTriggered: _ownerPermissions.read = !_ownerPermissions.read
0061                 }
0062 
0063                 Action
0064                 {
0065                     text: i18n("Write")
0066                     checked: _ownerPermissions.write
0067 
0068                 }
0069 
0070                 Action
0071                 {
0072                     text: i18n("Execute")
0073                     checked: _ownerPermissions.execute
0074                 }
0075             }
0076         }
0077 
0078         Maui.SectionItem
0079         {
0080             label1.text: i18n("Group")
0081             columns: 1
0082 
0083             Maui.ToolActions
0084             {
0085                 Layout.fillWidth: true
0086                 autoExclusive: false
0087                 //                checkable: true
0088 
0089                 Action
0090                 {
0091                     text: i18n("Read")
0092                     checked: _groupPermissions.read
0093 
0094                 }
0095 
0096                 Action
0097                 {
0098                     text: i18n("Write")
0099                     checked: _groupPermissions.write
0100 
0101 
0102                 }
0103 
0104                 Action
0105                 {
0106                     text: i18n("Execute")
0107                     checked: _groupPermissions.execute
0108                 }
0109             }
0110         }
0111 
0112         Maui.SectionItem
0113         {
0114             label1.text: i18n("Everyone")
0115             columns: 1
0116 
0117             Maui.ToolActions
0118             {
0119                 Layout.fillWidth: true
0120                 autoExclusive: false
0121 
0122                 Action
0123                 {
0124                     text: i18n("Read")
0125                     checked: _otherPermissions.read
0126                 }
0127 
0128                 Action
0129                 {
0130                     text: i18n("Write")
0131                     checked: _otherPermissions.read
0132                 }
0133 
0134                 Action
0135                 {
0136                     text: i18n("Execute")
0137                     checked: _otherPermissions.execute
0138 
0139                 }
0140             }
0141         }
0142 
0143     }
0144 
0145     Maui.SectionGroup
0146     {
0147         Layout.fillWidth: true
0148 
0149         title: i18n("Ownership")
0150         description: i18n("Set file permissions to access this file")
0151 
0152         Maui.SectionItem
0153         {
0154             label1.text: i18n("Owner")
0155             label2.text: _permissions.owner
0156 
0157         }
0158 
0159         Maui.SectionItem
0160         {
0161             label1.text: i18n("Group")
0162             label2.text: _permissions.group
0163 
0164         }
0165         Maui.SectionItem
0166         {
0167             label1.text: i18n("Users")
0168 
0169             ComboBox
0170             {
0171                 model: _permissions.users
0172             }
0173         }
0174 
0175         Maui.SectionItem
0176         {
0177             label1.text: i18n("Groups")
0178 
0179             ComboBox
0180             {
0181                 model: _permissions.groups
0182             }
0183         }
0184     }
0185 }