• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaComponents

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • plasmacomponents
  • qml
  • private
TextFieldFocus.qml
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
3  * Copyright (C) 2011 by Marco Martin <mart@kde.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Library General Public License as
7  * published by the Free Software Foundation; either version 2, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Library General Public License for more details
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 import QtQuick 1.0
22 import org.kde.plasma.core 0.1 as PlasmaCore
23 
24 Item {
25  id: main
26  state: parent.state
27 
28  PlasmaCore.Svg {
29  id: lineEditSvg
30  imagePath: "widgets/lineedit"
31  onRepaintNeeded: {
32  if (lineEditSvg.hasElement("hint-focus-over-base")) {
33  main.z = 800
34  } else {
35  main.z = 0
36  }
37  }
38  Component.onCompleted: {
39  if (lineEditSvg.hasElement("hint-focus-over-base")) {
40  main.z = 800
41  } else {
42  main.z = 0
43  }
44  }
45  }
46 
47  PlasmaCore.FrameSvgItem {
48  id: hover
49 
50  anchors {
51  fill: parent
52  leftMargin: -margins.left
53  topMargin: -margins.top
54  rightMargin: -margins.right
55  bottomMargin: -margins.bottom
56  }
57  opacity: 0
58  imagePath: "widgets/lineedit"
59  prefix: "hover"
60  }
61 
62  states: [
63  State {
64  name: "hover"
65  PropertyChanges {
66  target: hover
67  opacity: 1
68  prefix: "hover"
69  }
70  },
71  State {
72  name: "focus"
73  PropertyChanges {
74  target: hover
75  opacity: 1
76  prefix: "focus"
77  }
78  },
79  State {
80  name: "hidden"
81  PropertyChanges {
82  target: hover
83  opacity: 0
84  prefix: "hover"
85  }
86  }
87  ]
88 
89  transitions: [
90  Transition {
91  PropertyAnimation {
92  properties: "opacity"
93  duration: 250
94  easing.type: Easing.OutQuad
95  }
96  }
97  ]
98 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaComponents

Skip menu "PlasmaComponents"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal