Migration of QtMvvm from github
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.2 KiB

import QtQuick 2.10
import QtQuick.Controls 2.3
7 years ago
import QtQuick.Layouts 1.3
import de.skycoder42.QtMvvm.Quick 1.0
7 years ago
ListView {
id: _sectionListView
7 years ago
property bool showSections: true
property SettingsUiBuilder builder
7 years ago
section.property: showSections ? "category" : ""
section.labelPositioning: ViewSection.InlineLabels
section.delegate: ListSection {
title: section
}
delegate: ItemDelegate {
id: delegate
width: parent.width
onClicked: builder.loadSection(section)
7 years ago
contentItem: GridLayout {
id: grid
rows: 2
columns: 2
columnSpacing: 14
TintIcon {
id: tintIcon
source: iconUrl
visible: iconUrl != ""
7 years ago
Layout.row: 0
Layout.column: 0
Layout.rowSpan: 2
Layout.fillHeight: true
Layout.preferredWidth: iconSize.width
Layout.preferredHeight: iconSize.height
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
}
Label {
id: titleLabel
text: title
Layout.row: 0
Layout.column: 1
font.bold: true
elide: Label.ElideRight
Layout.fillWidth: true
}
Label {
id: textLabel
visible: tooltip
Layout.row: 1
Layout.column: 1
text: tooltip
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
}
}