Libplasma

RoundShadow.qml
1/*
2 SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro <dakerfp@gmail.com>
3 SPDX-FileCopyrightText: 2011 Marco Martin <mart@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8/**Documented API
9Inherits:
10 Item
11
12Imports:
13 QtQuick 2.1
14 org.kde.plasma.core
15
16Description:
17 It is a simple Radio button which is using the plasma theme.
18 TODO Do we need more info?
19
20Properties:
21 TODO needs more info??
22**/
23
24import QtQuick
25import org.kde.ksvg as KSvg
26import org.kde.kirigami as Kirigami
28Item {
29 id: main
30 state: parent.state
31 property alias imagePath: shadowSvg.imagePath
32 property string hoverElement: "hover"
33 property string focusElement: "focus"
34 property alias shadowElement: shadow.elementId
35
36 //used to tell apart this implementation with the touch components one
37 property bool hasOverState: true
38
39 KSvg.Svg {
40 id: shadowSvg
41 imagePath: "widgets/actionbutton"
42 }
43
45 id: hover
46 svg: shadowSvg
47 elementId: "hover"
48
49 anchors.fill: parent
50
51 opacity: 0
52 }
53
55 id: shadow
56 svg: shadowSvg
57 elementId: "shadow"
58
59 anchors.fill: parent
60 }
61
62 states: [
63 State {
64 name: "shadow"
65 PropertyChanges {
66 target: shadow
67 opacity: 1
68 }
69 PropertyChanges {
70 target: hover
71 opacity: 0
72 elementId: hoverElement
73 }
74 },
75 State {
76 name: "hover"
77 PropertyChanges {
78 target: shadow
79 opacity: 0
80 }
81 PropertyChanges {
82 target: hover
83 opacity: 1
84 elementId: hoverElement
85 }
86 },
87 State {
88 name: "focus"
89 PropertyChanges {
90 target: shadow
91 opacity: 0
92 }
93 PropertyChanges {
94 target: hover
95 opacity: 1
96 elementId: focusElement
97 }
98 },
99 State {
100 name: "hidden"
101 PropertyChanges {
102 target: shadow
103 opacity: 0
104 }
105 PropertyChanges {
106 target: hover
107 opacity: 0
108 elementId: hoverElement
109 }
110 }
111 ]
112
113 transitions: [
114 Transition {
115 PropertyAnimation {
116 properties: "opacity"
117 duration: Kirigami.Units.longDuration
118 easing.type: Easing.OutQuad
119 }
120 }
121 ]
122}
QString name(StandardAction id)
KGuiItem properties()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.