Warning, /multimedia/kdenlive/src/monitor/view/MultiScreenToolBar.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2016-2021 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     acceptedButtons: Qt.NoButton
0015     width: 2.4 * fontMetrics.font.pixelSize
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                 iconName: "zoom-in"
0064                 toolTipText: i18n("Zoom in")
0065                 onClicked: {
0066                     controller.activateClipMonitor(root.isClipMonitor)
0067                     controller.triggerAction('monitor_zoomin')
0068                 }
0069             }
0070             MonitorToolButton {
0071                 iconName: "zoom-out"
0072                 toolTipText: i18n("Zoom out")
0073                 onClicked: {
0074                     controller.activateClipMonitor(root.isClipMonitor)
0075                     controller.triggerAction('monitor_zoomout')
0076                 }
0077             }
0078             MonitorToolButton {
0079                 objectName: "moveBar"
0080                 iconName: "transform-move-horizontal"
0081                 toolTipText: i18n("Move Toolbar")
0082                 onClicked: {
0083                     if (barZone.rightSide) {
0084                         barZone.anchors.right = undefined
0085                         barZone.anchors.left = barZone.parent.left
0086                     } else {
0087                         barZone.anchors.left = undefined
0088                         barZone.anchors.right = barZone.parent.right
0089                     }
0090                     barZone.rightSide = !barZone.rightSide
0091                     scenetoolbar.fadeBar()
0092                 }
0093             }
0094         }
0095     }
0096 }