MauiKit Controls

SwipeBrowserDelegate.qml
1/*
2 * Copyright 2018 Camilo Higuita <milo.h@aol.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20import org.mauikit.controls as Maui
21
22/**
23 * @inherit SwipeItemDelegate
24 * @brief A control used to display information in a horizontal layout, and with a set of actions placed underneath that is revealed by swiping to the left.
25 *
26 * This control inherits from MauiKit SwipeItemDelegate, to checkout its inherited properties refer to the docs.
27 *
28 * @image html Misc/swipebrowserdelegate1.gif "Revealing the actions in the compact mode"
29 *
30 * @image html Misc/swipebrowserdelegate2.gif "Revealing the actions in the expanded mode"
31 *
32 * @note The compact/expanded modes are controlled by using the `SwipeItemDelegate::collapse` property.
33 * @see SwipeItemDelegate::collapse
34 *
35 * @code
36 * Maui.SwipeBrowserDelegate
37 * {
38 * width: parent.width
39 * label1.text: "A Title For This"
40 * label2.text: "Subtitle text with more info"
41 *
42 * quickActions: [
43 * Action
44 * {
45 * icon.name: "list-add"
46 * },
47 *
48 * Action
49 * {
50 * icon.name: "folder-new"
51 * },
52 *
53 * Action
54 * {
55 * icon.name: "anchor"
56 * }
57 *
58 * ]
59 *
60 * actionRow: ToolButton
61 * {
62 * icon.name: "love"
63 * }
64 * }
65 * @endcode
66 */
67Maui.SwipeItemDelegate
68{
69 id: control
70
71 implicitHeight: Math.max(_template.implicitHeight, buttonsHeight) + topPadding + bottomPadding
72
73 /**
74 * @see ListItemTemplate::label1
75 */
76 property alias label1 : _template.label1
77
78 /**
79 * @see ListItemTemplate::label2
80 */
81 property alias label2 : _template.label2
82
83 /**
84 * @see ListItemTemplate::label3
85 */
86 property alias label3 : _template.label3
88 /**
89 * @see ListItemTemplate::label4
90 */
91 property alias label4 : _template.label4
92
93 /**
94 * @see ListItemTemplate::iconItem
95 */
96 property alias iconItem : _template.iconItem
97
98 /**
99 * @see ListItemTemplate::iconVisible
100 */
101 property alias iconVisible : _template.iconVisible
102
103 /**
104 * @see ListItemTemplate::iconSizeHint
105 */
106 property alias iconSizeHint : _template.iconSizeHint
107
108 /**
109 * @see ListItemTemplate::imageSource
110 */
111 property alias imageSource : _template.imageSource
112
113 /**
114 * @see ListItemTemplate::iconSource
115 */
116 property alias iconSource : _template.iconSource
117
118 /**
119 * @brief An alias to the information container handled by a MauiKit ListItemTemplate.
120 * Exposed here for allowing access to its properties.
121 * @property LisItemTemplate SwipeBrowserDelegate::template
122 */
123 property alias template : _template
124
125 Maui.ListItemTemplate
126 {
127 id: _template
128 anchors.fill: parent
129 }
130}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:48:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.