1 /***************************************************************************
2 * Copyright (C) 2011 by Till Theato (root@ttill.de) *
3 * This file is part of Kdenlive (www.kdenlive.org). *
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. *
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. *
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 ***************************************************************************/
19 #ifndef SIMPLETIMELINEWIDGET_H
20 #define SIMPLETIMELINEWIDGET_H
25 class SimpleTimelineWidget : public QWidget
30 explicit SimpleTimelineWidget(QWidget* parent = 0);
31 void setKeyframes(const QList <int>& keyframes);
32 void setDuration(int dur);
35 void slotSetPosition(int pos);
36 void slotRemoveKeyframe(int pos);
37 void slotAddKeyframe(int pos = - 1, int select = false);
43 void paintEvent(QPaintEvent *event);
44 void mousePressEvent(QMouseEvent *event);
45 void mouseReleaseEvent(QMouseEvent *event);
46 void mouseMoveEvent(QMouseEvent *event);
47 void mouseDoubleClickEvent(QMouseEvent *event);
48 void wheelEvent(QWheelEvent *event);
53 int m_currentKeyframe;
54 int m_currentKeyframeOriginal;
56 QList <int> m_keyframes;
62 QColor m_colKeyframeBg;
65 void positionChanged(int pos);
66 void atKeyframe(bool);
68 void keyframeSelected();
69 void keyframeMoving(int oldPos, int currentPos);
70 void keyframeMoved(int oldPos, int newPos);
71 void keyframeAdded(int pos);
72 void keyframeRemoved(int pos);