Debian Codegraph @

src/imports/Components/1.3/ProgressionSlot.qml

raw
1 /*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 import QtQuick 2.4
18 import Lomiri.Components 1.3
19
20 /*!
21 \qmltype ProgressionSlot
22 \inqmlmodule Lomiri.Components
23 \inherits Icon
24 \ingroup lomiri
25
26 \brief ProgressionSlot holds an icon representing
27 the progression symbol.
28
29 ProgressionSlot is designed to provide an easy way for developers to
30 add a progression symbol to the list item created using \l ListItemLayout
31 or \l SlotsLayout.
32
33 \l ListItemLayout will automatically accommodate the progression symbol
34 as the last trailing slot inside the layout. For more
35 details, see \l ListItemLayout documentation.
36
37 The following is an example of how easy it is to implement list items using
38 \l ListItem with \l ListItemLayout and ProgressionSlot:
39
40 \qml
41 ListItem {
42 height: layout.height
43 onClicked: pushPageOnStack()
44 ListItemLayout {
45 id: layout
46 title.text: "Push a new page on the PageStack"
47 ProgressionSlot {}
48 }
49 }
50 \endqml
51 \sa ListItemLayout
52 */
53
54 Icon {
55 height: units.gu(2)
56 width: height
57 // FIXME: lp#1672322
58 name: LayoutMirroring.enabled ? "go-previous" : "go-next"
59 SlotsLayout.position: SlotsLayout.Last
60 }