Files
metabuilder/qml/MetaBuilder/MediaChannelList.qml
johndoe6345789 6e394d7846 style(qt6): 80-char margin enforced — 737 violations → 29 remaining
191 files reformatted across views, components, widgets, hybrid, contexts.
New components: CCreateSchemaDialog, CAddFieldDialog, CAdminContentPanel.
JS helpers: connBadgeStatus/Text, adminStats, exampleLabels, onLevelClicked.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:48:39 +00:00

52 lines
1.2 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QmlComponents 1.0
CCard {
id: channelList
Layout.preferredWidth: 320
Layout.fillHeight: true
property int selectedIndex: 0
property var channels: []
signal channelSelected(int index)
ColumnLayout {
anchors.fill: parent
anchors.margins: 16
spacing: 12
FlexRow {
Layout.fillWidth: true
spacing: 8
CText { variant: "h4"; text: "TV Channels" }
CText { variant: "caption"; text: channels.length + " channels"
color: Theme.textSecondary }
}
CDivider { Layout.fillWidth: true }
ListView {
Layout.fillWidth: true
Layout.fillHeight: true
model: channels
spacing: 4
clip: true
delegate: CListItem {
width: parent ? parent.width : 288
title: modelData.name
subtitle: modelData.status === "broadcasting"
? modelData.viewers + " viewers"
: "Offline"
selected: index === channelList.selectedIndex
onClicked: channelList.channelSelected(index)
}
}
}
}