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

0001 import QtQuick
0002 import QtQuick.Controls
0003 import QtQuick.Layouts
0004 import mindmap
0005 import Customization
0006 import CustomItems
0007 
0008 Drawer {
0009     id: _drawer
0010     property QtObject styleSheet: Theme.styleSheet("mindmapinteral")
0011     property alias darkMode: darkModeSwitch.checked
0012     property alias linkVisibility: linkVisible.checked
0013     property alias defaultStyle: combo.currentIndex
0014     required property MindMapController mediaCtrl
0015 
0016     SideMenuController {
0017         id: ctrl
0018         controller: _drawer.mediaCtrl
0019         criteria: criteria.currentIndex
0020         pattern: textField.text
0021     }
0022     Pane {
0023         anchors.fill: parent
0024 
0025 
0026         ColumnLayout {
0027             anchors.fill: parent
0028             RowLayout {
0029                 Layout.fillWidth: true
0030                 Label {
0031                     text: qsTr("Name")
0032                 }
0033                 TextField {
0034                     text: ctrl.name
0035                     onEditingFinished: ctrl.name = text
0036                     Layout.fillWidth: true
0037                 }
0038             }
0039             Switch {
0040                 id: darkModeSwitch
0041                 text: qsTr("Night Mode")
0042             }
0043             Switch {
0044                 id: linkVisible
0045                 text: qsTr("Link label visible:")
0046             }
0047             RowLayout {
0048                 Layout.fillWidth: true
0049                 Label {
0050                     text: qsTr("Default Style")
0051                 }
0052                 ComboBox {
0053                     id: combo
0054                     model: _drawer.mediaCtrl.styleModel
0055                     currentIndex: 0
0056 
0057                     contentItem: Rectangle {
0058                         radius: 8
0059                         width: 80
0060                         height: 15
0061                         border.width: 1
0062                         border.color: "black"
0063                         gradient: Gradient {
0064                             GradientStop { position: 0.0; color: _drawer.mediaCtrl.style(combo.currentIndex).colorOne }
0065                             GradientStop { position: 1.0; color: _drawer.mediaCtrl.style(combo.currentIndex).colorTwo }
0066                         }
0067                         Text {
0068                             anchors.centerIn: parent
0069                             color: _drawer.mediaCtrl.style(combo.currentIndex).textColor
0070                             text: qsTr("Text")
0071                         }
0072                     }
0073 
0074 
0075                     delegate: ItemDelegate {
0076                         width: combo.width
0077                         height: 20
0078 
0079                         Rectangle {
0080                             radius: 8
0081                             width: 80
0082                             height: 15
0083                             anchors.centerIn: parent
0084                             border.width: 1
0085                             border.color: "black"
0086                             gradient: Gradient {
0087                                 GradientStop { position: 0.0; color: model.colorOne }
0088                                 GradientStop { position: 1.0; color: model.colorTwo }
0089                             }
0090                             Label {
0091                                 anchors.centerIn: parent
0092                                 color: model.textColor
0093                                 text: qsTr("Text")
0094                             }
0095                         }
0096                     }
0097                 }
0098             }
0099             PermissionFrame {
0100                 id: userlist
0101                 Layout.fillWidth: true
0102                 visible: !mediaCtrl.remote
0103                 playerModel: mediaCtrl.remotePlayerModel
0104                 onPermissionToAllChanged: mediaCtrl.setSharingToAll(permissionToAll)
0105                 onPermissionForUserChanged: mediaCtrl.setPermissionForUser(id, permission)
0106             }
0107             GridLayout {
0108                 columns: 2
0109                 Layout.fillWidth: true
0110                 Label {
0111                     text: qsTr("Criteria")
0112                 }
0113                 ComboBox {
0114                     id: criteria
0115                     model: ["None", "Name", "Tag", "Parent"]
0116                     onCurrentIndexChanged: ctrl.criteria = currentIndex
0117                 }
0118                 Label {
0119                     text: qsTr("Pattern")
0120                 }
0121                 TextField {
0122                     id: textField
0123                     Layout.fillWidth: true
0124                 }
0125             }
0126 
0127             ListView {
0128                 id: _list
0129                 model: ctrl.model
0130                 Layout.fillWidth: true
0131                 clip: true
0132                 Layout.fillHeight: true
0133                 delegate:  GridLayout {
0134                     columns: 4
0135                     width:  _list.width
0136 
0137                     property QtObject item:  object
0138                     Image {
0139                         Layout.column: 0
0140                         source: hasPicture ? "image://nodeImages/%1".arg(item.id) : ""
0141                         sourceSize.width: 100
0142                         sourceSize.height: 100
0143                         Layout.preferredWidth: 100
0144                         fillMode: Image.PreserveAspectFit
0145                         Layout.rowSpan: 2
0146                     }
0147                     TextField {
0148                         Layout.column: 1
0149                         text: item.text
0150                         placeholderText: qsTr("Name")
0151                         onEditingFinished: item.text = text
0152                         Layout.fillWidth: true
0153                     }
0154                     TextArea {
0155                         Layout.column: 2
0156                         text: item.description
0157                         placeholderText: qsTr("Description")
0158                         onEditingFinished: item.description = text
0159                         Layout.rowSpan: 2
0160                         Layout.fillHeight: true
0161                         Layout.fillWidth: true
0162                     }
0163                     CheckBox {
0164                         text: qsTr("Select")
0165                         Layout.column: 3
0166                         onCheckedChanged:{
0167                             if(checked)
0168                                 MindmapManager.ctrl.selectionCtrl.addToSelection(item)
0169                             else
0170                                 MindmapManager.ctrl.selectionCtrl.removeFromSelection(item)
0171                         }
0172                     }
0173                     TextField {
0174                         text: item.tagsText
0175                         placeholderText: qsTr("Tags")
0176                         onEditingFinished: item.tagsText = text
0177                         Layout.fillWidth: true
0178                         Layout.column: 1
0179                         Layout.row :1
0180                     }
0181 
0182                     Button {
0183                         text: "apply to all"
0184                         Layout.column: 3
0185                         Layout.row :1
0186                     }
0187                     Rectangle {
0188                         Layout.preferredHeight: 3
0189                         Layout.column: 0
0190                         Layout.row :2
0191                         Layout.columnSpan: 4
0192                         Layout.fillWidth: true
0193                         color: _drawer.styleSheet.textColor
0194                     }
0195                 }
0196 
0197             }
0198         }
0199         /*Label {
0200             id: logs
0201             Layout.fillHeight: true
0202             Layout.fillWidth: true
0203         }*/
0204     }
0205 }