Warning, /rolisteam/rolisteam/src/libraries/mindmap/resources/qml/DrawerMenu.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick
0002 import QtQuick.Layouts
0003 import QtQuick.Controls
0004 import Customization
0005 import CustomItems
0006 
0007 Drawer {
0008     id: root
0009     edge: Qt.RightEdge
0010     property QtObject styleSheet: Theme.styleSheet("mindmap")
0011     property alias darkMode: nightMode.checked
0012     property QtObject ctrl
0013     ColumnLayout {
0014         anchors.fill: parent
0015 
0016         RowLayout {
0017             Layout.fillWidth: true
0018             Label {
0019                 text: qsTr("Name")
0020             }
0021             TextField {
0022                 text: ctrl.name
0023                 onEditingFinished: ctrl.name = text
0024                 Layout.fillWidth: true
0025             }
0026         }
0027         Switch {
0028             id: nightMode
0029             text: qsTr("Night Mode")
0030             checked: false
0031         }
0032 
0033         RowLayout {
0034             Layout.fillWidth: true
0035             Label {
0036                 text: qsTr("Default Style")
0037             }
0038             ComboBox {
0039                 id: combo
0040                 model: root.ctrl.styleModel
0041                 currentIndex: 0
0042                 onCurrentIndexChanged: ctrl.defaultStyleIndex = currentIndex
0043 
0044                contentItem: Rectangle {
0045                     radius: root.styleSheet.styleButtonRadius
0046                     width: root.styleSheet.styleButtonWidth
0047                     height: root.styleSheet.styleButtonHeight
0048                     border.width: root.styleSheet.borderSize
0049                     border.color: root.styleSheet.borderColor
0050                     gradient: Gradient {
0051                         GradientStop { position: 0.0; color: ctrl.getStyle(combo.currentIndex).colorOne }
0052                         GradientStop { position: 1.0; color: ctrl.getStyle(combo.currentIndex).colorTwo }
0053                     }
0054                     Text {
0055                         anchors.centerIn: parent
0056                         color: root.ctrl.getStyle(combo.currentIndex).textColor
0057                         text: qsTr("Text")
0058                     }
0059                 }
0060 
0061 
0062                 delegate: ItemDelegate {
0063                     width: combo.width
0064                     height: root.styleSheet.delegateHeight
0065 
0066                     Rectangle {
0067                         radius: root.styleSheet.styleButtonRadius
0068                         width: root.styleSheet.styleButtonWidth
0069                         height: root.styleSheet.styleButtonHeight
0070                         anchors.centerIn: parent
0071                         border.width: root.styleSheet.borderSize
0072                         border.color: root.styleSheet.borderColor
0073                         gradient: Gradient {
0074                             GradientStop { position: 0.0; color: colorOne }
0075                             GradientStop { position: 1.0; color: colorTwo }
0076                         }
0077                         Label {
0078                             anchors.centerIn: parent
0079                             color: model.textColor
0080                             text: qsTr("Text")
0081                         }
0082                     }
0083                 }
0084             }
0085         }
0086 
0087         PermissionFrame {
0088           id: userlist
0089           Layout.fillWidth: true
0090           visible: !ctrl.remote
0091           playerModel: ctrl.remotePlayerModel
0092           onPermissionToAllChanged: ctrl.setSharingToAll(permissionToAll)
0093           onPermissionForUserChanged: ctrl.setPermissionForUser(id, permission)
0094         }
0095 
0096         Label {
0097            property string logs
0098            text: qsTr("Errors:\n%1").arg(logs)
0099            Layout.fillHeight: true
0100            Layout.fillWidth: true
0101         }
0102     }
0103 }