~zsombi/ubuntu-ui-toolkit/listitemSelectModeBugs

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/1.3/ProgressionSlot.qml

  • Committer: Zsombor Egri
  • Date: 2015-11-16 06:35:05 UTC
  • mfrom: (1664.1.1 listitemSelectModeBugs)
  • Revision ID: zsombor.egri@canonical.com-20151116063505-cwn2qfks7qzk10g9
re-sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 Ubuntu.Components 1.3
 
19
 
 
20
/*!
 
21
    \qmltype ProgressionSlot
 
22
    \inqmlmodule Ubuntu.Components 1.3
 
23
    \inherits Icon
 
24
    \ingroup ubuntu
 
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 accomodate 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
    name: LayoutMirroring.enabled ? "go-previous" : "go-next"
 
58
    SlotsLayout.position: SlotsLayout.Last
 
59
}