File indexing completed on 2024-04-14 04:46:49

0001 /*
0002     SPDX-FileCopyrightText: 2016 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003     This file is part of Kdenlive. See www.kdenlive.org.
0004 
0005     SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 */
0007 
0008 #pragma once
0009 
0010 #include "definitions.h"
0011 
0012 class QQuickWidget;
0013 
0014 /** @class QmlManager
0015     @brief Manages all Qml monitor overlays
0016     @author Jean-Baptiste Mardelle
0017  */
0018 class QmlManager : public QObject
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit QmlManager(QQuickWidget *view);
0024 
0025     /** @brief return current active scene type */
0026     MonitorSceneType sceneType() const;
0027     /** @brief Set a property on the root item */
0028     void setProperty(const QString &name, const QVariant &value);
0029     /** @brief Load a monitor scene */
0030     void setScene(Kdenlive::MonitorId id, MonitorSceneType type, QSize profile, double profileStretch, QRect displayRect, double zoom, int duration);
0031 
0032 private:
0033     QQuickWidget *m_view;
0034     MonitorSceneType m_sceneType;
0035 
0036 private Q_SLOTS:
0037     void effectRectChanged();
0038     void effectPolygonChanged();
0039     void effectRotoChanged(const QVariant&,const QVariant&);
0040 
0041 Q_SIGNALS:
0042     void effectChanged(const QRect &);
0043     void effectPointsChanged(const QVariantList &);
0044     void activateTrack(int);
0045 };