Warning, /libraries/kirigami-addons/src/formcard/FormCardHeader.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2022 Devin Lin <devin@kde.org> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.15 0007 import QtQuick.Controls 2.15 0008 import QtQuick.Layouts 1.15 0009 0010 import org.kde.kirigami 2.19 as Kirigami 0011 0012 /** 0013 * @brief A header for a FormCard. 0014 * 0015 * The FormCardHeader consists of a label with bold text, an optional subtitle, 0016 * and an additional separator to make it visually distinguishable as a 0017 * FormCard title/header. 0018 * 0019 * @since KirigamiAddons 0.11.0 0020 * @deprecated Since 0.9, FormHeader replaces this component. 0021 */ 0022 ColumnLayout { 0023 id: root 0024 spacing: 0 0025 0026 /** 0027 * @brief This property holds the header title. 0028 * 0029 * The title is displayed in bold. 0030 */ 0031 property string title: "" 0032 0033 /** 0034 * @brief This property holds the header subtitle. 0035 * 0036 * The subtitle is displayed in a faint gray color. 0037 */ 0038 property string subtitle: "" 0039 0040 ColumnLayout { 0041 visible: title !== "" || subtitle !== "" 0042 0043 Layout.fillWidth: true 0044 Layout.bottomMargin: Kirigami.Units.largeSpacing 0045 Layout.topMargin: Kirigami.Units.largeSpacing 0046 Layout.leftMargin: Kirigami.Units.gridUnit 0047 Layout.rightMargin: Kirigami.Units.gridUnit 0048 0049 spacing: Kirigami.Units.smallSpacing 0050 0051 Label { 0052 Layout.fillWidth: true 0053 font.weight: Font.Bold 0054 text: title 0055 visible: title !== "" 0056 wrapMode: Text.Wrap 0057 Accessible.ignored: !visible 0058 } 0059 0060 Label { 0061 color: Kirigami.Theme.disabledTextColor 0062 text: subtitle 0063 visible: subtitle !== "" 0064 wrapMode: Text.Wrap 0065 Layout.fillWidth: true 0066 Accessible.ignored: !visible 0067 } 0068 } 0069 0070 Kirigami.Separator { 0071 opacity: 0.5 0072 Layout.fillWidth: true 0073 Accessible.ignored: true 0074 } 0075 }