Warning, /plasma/libplasma/examples/applets/testcomponents/contents/ui/main.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2013 Sebastian Kügler <sebas@kde.org>
0003     SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 import QtQuick
0009 import QtQuick.Layouts
0010 import QtQuick.Templates as T
0011 import org.kde.kirigami as Kirigami
0012 import org.kde.plasma.components as PlasmaComponents
0013 import org.kde.plasma.plasmoid
0014 
0015 PlasmoidItem {
0016     id: root
0017 
0018     property int currentIndex: 0
0019     onCurrentIndexChanged: print("AAA", currentIndex)
0020 
0021     fullRepresentation: ColumnLayout {
0022         spacing: 0
0023 
0024         Layout.minimumWidth: Kirigami.Units.gridUnit * 15
0025         Layout.minimumHeight: Kirigami.Units.gridUnit * 15
0026 
0027         Layout.maximumWidth: Kirigami.Units.gridUnit * 60
0028         Layout.maximumHeight: Kirigami.Units.gridUnit * 60
0029 
0030         PlasmaComponents.TabBar {
0031             id: tabBar
0032 
0033             currentIndex: root.currentIndex
0034 
0035             onCurrentIndexChanged: {
0036                 root.currentIndex = currentIndex;
0037             }
0038 
0039             Layout.fillWidth: true
0040             // Layout.preferredHeight:
0041             // anchors {
0042             //     left: parent.left
0043             //     right: parent.right
0044             //     top: parent.top
0045             // }
0046 
0047             // height: Kirigami.Units.iconSizes.desktop
0048 
0049             PlasmaComponents.TabButton {
0050                 display: T.AbstractButton.IconOnly
0051                 text: "Theme Page"
0052                 icon.name: "preferences-desktop-appearance"
0053             }
0054             PlasmaComponents.TabButton {
0055                 display: T.AbstractButton.IconOnly
0056                 text: "Drag Page"
0057                 icon.name: "preferences-desktop-mouse"
0058             }
0059             PlasmaComponents.TabButton {
0060                 display: T.AbstractButton.IconOnly
0061                 text: "Icons Page"
0062                 icon.name: "preferences-desktop-icons"
0063             }
0064             PlasmaComponents.TabButton {
0065                 display: T.AbstractButton.IconOnly
0066                 text: "Dialogs Page"
0067                 icon.name: "preferences-system-windows"
0068             }
0069             PlasmaComponents.TabButton {
0070                 display: T.AbstractButton.IconOnly
0071                 text: "Buttons Page"
0072                 icon.name: "preferences-desktop-theme"
0073             }
0074             PlasmaComponents.TabButton {
0075                 display: T.AbstractButton.IconOnly
0076                 text: "Plasmoid Page"
0077                 icon.name: "plasma"
0078             }
0079             PlasmaComponents.TabButton {
0080                 display: T.AbstractButton.IconOnly
0081                 text: "Mouse Page"
0082                 icon.name: "preferences-desktop-mouse"
0083             }
0084         }
0085 
0086         PlasmaComponents.SwipeView {
0087             id: contentViewContainer
0088 
0089             Layout.fillWidth: true
0090             Layout.fillHeight: true
0091 
0092             clip: true
0093 
0094             currentIndex: root.currentIndex
0095 
0096             onCurrentIndexChanged: {
0097                 root.currentIndex = currentIndex;
0098             }
0099 
0100             ThemePage {}
0101             DragPage {}
0102             // IconsPage {
0103             //     id: iconsPage
0104             // }
0105             // DialogsPage {
0106             //     id: dialogsPage
0107             // }
0108             // ButtonsPage {
0109             //     id: buttonsPage
0110             // }
0111             // PlasmoidPage {
0112             //     id: plasmoidPage
0113             // }
0114 
0115             // MousePage {
0116             //     id: mousePage
0117             // }
0118 
0119         }
0120     }
0121 }