9import QtQuick.Templates as T
10import org.kde.ksvg as KSvg
12import org.kde.plasma.core as PlasmaCore
13import "private" as Private
14import org.kde.kirigami as Kirigami
15import "mobiletextselection" as MobileTextSelection
20 implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
21 background ? background.implicitWidth : 0,
22 placeholder.implicitWidth + leftPadding + rightPadding)
23 implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
24 background ? background.implicitHeight : 0,
25 placeholder.implicitHeight + topPadding + bottomPadding)
32 selectionColor:
Kirigami.Theme.highlightColor
33 selectedTextColor:
Kirigami.Theme.highlightedTextColor
34 opacity: control.enabled ? 1 : 0.6
35 verticalAlignment: TextEdit.AlignTop
36 hoverEnabled: !
Kirigami.Settings.tabletMode || !
Kirigami.Settings.hasTransientTouchInput
38 selectByMouse: hoverEnabled
40 cursorDelegate: !hoverEnabled ? mobileCursor : null
43 MobileTextSelection.MobileCursor {
48 onTextChanged: MobileTextSelection.MobileTextActionsToolBar.shouldBeVisible =
false;
49 onPressed:
event => MobileTextSelection.MobileTextActionsToolBar.shouldBeVisible =
true;
51 onPressAndHold:
event => {
56 cursorPosition = positionAt(event.x, event.y);
60 MobileTextSelection.MobileCursor {
62 selectionStartHandle:
true
63 property var rect: target.positionToRectangle(target.selectionStart)
70 MobileTextSelection.MobileTextActionsToolBar.controlRoot = control;
76 x: control.leftPadding
78 width: control.width - (control.leftPadding + control.rightPadding)
79 height: control.height - (control.topPadding + control.bottomPadding)
81 text: control.placeholderText
86 horizontalAlignment: control.horizontalAlignment
87 verticalAlignment: control.verticalAlignment
88 visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !==
Qt.AlignHCenter)
89 elide: Text.ElideRight
93 Private.TextFieldFocus {
94 state: control.activeFocus ?
"focus" : (control.hovered ?
"hover" :
"hidden")
100 imagePath:
"widgets/lineedit"
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.