1 /*
2 SPDX-FileCopyrightText: 2018 Jean-Baptiste Mardelle <jb@kdenlive.org>
3 This file is part of Kdenlive. See www.kdenlive.org.
4 
5 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
6 */
7 
8 #ifndef RECTHELPER_H
9 #define RECTHELPER_H
10 
11 #include "assets/keyframes/model/keyframemonitorhelper.hpp"
12 
13 #include <QObject>
14 #include <QPersistentModelIndex>
15 #include <QVariant>
16 
17 #include <memory>
18 
19 class Monitor;
20 class AssetParameterModel;
21 
22 class RectHelper : public KeyframeMonitorHelper
23 {
24     Q_OBJECT
25 
26 public:
27     /** @brief Construct a keyframe list bound to the given effect
28        @param init_value is the value taken by the param at time 0.
29        @param model is the asset this parameter belong to
30        @param index is the index of this parameter in its model
31      */
32     explicit RectHelper(Monitor *monitor, std::shared_ptr<AssetParameterModel> model, QPersistentModelIndex index, QObject *parent = nullptr);
33     /** @brief Send data update to the monitor
34      */
35     /** @brief Send signals to the monitor to update the qml overlay.
36        @param returns : true if the monitor's connection was changed to active.
37     */
38     bool connectMonitor(bool activate) override;
39     /** @brief Send data update to the monitor
40      */
41     void refreshParams(int pos) override;
42 
43 private slots:
44     void slotUpdateFromMonitorRect(const QRect &rect);
45 };
46 
47 #endif
48