]> git.sesse.net Git - kdenlive/blob - src/effectstackedit.h
00274847abf56eeb67065ab26bbe8698b2dea77c
[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
29 enum WIPE_DIRECTON { UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, CENTER = 4 };
30
31 struct wipeInfo {
32     WIPE_DIRECTON start;
33     WIPE_DIRECTON end;
34     int startTransparency;
35     int endTransparency;
36 };
37
38 class QFrame;
39
40 class EffectStackEdit : public QWidget {
41     Q_OBJECT
42 public:
43     EffectStackEdit(QWidget *parent);
44     ~EffectStackEdit();
45     void updateProjectFormat(MltVideoProfile profile);
46     static QMap<QString, QImage> iconCache;
47
48 private:
49     void clearAllItems();
50     QVBoxLayout *vbox;
51     QList<QWidget*> items;
52     QList<void*> uiItems;
53     QDomElement params;
54     QMap<QString, void*> valueItems;
55     void createSliderItem(const QString& name, int val , int min, int max);
56     wipeInfo getWipeInfo(QString value);
57     QString getWipeString(wipeInfo info);
58     MltVideoProfile m_profile;
59     int m_in;
60     int m_out;
61
62 public slots:
63     void transferParamDesc(const QDomElement&, int , int);
64     void slotSliderMoved(int);
65     void collectAllParameters();
66
67 private slots:
68     void slotSeekToPos(int);
69
70 signals:
71     void parameterChanged(const QDomElement&, const QDomElement&);
72     void seekTimeline(int);
73 };
74
75 #endif