Warning, /multimedia/kdenlive/src/monitor/view/kdenlivemonitorsplittracks.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2020 Jean-Baptiste Mardelle <jb@kdenlive.org> 0003 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 import QtQuick 2.15 0007 import QtQuick.Controls 2.15 0008 0009 Item { 0010 id: root 0011 objectName: "root" 0012 SystemPalette { id: activePalette } 0013 0014 // default size, but scalable by user 0015 height: 300; width: 400 0016 property string comment 0017 property string framenum 0018 property rect framesize 0019 property point profile: controller.profile 0020 property int overlayType: 0 0021 property color overlayColor: controller.overlayColor 0022 property point center 0023 property double scalex 0024 property double scaley 0025 property bool captureRightClick: false 0026 // Zoombar properties 0027 property double zoomStart: 0 0028 property double zoomFactor: 1 0029 property int zoomOffset: 0 0030 property bool showZoomBar: false 0031 property double stretch : 1 0032 property double sourcedar : 1 0033 property double offsetx : 0 0034 property double offsety : 0 0035 property int activeTrack: 0 0036 onSourcedarChanged: refreshdar() 0037 property bool iskeyframe 0038 property int requestedKeyFrame 0039 property real baseUnit: fontMetrics.font.pixelSize * 0.8 0040 property int duration: 300 0041 property int mouseRulerPos: 0 0042 property double frameSize: 10 0043 property double timeScale: 1 0044 property var tracks: [] 0045 0046 function updateClickCapture() { 0047 root.captureRightClick = false 0048 } 0049 0050 signal activateTrack(int position) 0051 0052 onDurationChanged: { 0053 clipMonitorRuler.updateRuler() 0054 } 0055 onWidthChanged: { 0056 clipMonitorRuler.updateRuler() 0057 } 0058 0059 FontMetrics { 0060 id: fontMetrics 0061 font.family: "Arial" 0062 } 0063 MouseArea { 0064 id: barOverArea 0065 hoverEnabled: true 0066 acceptedButtons: Qt.NoButton 0067 anchors.fill: parent 0068 onWheel: wheel => { 0069 controller.seek(wheel.angleDelta.x + wheel.angleDelta.y, wheel.modifiers) 0070 } 0071 } 0072 0073 Item { 0074 id: frame 0075 objectName: "referenceframe" 0076 width: root.profile.x * root.scalex 0077 height: root.profile.y * root.scaley 0078 x: root.center.x - width / 2 - root.offsetx 0079 y: root.center.y - height / 2 - root.offsety 0080 Repeater { 0081 id: trackSeparators 0082 model: tracks 0083 property int rows: trackSeparators.count < 2 ? 1 : trackSeparators.count < 5 ? 2 : 3 0084 property int columns: trackSeparators.count < 2 ? 1 : trackSeparators.count < 3 ? 1 : trackSeparators.count < 7 ? 2 : 3 0085 Rectangle { 0086 width: parent.width / trackSeparators.rows 0087 height: parent.height / trackSeparators.columns 0088 x: width * (index % trackSeparators.rows) 0089 y: height * (Math.floor(index / trackSeparators.rows)) 0090 color: "transparent" 0091 border.color: index == root.activeTrack ? "#ff0000" : "#00000000" 0092 border.width: 2 0093 Label { 0094 text: modelData 0095 color: "#ffffff" 0096 padding :4 0097 background: Rectangle { 0098 color: index == root.activeTrack ? "#990000" : "#000066" 0099 } 0100 } 0101 MouseArea { 0102 anchors.fill: parent 0103 cursorShape: Qt.PointingHandCursor 0104 acceptedButtons: Qt.LeftButton 0105 onClicked: { 0106 root.activateTrack(index) 0107 controller.triggerAction('perform_multitrack_mode') 0108 } 0109 } 0110 } 0111 } 0112 } 0113 MultiScreenToolBar { 0114 id: sceneToolBar 0115 anchors { 0116 right: parent.right 0117 top: parent.top 0118 topMargin: 4 0119 rightMargin: 4 0120 leftMargin: 4 0121 } 0122 } 0123 MonitorRuler { 0124 id: clipMonitorRuler 0125 anchors { 0126 left: root.left 0127 right: root.right 0128 bottom: root.bottom 0129 } 0130 height: controller.rulerHeight 0131 } 0132 }