Warning, /rolisteam/rolisteam/src/libraries/mindmap/resources/qml/ButtonGrid.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 
0007 GridLayout{
0008     id: _root
0009     columns: 4
0010     property QtObject styleSheet: Theme.styleSheet("mindmap")
0011     property alias addPackage: _pack.checked
0012     property alias addArrow: addArrow.checked
0013     property alias automaticSpacing: spacing.checked
0014     property bool showLittleMap: true
0015     required property QtObject ctrl
0016     property var actions:[]
0017 
0018 
0019     signal openDrawer()
0020     signal exportScene()
0021 
0022     IconButton {//undo
0023         source: _root.styleSheet.undoIcon
0024         enabled: _root.ctrl.canUndo
0025         onClicked: _root.ctrl.undo()
0026         tooltip: qsTr("Undo")
0027     }
0028     IconButton {//redo
0029         source: _root.styleSheet.redoIcon
0030         enabled: _root.ctrl.canRedo
0031         onClicked: _root.ctrl.redo()
0032         tooltip: qsTr("Redo")
0033     }
0034     IconButton {
0035         source: _root.styleSheet.saveIcon
0036         onClicked: _root.ctrl.modified = true
0037         tooltip: qsTr("Save Map")
0038     }
0039 
0040     IconButton {
0041         tooltip: qsTr("Open Drawer")
0042         source: _root.styleSheet.listIcon
0043         onClicked: _root.openDrawer()
0044     }
0045     IconButton {//add node
0046         id: _addRoot
0047         source: _root.styleSheet.addIcon
0048         tooltip: qsTr("Add Root")
0049         onClicked: _root.ctrl.addNode("")
0050     }
0051     IconButton {//add package
0052         id: _pack
0053         source: _root.styleSheet.editIcon
0054         checkable: true
0055         tooltip: qsTr("Add Package")
0056     }
0057 
0058     IconButton {//Add gray arrow
0059         id: addArrow
0060         tooltip: qsTr("Add Arrow")
0061         source: _root.styleSheet.addGrayArrow
0062         checkable: true
0063     }
0064     IconButton {//remove selection
0065         tooltip: qsTr("Remove Selection")
0066         source: _root.styleSheet.trashIcon
0067         enabled: _root.ctrl.hasSelection
0068         onClicked: _root.ctrl.removeSelection()
0069     }
0070 
0071     IconButton {
0072         tooltip: qsTr("Refresh")
0073         source: _root.styleSheet.refreshIcon
0074         onClicked: _root.ctrl.refresh()
0075     }
0076     IconButton {//
0077         tooltip: qsTr("Export As PNG")
0078         source: _root.styleSheet.exportIcon
0079         onClicked: _root.exportScene()
0080     }
0081     IconButton {//
0082         tooltip: _root.showLittleMap ? qsTr("Hide small map") : qsTr("Show small map")
0083         source: _root.styleSheet.litteMapIcon
0084         onClicked: _root.showLittleMap = !_root.showLittleMap
0085     }
0086     IconButton {//
0087         id: spacing
0088         tooltip: qsTr("Automatic Spacing")
0089         checkable: true
0090         source: _root.styleSheet.spacingIcon
0091     }
0092 
0093     Repeater {
0094         model: _root.actions
0095         IconButton {
0096             action: modelData
0097         }
0098     }
0099 
0100 }