timelinetabs.hpp 3.7 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/***************************************************************************
 *   Copyright (C) 2017 by Nicolas Carion                                  *
 *   This file is part of Kdenlive. See www.kdenlive.org.                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) version 3 or any later version accepted by the       *
 *   membership of KDE e.V. (or its successor approved  by the membership  *
 *   of KDE e.V.), which shall act as a proxy defined in Section 14 of     *
 *   version 3 of the license.                                             *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/

#ifndef TIMELINETABS_H
#define TIMELINETABS_H

#include <QTabWidget>
26
#include <memory>
27

28
/* @brief This is a class that extends QTabWidget to provide additional functionality related to timeline tabs
29
30
31
 */

class TimelineWidget;
32
class AssetParameterModel;
33
class EffectStackModel;
34
35
36
37
38
39
40
41
42
43
44

class TimelineContainer : public QWidget
{

public:
    TimelineContainer(QWidget *parent);
protected:
    QSize sizeHint() const override;
};


45
46
47
48
49
50
51
class TimelineTabs : public QTabWidget
{
    Q_OBJECT

public:
    /* Construct the tabs as well as the widget for the main timeline */
    TimelineTabs(QWidget *parent);
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
52
    virtual ~TimelineTabs();
53
54
55
56
57
    /* @brief Returns a pointer to the main timeline */
    TimelineWidget *getMainTimeline() const;

    /* @brief Returns a pointer to the current timeline */
    TimelineWidget *getCurrentTimeline() const;
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
58
    void disconnectTimeline(TimelineWidget *timeline);
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

protected:
    /** @brief Helper function to connect a timeline's signals/slots*/
    void connectTimeline(TimelineWidget *timeline);

signals:
    /** @brief Request repaint of audio thumbs
        This is an input signal, forwarded to the timelines
     */
    void audioThumbFormatChanged();

    /** @brief The parameter controlling whether we show video thumbnails has changed
        This is an input signal, forwarded to the timelines
    */
    void showThumbnailsChanged();

    /** @brief The parameter controlling whether we show audio thumbnails has changed
        This is an input signal, forwarded to the timelines
    */
    void showAudioThumbnailsChanged();

    /** @brief Change the level of zoom
        This is an input signal, forwarded to the timelines
     */
    void changeZoom(int value, bool zoomOnMouse);
84
    void fitZoom();
85
    /* @brief Requests that a given parameter model is displayed in the asset panel */
86
    void showTransitionModel(int tid, std::shared_ptr<AssetParameterModel>);
87
    /* @brief Requests that a given effectstack model is displayed in the asset panel */
88
    void showItemEffectStack(const QString &clipName, std::shared_ptr<EffectStackModel>, QSize, bool);
89
90
91
    /** @brief Zoom level changed in timeline, update slider
     */
    void updateZoom(int);
92
93
94
95
96
97

private:
    TimelineWidget *m_mainTimeline;
};

#endif