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