Warning, /frameworks/plasma-framework/tests/testborders.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 0008 import QtQuick 2.0 0009 import QtQuick.Layouts 1.1 0010 import QtQuick.Controls 2.15 0011 0012 import org.kde.plasma.core 2.0 as PlasmaCore 0013 0014 Item 0015 { 0016 width: 500 0017 height: 500 0018 0019 PlasmaCore.FrameSvgItem { 0020 id: theItem 0021 0022 imagePath: "widgets/background" 0023 anchors { 0024 fill: parent 0025 margins: 10 0026 } 0027 0028 Button { 0029 text: "left" 0030 checkable: true 0031 checked: true 0032 anchors { 0033 horizontalCenterOffset: -50 0034 centerIn: parent 0035 } 0036 onClicked: { 0037 if (checked) 0038 theItem.enabledBorders |= PlasmaCore.FrameSvg.LeftBorder; 0039 else 0040 theItem.enabledBorders &=~PlasmaCore.FrameSvg.LeftBorder; 0041 } 0042 } 0043 Button { 0044 text: "right" 0045 checkable: true 0046 checked: true 0047 0048 anchors { 0049 horizontalCenterOffset: 50 0050 centerIn: parent 0051 } 0052 onClicked: { 0053 if (checked) 0054 theItem.enabledBorders |= PlasmaCore.FrameSvg.RightBorder; 0055 else 0056 theItem.enabledBorders &=~PlasmaCore.FrameSvg.RightBorder; 0057 } 0058 } 0059 Button { 0060 text: "top" 0061 checkable: true 0062 checked: true 0063 0064 anchors { 0065 verticalCenterOffset: -50 0066 centerIn: parent 0067 } 0068 onClicked: { 0069 if (checked) 0070 theItem.enabledBorders |= PlasmaCore.FrameSvg.TopBorder; 0071 else 0072 theItem.enabledBorders &=~PlasmaCore.FrameSvg.TopBorder; 0073 } 0074 } 0075 Button { 0076 text: "bottom" 0077 checkable: true 0078 checked: true 0079 0080 anchors { 0081 verticalCenterOffset: 50 0082 centerIn: parent 0083 } 0084 onClicked: { 0085 if (checked) 0086 theItem.enabledBorders |= PlasmaCore.FrameSvg.BottomBorder; 0087 else 0088 theItem.enabledBorders &=~PlasmaCore.FrameSvg.BottomBorder; 0089 } 0090 } 0091 } 0092 } 0093