2024-07-01 15:56:44 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property string caption
|
|
|
|
property string primaryText
|
2024-07-10 18:35:24 +00:00
|
|
|
property color primaryTextCustomColor: Theme.palette.directColor1
|
2024-07-01 15:56:44 +00:00
|
|
|
property string secondaryText
|
|
|
|
property string icon
|
|
|
|
property string badge
|
|
|
|
property alias asset: listItem.asset
|
|
|
|
property alias components: listItem.components
|
2024-07-04 11:55:16 +00:00
|
|
|
property int listItemHeight: 76
|
2024-07-01 15:56:44 +00:00
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: root.caption
|
|
|
|
font.pixelSize: Style.current.additionalTextSize
|
|
|
|
}
|
|
|
|
StatusListItem {
|
|
|
|
id: listItem
|
|
|
|
Layout.fillWidth: true
|
2024-07-04 11:55:16 +00:00
|
|
|
Layout.preferredHeight: root.listItemHeight
|
2024-07-01 15:56:44 +00:00
|
|
|
title: root.primaryText
|
|
|
|
statusListItemTitle.font.pixelSize: Style.current.additionalTextSize
|
|
|
|
statusListItemTitle.elide: Text.ElideMiddle
|
2024-07-10 18:35:24 +00:00
|
|
|
statusListItemTitle.customColor: root.primaryTextCustomColor
|
2024-07-01 15:56:44 +00:00
|
|
|
subTitle: root.secondaryText
|
|
|
|
statusListItemSubTitle.font.pixelSize: Style.current.additionalTextSize
|
|
|
|
asset.name: root.icon
|
|
|
|
asset.isImage: true
|
2024-07-04 11:55:16 +00:00
|
|
|
asset.bgWidth: 40
|
|
|
|
asset.bgHeight: 40
|
2024-07-01 15:56:44 +00:00
|
|
|
border.width: 1
|
|
|
|
border.color: Theme.palette.baseColor2
|
|
|
|
|
|
|
|
sensor.enabled: false
|
|
|
|
|
|
|
|
statusListItemIcon.bridgeBadge.width: 16
|
|
|
|
statusListItemIcon.bridgeBadge.height: 16
|
|
|
|
statusListItemIcon.bridgeBadge.border.width: 1
|
|
|
|
statusListItemIcon.bridgeBadge.image.source: root.badge
|
|
|
|
statusListItemIcon.bridgeBadge.visible: !!root.badge
|
|
|
|
}
|
|
|
|
}
|