]> git.sesse.net Git - kdenlive/blob - src/effectstackedit.h
Several fixes for keyframes, fix bug in clip resize start undo and cleanup
[kdenlive] / src / effectstackedit.h
1 /***************************************************************************
2                           effecstackedit.h  -  description
3                              -------------------
4     begin                : Feb 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
18 #ifndef EFFECTSTACKEDIT_H
19 #define EFFECTSTACKEDIT_H
20
21 #include "definitions.h"
22 #include "timecode.h"
23
24
25 #include <QWidget>
26 #include <QDomElement>
27 #include <QVBoxLayout>
28 #include <QList>
29 #include <QMap>
30 #include <QScrollArea>
31
32 enum WIPE_DIRECTON { UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, CENTER = 4 };
33
34 struct wipeInfo {
35     WIPE_DIRECTON start;
36     WIPE_DIRECTON end;
37     int startTransparency;
38     int endTransparency;
39 };
40
41 class QFrame;
42
43 class EffectStackEdit : public QScrollArea
44 {
45     Q_OBJECT
46 public:
47     EffectStackEdit(QWidget *parent);
48     ~EffectStackEdit();
49     void updateProjectFormat(MltVideoProfile profile, Timecode t);
50     static QMap<QString, QImage> iconCache;
51     void updateParameter(const QString &name, const QString &value);
52     void setFrameSize(QPoint p);
53
54 private:
55     void clearAllItems();
56     QVBoxLayout *m_vbox;
57     QList<QWidget*> m_uiItems;
58     QWidget *m_baseWidget;
59     QDomElement m_params;
60     QMap<QString, QWidget*> m_valueItems;
61     void createSliderItem(const QString& name, int val , int min, int max, const QString);
62     wipeInfo getWipeInfo(QString value);
63     QString getWipeString(wipeInfo info);
64     MltVideoProfile m_profile;
65     Timecode m_timecode;
66     int m_in;
67     int m_out;
68     QPoint m_frameSize;
69
70 public slots:
71     void transferParamDesc(const QDomElement, int , int);
72     void slotSliderMoved(int);
73     /** \brief Called whenever(?) some parameter is changed in the gui.
74      *
75      * Transfers all Dynamic gui parameter settings into m_params(??) */
76     void collectAllParameters();
77
78 private slots:
79     void slotSeekToPos(int);
80
81 signals:
82     void parameterChanged(const QDomElement, const QDomElement);
83     void seekTimeline(int);
84 };
85
86 #endif