Warning, /plasma/libplasma/examples/applets/config/contents/ui/main.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2013 Marco Martin <mart@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
0011 import org.kde.plasma.plasmoid
0012 import org.kde.plasma.components as PlasmaComponents
0013 import org.kde.kirigami as Kirigami
0014
0015 PlasmoidItem {
0016 id: root
0017
0018 fullRepresentation: ColumnLayout {
0019 id: column
0020 spacing: Kirigami.Units.smallSpacing
0021
0022 Layout.minimumWidth: Kirigami.Units.gridUnit * 10
0023 Layout.minimumHeight: implicitHeight
0024
0025 Item {
0026 Layout.fillHeight: true
0027 }
0028 PlasmaComponents.CheckBox {
0029 Layout.fillWidth: true
0030 Layout.bottomMargin: Kirigami.Units.largeSpacing
0031 enabled: true
0032 checked: Plasmoid.configuration.BoolTest
0033 text: i18n("Bool from config")
0034 onToggled: {
0035 Plasmoid.configuration.BoolTest = checked;
0036 }
0037 }
0038 PlasmaComponents.Label {
0039 Layout.fillWidth: true
0040 horizontalAlignment: Text.AlignHCenter
0041 wrapMode: Text.Wrap
0042 text: i18n("String test")
0043 }
0044 PlasmaComponents.TextField {
0045 Layout.fillWidth: true
0046 Layout.bottomMargin: Kirigami.Units.largeSpacing
0047 text: Plasmoid.configuration.Test
0048 onTextEdited: {
0049 Plasmoid.configuration.Test = text;
0050 }
0051 }
0052 PlasmaComponents.Label {
0053 Layout.fillWidth: true
0054 horizontalAlignment: Text.AlignHCenter
0055 wrapMode: Text.Wrap
0056 text: i18n("String from another group")
0057 }
0058 PlasmaComponents.TextField {
0059 Layout.fillWidth: true
0060 Layout.bottomMargin: Kirigami.Units.largeSpacing
0061 text: Plasmoid.configuration.OtherTest
0062 onTextEdited: {
0063 Plasmoid.configuration.OtherTest = text;
0064 }
0065 }
0066 PlasmaComponents.Label {
0067 Layout.fillWidth: true
0068 horizontalAlignment: Text.AlignHCenter
0069 wrapMode: Text.Wrap
0070 text: i18n("Enum\ndisplayed as int,\nwritten as string")
0071 }
0072 PlasmaComponents.TextField {
0073 Layout.fillWidth: true
0074 Layout.bottomMargin: Kirigami.Units.largeSpacing
0075 text: Plasmoid.configuration.EnumTest
0076 onTextEdited: {
0077 Plasmoid.configuration.EnumTest = text;
0078 }
0079 }
0080 PlasmaComponents.Label {
0081 Layout.fillWidth: true
0082 horizontalAlignment: Text.AlignHCenter
0083 wrapMode: Text.Wrap
0084 text: i18n("Integer\nminimum: -1\nmaximum: 100")
0085 }
0086 PlasmaComponents.SpinBox {
0087 Layout.fillWidth: true
0088 Layout.bottomMargin: Kirigami.Units.largeSpacing
0089 from: -1
0090 to: 100
0091 value: Plasmoid.configuration.IntTest
0092 onValueModified: {
0093 Plasmoid.configuration.IntTest = value;
0094 }
0095 }
0096 Item {
0097 Layout.fillHeight: true
0098 }
0099 }
0100 }