Warning, /maui/mauikit/demo.6/src/controls/AltBrowserPage.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("AltBrowser")
0011 
0012     Maui.SectionGroup
0013     {
0014         title: control.title
0015         spacing: control.spacing
0016 
0017         DemoSection
0018         {
0019             title: "Buttons"
0020             body: i18n("Different button states: Regular, Checkable and flat. Can also have different layouts")
0021 
0022             column: Maui.AltBrowser
0023             {
0024                 id: _browser
0025                 Layout.fillWidth: true
0026                 implicitHeight: 500
0027                 model: 40
0028                 clip: true
0029                 gridView.itemSize: 160
0030 
0031                 headBar.leftContent: Maui.ToolActions
0032                 {
0033                    autoExclusive: true
0034                    expanded: true
0035 
0036                    Action
0037                    {
0038                        icon.name: "view-list-icons"
0039                        checked: _browser.viewType === Maui.AltBrowser.ViewType.Grid
0040                        onTriggered:  _browser.viewType = Maui.AltBrowser.ViewType.Grid
0041                    }
0042 
0043 
0044                    Action
0045                    {
0046                        icon.name: "view-list-details"
0047                        checked: _browser.viewType === Maui.AltBrowser.ViewType.List
0048                        onTriggered:  _browser.viewType = Maui.AltBrowser.ViewType.List
0049                    }
0050                 }
0051 
0052                 listDelegate: Maui.ListBrowserDelegate
0053                 {
0054                     width: ListView.view.width
0055                     label1.text: i18n("Title %1", modelData)
0056                     label2.text: "Subtitle"
0057                     label3.text: "+300"
0058                     label4.text: "Info"
0059                     imageSource: "qrc:/assets/6588168.jpg"
0060                 }
0061 
0062                 gridDelegate: Item
0063                 {
0064                     width: GridView.view.cellWidth
0065                     height: GridView.view.cellHeight
0066                     Maui.GridBrowserDelegate
0067                     {
0068                         anchors.fill: parent
0069                         anchors.margins: Maui.Style.space.small
0070                         label1.text: i18n("Title %1", modelData)
0071                         label2.text: "Subtitle"
0072                         imageSource: "qrc:/assets/6588168.jpg"
0073                     }
0074                 }
0075             }
0076         }
0077     }
0078 }