MauiKit Controls

SectionHeader.qml
1import QtQuick
2import QtQuick.Controls
3
4import org.mauikit.controls 1.3 as Maui
5
6/**
7 * @inherit QtQuick.Controls.Pane
8 * @since org.mauikit.controls
9 *
10 * @brief A control for dividing sections with a title label and a message body.
11 * <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-pane.html">This controls inherits from QQC2 Pane, to checkout its inherited properties refer to the Qt Docs.</a>
12 *
13 * The most common use for this control is to set it as the title of a section. For a more complete implementation of such use case refer to the SectionGroup, which uses this control as the section header.
14 * @see SectionGroup
15 */
16
17Pane
18{
19 id: control
20
21 /**
22 * @brief An alias to the ListItemTemplate handling the information labels, etc.
23 * Exposed for fine tuning more of its properties.
24 * @property ListItemtemplate SectionHeader::template
25 */
26 readonly property alias template : _template
27
28 /**
29 * @see ListItemTemplate::text1
30 */
31 property alias text1 : _template.text1
32
33 /**
34 * @see ListItemTemplate::text2
35 */
36 property alias text2 : _template.text2
37
38 /**
39 * @see ListItemTemplate::label1
40 */
41 readonly property alias label1 : _template.label1
42
43 /**
44 * @see ListItemTemplate::label2
45 */
46 readonly property alias label2 : _template.label2
47
48 implicitHeight: _template.implicitHeight + topPadding + bottomPadding
49
50 padding: Maui.Style.defaultPadding
51 spacing: Maui.Style.space.small
52
53 contentItem: Maui.ListItemTemplate
54 {
55 id: _template
56
57 label1.font: Maui.Style.h2Font
58 label2.wrapMode: Text.WordWrap
59 label1.color: Maui.Theme.textColor
60 isMask: iconSizeHint <= 22
61 spacing: control.spacing
62 }
63
64 background: null
65}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.