Warning, /multimedia/kdenlive/src/monitor/view/SceneToolBar.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2016 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005
0006 import QtQuick.Controls 2.15
0007 import QtQuick 2.15
0008
0009
0010 MouseArea {
0011 id: barZone
0012 hoverEnabled: true
0013 property bool rightSide: true
0014 width: 2.4 * fontMetrics.font.pixelSize
0015 acceptedButtons: Qt.NoButton
0016 height: parent.height
0017 onEntered: {
0018 animator.stop()
0019 scenetoolbar.opacity = 1
0020 }
0021 onExited: {
0022 scenetoolbar.opacity = 0
0023 }
0024
0025 Rectangle {
0026 id: scenetoolbar
0027 objectName: "scenetoolbar"
0028 width: barZone.width
0029 height: childrenRect.height
0030 SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
0031 color: Qt.rgba(myPalette.window.r, myPalette.window.g, myPalette.window.b, 0.7)
0032 opacity: 0
0033 radius: 4
0034 border.color : Qt.rgba(0, 0, 0, 0.3)
0035 border.width: 1
0036 OpacityAnimator {
0037 id: animator
0038 target: scenetoolbar;
0039 from: 1;
0040 to: 0;
0041 duration: 2500
0042 running: false
0043 }
0044
0045 function fadeBar()
0046 {
0047 animator.start()
0048 }
0049
0050 Column {
0051 width: parent.width
0052 MonitorToolButton {
0053 id: fullscreenButton
0054 objectName: "fullScreen"
0055 iconName: "view-fullscreen"
0056 toolTipText: i18n("Switch Full Screen")
0057 onClicked: {
0058 controller.activateClipMonitor(root.isClipMonitor)
0059 controller.triggerAction('monitor_fullscreen')
0060 }
0061 }
0062 MonitorToolButton {
0063 objectName: "switchOverlay"
0064 iconName: "view-grid"
0065 toolTipText: i18n("Change Overlay")
0066 onClicked: {
0067 if (controller.overlayType >= 5) {
0068 controller.overlayType = 0
0069 } else {
0070 controller.overlayType = controller.overlayType + 1;
0071 }
0072 root.overlayType = controller.overlayType
0073 }
0074 }
0075 MonitorToolButton {
0076 iconName: "zoom-in"
0077 toolTipText: i18n("Zoom in")
0078 onClicked: {
0079 controller.activateClipMonitor(root.isClipMonitor)
0080 controller.triggerAction('monitor_zoomin')
0081 }
0082 }
0083 MonitorToolButton {
0084 iconName: "zoom-out"
0085 toolTipText: i18n("Zoom out")
0086 onClicked: {
0087 controller.activateClipMonitor(root.isClipMonitor)
0088 controller.triggerAction('monitor_zoomout')
0089 }
0090 }
0091 MonitorToolButton {
0092 objectName: "addMarker"
0093 iconName: "list-add"
0094 toolTipText: root.isClipMonitor ? i18n("Add Marker") : i18n("Add Guide")
0095 onClicked: {
0096 controller.activateClipMonitor(root.isClipMonitor)
0097 controller.triggerAction('add_marker_guide_quickly')
0098 }
0099 }
0100 MonitorToolButton {
0101 objectName: "removeMarker"
0102 iconName: "list-remove"
0103 toolTipText: root.isClipMonitor ? i18n("Remove Marker") : i18n("Remove Guide")
0104 onClicked: {
0105 controller.activateClipMonitor(root.isClipMonitor)
0106 root.isClipMonitor ? controller.triggerAction('delete_clip_marker') : controller.triggerAction('delete_guide')
0107 }
0108 }
0109 MonitorToolButton {
0110 objectName: "moveBar"
0111 iconName: "transform-move-horizontal"
0112 toolTipText: i18n("Move Toolbar")
0113 onClicked: {
0114 if (barZone.rightSide) {
0115 barZone.anchors.right = undefined
0116 barZone.anchors.left = barZone.parent.left
0117 } else {
0118 barZone.anchors.left = undefined
0119 barZone.anchors.right = barZone.parent.right
0120 }
0121 barZone.rightSide = !barZone.rightSide
0122 scenetoolbar.fadeBar()
0123 }
0124 }
0125 }
0126 }
0127 }