Debian Codegraph @

src/imports/Components/ListItems/1.2/ListItemHeader.qml

raw
1 /*
2 * Copyright 2012 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
19 /*!
20 \qmltype Header
21 \deprecated
22 \inqmlmodule Lomiri.Components.ListItems 1.0
23 \ingroup lomiri-listitems
24 \brief Header for grouping list items together
25
26 Examples:
27 \qml
28 import Lomiri.Components.ListItems 1.0 as ListItem
29 Column {
30 ListItem.Header { text: "Title" }
31 ListItem.Standard { text: "Item one" }
32 ListItem.Standard { text: "Item two" }
33 ListItem.Divider { }
34 ListItem.Standard { text: "Item three" }
35 ListItem.Standard { text: "Item four" }
36 }
37 \endqml
38 */
39
40 Item {
41 height: units.gu(4)
42 anchors {
43 left: parent ? parent.left : undefined
44 right: parent ? parent.right : undefined
45 }
46
47 /*!
48 The text that is shown as the header text.
49 \qmlproperty string text
50 */
51 property alias text: label.text
52
53 /*!
54 \internal
55 The \l foregroundGroundColor property stores the internal label color.
56 */
57 property alias __foregroundColor: label.color
58
59 LabelVisual {
60 id: label
61 fontSize: "medium"
62 font.weight: Text.Normal
63 anchors {
64 verticalCenter: parent.verticalCenter
65 left: parent.left
66 right: parent.right
67 margins: units.gu(2)
68 }
69 }
70
71 ThinDivider {
72 anchors {
73 left: parent.left
74 right: parent.right
75 bottom: parent.bottom
76 }
77 }
78 }