Warning, /plasma/libplasma/tests/window.qml is written in an unsupported language. File is not indexed.

0001 
0002 import QtQuick 2.15
0003 import QtQuick.Controls 2.15
0004 import QtQuick.Layouts 1.0
0005 
0006 import org.kde.plasma.core 2.0 as PlasmaCore
0007 
0008 import org.kde.graphicaleffects 1.0
0009 
0010 import QtGraphicalEffects 1.15
0011 
0012 ApplicationWindow {
0013 
0014     width: 1000
0015     height: 500
0016     RowLayout {
0017         id: topRow
0018         Label {
0019             text: "Win ID (find via xwininfo)"
0020         }
0021         TextField {
0022             id: winIdInput
0023             text: ""
0024             placeholderText: "0x000000"
0025         }
0026 
0027         GridLayout {
0028             columns: 3
0029             Label {
0030                 text: "Resolution"
0031             }
0032             Slider {
0033                 id: resolutionSlider
0034                 from: 0
0035                 to: 1
0036                 value: 0.5
0037             }
0038             Label {
0039                 text: resolutionSlider.value
0040             }
0041             Label {
0042                 text: "Window Sin C"
0043             }
0044             Slider {
0045                 id: windowSincSlider
0046                 from: 0
0047                 to: 1
0048                 value: 0.5
0049             }
0050             Label {
0051                 text: windowSincSlider.value
0052             }
0053             Label {
0054                 text: "Sin C"
0055             }
0056             Slider {
0057                 id: sincSlider
0058                 from: 0
0059                 to: 1
0060                 value: 0.5
0061             }
0062             Label {
0063                 text: sincSlider.value
0064             }
0065         }
0066     }
0067 
0068 
0069 
0070     GridLayout {
0071         anchors.left: parent.left
0072         anchors.right: parent.right
0073         anchors.top: topRow.bottom
0074         height: 200
0075 
0076         columns: 2
0077         Label {
0078             text: "Window"
0079             Layout.fillWidth: true
0080             horizontalAlignment: Text.AlignHCenter
0081         }
0082 
0083         Label {
0084             text: "Lanczos"
0085             Layout.fillWidth: true
0086             horizontalAlignment: Text.AlignHCenter
0087         }
0088 
0089         PlasmaCore.WindowThumbnail {
0090             id: thumb
0091 
0092             Layout.fillWidth: true
0093             Layout.fillHeight: true
0094 
0095             winId: parseInt(winIdInput.text, 16)
0096             visible: true
0097         }
0098 
0099 
0100         Lanczos {
0101             source: thumb
0102             Layout.fillWidth: true
0103             Layout.fillHeight: true
0104             sourceSize: Qt.size(thumb.paintedWidth, thumb.paintedHeight)
0105             resolution: resolutionSlider.value
0106             windowSinc: windowSincSlider.value
0107             sinc: sincSlider.value
0108         }
0109     }
0110 }