8import QtQuick.Controls as QQC2
9import QtQuick.Templates as T
10import org.kde.kirigami as Kirigami
51 property alias focusSequence: focusShortcut.sequence
60 property list<T.Action> leftActions
69 property list<T.Action> rightActions
71 property alias _leftActionsRow: leftActionsRow
72 property alias _rightActionsRow: rightActionsRow
77 horizontalAlignment: TextInput.AlignLeft
79 leftPadding: Kirigami.Units.smallSpacing + (root.effectiveHorizontalAlignment === TextInput.AlignRight ? rightActionsRow : leftActionsRow).width
80 rightPadding: Kirigami.
Units.smallSpacing + (root.effectiveHorizontalAlignment === TextInput.AlignRight ? leftActionsRow : rightActionsRow).width
82 Behavior on leftPadding {
84 duration: Kirigami.
Units.longDuration
85 easing.type: Easing.InOutQuad
89 Behavior on rightPadding {
91 duration: Kirigami.
Units.longDuration
92 easing.type: Easing.InOutQuad
98 enabled: root.visible && root.enabled
100 root.forceActiveFocus(
Qt.ShortcutFocusReason)
106 visible: focusShortcut.nativeText.length > 0 && root.text.length === 0 && root.hovered
107 text: focusShortcut.nativeText
110 component InlineActionIcon: Kirigami.Icon {
113 required
property T.Action modelData
115 implicitWidth: Kirigami.Units.iconSizes.sizeForLabels
116 implicitHeight: Kirigami.Units.iconSizes.sizeForLabels
118 anchors.verticalCenter: parent.verticalCenter
120 source: modelData.icon.name.length > 0 ? modelData.icon.name : modelData.icon.source
121 visible: !(modelData instanceof Kirigami.Action) || modelData.visible
122 active: actionArea.containsPress || actionArea.activeFocus
123 enabled: modelData.enabled
129 activeFocusOnTab: true
133 Accessible.
name: iconDelegate.modelData.text
134 Accessible.role: Accessible.
Button
136 Keys.onPressed:
event => {
143 event.accepted =
true;
147 onClicked: mouse => iconDelegate.modelData.trigger()
151 visible: (actionArea.containsMouse || actionArea.activeFocus) && (iconDelegate.modelData.text.length > 0)
152 text: iconDelegate.modelData.text
158 padding: Kirigami.Units.smallSpacing
159 spacing: Kirigami.Units.smallSpacing
160 layoutDirection:
Qt.LeftToRight
161 LayoutMirroring.enabled: root.effectiveHorizontalAlignment === TextInput.AlignRight
162 anchors.left: parent.left
163 anchors.leftMargin: Kirigami.Units.smallSpacing
164 anchors.top: parent.top
165 anchors.topMargin: parent.topPadding
166 anchors.bottom: parent.bottom
167 anchors.bottomMargin: parent.bottomPadding
169 model: root.leftActions
176 padding: Kirigami.Units.smallSpacing
177 spacing: Kirigami.Units.smallSpacing
178 layoutDirection:
Qt.RightToLeft
179 LayoutMirroring.enabled: root.effectiveHorizontalAlignment === TextInput.AlignRight
180 anchors.right: parent.right
181 anchors.rightMargin: Kirigami.Units.smallSpacing
182 anchors.top: parent.top
183 anchors.topMargin: parent.topPadding
184 anchors.bottom: parent.bottom
185 anchors.bottomMargin: parent.bottomPadding
187 model: root.rightActions
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
QString name(GameStandardAction id)