[vlc-devel] [PATCH 2/7] qml: provide specialized time header and column delegates in KeyNavigableTableView
Prince Gupta
guptaprince8832 at gmail.com
Tue Jun 9 11:46:28 CEST 2020
---
.../qt/widgets/qml/KeyNavigableTableView.qml | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
index 718a02b576..6c0d800889 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -64,6 +64,33 @@ NavigableFocusScope {
property alias spacing: view.spacing
property int horizontalSpacing: VLCStyle.column_margin_width
+ property Component timeHeaderDelegate: Widgets.IconLabel {
+ width: timeTextMetric.width
+ horizontalAlignment: Text.AlignHCenter
+ text: VLCIcons.time
+ color: VLCStyle.colors.caption
+ }
+
+ property Component timeColDelegate: Item {
+ property var rowModel: parent.rowModel
+ property var model: parent.colModel
+
+ Widgets.ListLabel {
+ width: timeTextMetric.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ text: !rowModel ? "" : rowModel[model.criteria] || ""
+ }
+ }
+
+
+ TextMetrics {
+ id: timeTextMetric
+
+ font.pixelSize: VLCStyle.fontSize_normal
+ text: "00h00"
+ }
+
Accessible.role: Accessible.Table
function positionViewAtIndex(index, mode) {
--
2.25.1
More information about the vlc-devel
mailing list