]> git.sesse.net Git - kdenlive/blob - src/simplekeyframes/simplekeyframewidget.h
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / src / simplekeyframes / simplekeyframewidget.h
1 /***************************************************************************
2  *   Copyright (C) 2011 by Till Theato (root@ttill.de)                     *
3  *   This file is part of Kdenlive (www.kdenlive.org).                     *
4  *                                                                         *
5  *   Kdenlive is free software: you can redistribute it and/or modify      *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation, either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   Kdenlive is distributed in the hope that it will be useful,           *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with Kdenlive.  If not, see <http://www.gnu.org/licenses/>.     *
17  ***************************************************************************/
18
19 #ifndef SIMPLEKEYFRAMEWIDGET_H
20 #define SIMPLEKEYFRAMEWIDGET_H
21
22 #include "timecode.h"
23
24 #include <QtCore>
25 #include <QWidget>
26
27 class SimpleTimelineWidget;
28 class TimecodeDisplay;
29 class QToolButton;
30
31
32 class SimpleKeyframeWidget : public QWidget
33 {
34     Q_OBJECT
35
36 public:
37     explicit SimpleKeyframeWidget(const Timecode &t, int duration, QWidget* parent = 0);
38     ~SimpleKeyframeWidget();
39
40     int getPosition() const;
41     void setKeyframes(const QList <int> &keyframes);
42     void addKeyframe(int pos = -1);
43
44     void updateTimecodeFormat();
45
46 public slots:
47     void slotSetPosition(int pos = -1, bool update = true);
48
49 private slots:
50     void slotAtKeyframe(bool atKeyframe);
51
52 signals:
53     void positionChanged(int pos);
54     void keyframeAdded(int pos);
55     void keyframeRemoved(int pos);
56     void keyframeMoved(int oldPos, int newPos);
57
58 private:
59     SimpleTimelineWidget *m_timeline;
60     QToolButton *m_buttonAddDelete;
61     QToolButton *m_buttonPrevious;
62     QToolButton *m_buttonNext;
63     TimecodeDisplay *m_time;
64 };
65
66
67 #endif