Warning, /maui/mauikit/src/controls.6/SwipeBrowserDelegate.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   Copyright 2018 Camilo Higuita <milo.h@aol.com>
0003  *
0004  *   This program is free software; you can redistribute it and/or modify
0005  *   it under the terms of the GNU Library General Public License as
0006  *   published by the Free Software Foundation; either version 2, or
0007  *   (at your option) any later version.
0008  *
0009  *   This program is distributed in the hope that it will be useful,
0010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *   GNU General Public License for more details
0013  *
0014  *   You should have received a copy of the GNU Library General Public
0015  *   License along with this program; if not, write to the
0016  *   Free Software Foundation, Inc.,
0017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0018  */
0019 
0020 import org.mauikit.controls 1.3 as Maui
0021 
0022 /**
0023  * @inherit SwipeItemDelegate
0024  * @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. 
0025  * 
0026  * This control inherits from MauiKit SwipeItemDelegate, to checkout its inherited properties refer to the docs.
0027  * 
0028  * @image html Misc/swipebrowserdelegate1.gif "Revealing the actions in the compact mode"
0029  *
0030  * @image html Misc/swipebrowserdelegate2.gif "Revealing the actions in the expanded mode"
0031  * 
0032  * @note The compact/expanded modes are controlled by using the `SwipeItemDelegate::collapse` property.
0033  * @see SwipeItemDelegate::collapse
0034  * 
0035  * @code
0036  * Maui.SwipeBrowserDelegate
0037  * {
0038  *    width: parent.width
0039  *    label1.text: "A Title For This"
0040  *    label2.text: "Subtitle text with more info"
0041  * 
0042  *    quickActions: [
0043  *    Action
0044  *        {
0045  *            icon.name: "list-add"
0046  *        },
0047  * 
0048  *        Action
0049  *        {
0050  *            icon.name: "folder-new"
0051  *        },
0052  * 
0053  *        Action
0054  *        {
0055  *            icon.name: "anchor"
0056  *        }
0057  * 
0058  *    ]
0059  * 
0060  *    actionRow: ToolButton
0061  *    {
0062  *        icon.name: "love"
0063  *    }
0064  * }
0065  * @endcode
0066  */
0067 Maui.SwipeItemDelegate
0068 {
0069   id: control
0070   
0071   implicitHeight: Math.max(_template.implicitHeight, buttonsHeight) + topPadding + bottomPadding
0072   
0073   /**
0074    * @see ListItemTemplate::label1
0075    */
0076   property alias label1 : _template.label1
0077   
0078   /**
0079    * @see ListItemTemplate::label2
0080    */
0081   property alias label2 : _template.label2
0082   
0083   /**
0084    * @see ListItemTemplate::label3
0085    */
0086   property alias label3 : _template.label3
0087   
0088   /**
0089    * @see ListItemTemplate::label4
0090    */
0091   property alias label4 : _template.label4
0092   
0093   /**
0094    * @see ListItemTemplate::iconItem
0095    */
0096   property alias iconItem : _template.iconItem
0097   
0098   /**
0099    * @see ListItemTemplate::iconVisible
0100    */
0101   property alias iconVisible : _template.iconVisible
0102   
0103   /**
0104    * @see ListItemTemplate::iconSizeHint
0105    */
0106   property alias iconSizeHint : _template.iconSizeHint
0107   
0108   /**
0109    * @see ListItemTemplate::imageSource
0110    */
0111   property alias imageSource : _template.imageSource
0112   
0113   /**
0114    * @see ListItemTemplate::iconSource
0115    */
0116   property alias iconSource : _template.iconSource
0117   
0118   /**
0119    * @brief An alias to the information container handled by a MauiKit ListItemTemplate.
0120    * Exposed here for allowing access to its properties.
0121    * @property LisItemTemplate SwipeBrowserDelegate::template
0122    */
0123   property alias template : _template
0124   
0125   Maui.ListItemTemplate
0126   {
0127     id: _template
0128     anchors.fill: parent
0129   }
0130 }