]> git.sesse.net Git - kdenlive/blob - src/transitionsettings.h
e1cc0c52a0d91fab9661349092dd4b4148a323e5
[kdenlive] / src / transitionsettings.h
1 /***************************************************************************
2                           transitionsettings.h  -  Transitions widget
3                              -------------------
4     begin                : Mar 15 2008
5     copyright            : (C) 2008 by Marco Gittler
6     email                : g.marco@freenet.de
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 #ifndef TRANSITIONSETTINGS_H
18 #define TRANSITIONSETTINGS_H
19
20 #include <QDomElement>
21
22 #include "ui_transitionsettings_ui.h"
23 #include "definitions.h"
24
25 class Timecode;
26 class Transition;
27 class EffectStackEdit;
28 class Monitor;
29
30 class TransitionSettings : public QWidget, public Ui::TransitionSettings_UI
31 {
32     Q_OBJECT
33
34 public:
35     explicit TransitionSettings(Monitor *monitor, QWidget* parent = 0);
36     void raiseWindow(QWidget*);
37     void updateProjectFormat(const MltVideoProfile &profile, const Timecode &t, const QList <TrackInfo>& info);
38     void updateTimecodeFormat();
39     void setKeyframes(const QString &data, int maximum);
40
41 private:
42     EffectStackEdit *m_effectEdit;
43     Transition* m_usedTransition;
44     GenTime m_transitionDuration;
45     GenTime m_transitionStart;
46     int m_autoTrackTransition;
47     QList <TrackInfo> m_tracks;
48     void updateTrackList();
49
50 public slots:
51     void slotTransitionItemSelected(Transition* t, int nextTrack, const QPoint &p, bool update);
52     void slotTransitionChanged(bool reinit = true, bool updateCurrent = false);
53     void slotUpdateEffectParams(const QDomElement &, const QDomElement&);
54
55 private slots:
56     /** @brief Sets the new B track for the transition (automatic or forced). */
57     void slotTransitionTrackChanged();
58     /** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
59     void slotRenderPos(int pos);
60     void slotSeekTimeline(int pos);
61     void slotCheckMonitorPosition(int renderPos);
62
63 signals:
64     void transitionUpdated(Transition *, const QDomElement&);
65     void seekTimeline(int);
66     void importClipKeyframes(GRAPHICSRECTITEM = TRANSITIONWIDGET);
67 };
68
69 #endif