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