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