Warning, /maui/mauikit/demo.6/src/controls/OthersPage.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 0002 import QtQuick.Controls 0003 import QtQuick.Layouts 0004 0005 import org.mauikit.controls as Maui 0006 0007 DemoPage 0008 { 0009 id: control 0010 title: i18n("Other Widgets") 0011 0012 Maui.SectionGroup 0013 { 0014 title: control.title 0015 spacing: control.spacing 0016 0017 DemoSection 0018 { 0019 0020 Maui.FontPickerDialog 0021 { 0022 id: _dialog 0023 } 0024 0025 title: "FontPickerDialog" 0026 body: i18n("Different button states: Regular, Checkable and flat. Can also have different layouts") 0027 0028 Button 0029 { 0030 text: "Open" 0031 onClicked: _dialog.open() 0032 } 0033 } 0034 0035 DemoSection 0036 { 0037 title: i18n("Grid View") 0038 body: i18n("Grid view layout with an uniform cell width. This is optional.") 0039 0040 column: Maui.Page 0041 { 0042 Layout.fillWidth: true 0043 implicitHeight: 500 0044 0045 headBar.leftContent: Switch 0046 { 0047 checked: _grid.adaptContent 0048 onToggled: _grid.adaptContent = !_grid.adaptContent 0049 text: i18n("Adaptive") 0050 } 0051 0052 Maui.GridBrowser 0053 { 0054 id: _grid 0055 anchors.fill: parent 0056 clip: true 0057 model: 30 0058 0059 itemSize: 160 0060 enableLassoSelection: true 0061 0062 onItemsSelected: (indexes) => 0063 { 0064 for(var i in indexes) 0065 { 0066 var item = ({image: "qrc:/assets/6588168.jpg"}) 0067 _selectionBar.append(i, item) 0068 } 0069 } 0070 0071 delegate: Item 0072 { 0073 width: GridView.view.cellWidth 0074 height: GridView.view.cellHeight 0075 Maui.GridBrowserDelegate 0076 { 0077 anchors.fill: parent 0078 anchors.margins: Maui.Style.space.small 0079 label1.text: modelData 0080 iconSource: "folder" 0081 imageSource: "qrc:/assets/6588168.jpg" 0082 } 0083 } 0084 } 0085 0086 footer: Maui.SelectionBar 0087 { 0088 id: _selectionBar 0089 anchors.horizontalCenter: parent.horizontalCenter 0090 width: Math.min(parent.width-(Maui.Style.space.medium*2), implicitWidth) 0091 maxListHeight: root.height - (Maui.Style.contentMargins*2) 0092 0093 onExitClicked: 0094 { 0095 clear() 0096 } 0097 0098 Action 0099 { 0100 text: i18n("Open") 0101 icon.name: "document-open" 0102 } 0103 0104 Action 0105 { 0106 text: i18n("Share") 0107 icon.name: "document-share" 0108 } 0109 0110 Action 0111 { 0112 text: i18n("Export") 0113 icon.name: "document-export" 0114 } 0115 } 0116 } 0117 } 0118 0119 } 0120 }