]> git.sesse.net Git - kdenlive/blob - src/effectstackedit.h
Rewrote the handling of timeline in QGraphicsView. Now we use the built in zoom featu...
[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 enum WIPE_DIRECTON { UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, CENTER = 4 };
28
29 struct wipeInfo {
30     WIPE_DIRECTON start;
31     WIPE_DIRECTON end;
32     int startTransparency;
33     int endTransparency;
34 };
35
36 class QFrame;
37
38 class EffectStackEdit : public QObject {
39     Q_OBJECT
40 public:
41     EffectStackEdit(QFrame* frame, QWidget *parent);
42     ~EffectStackEdit();
43     static QMap<QString, QImage> iconCache;
44
45 private:
46     void clearAllItems();
47     QVBoxLayout *vbox;
48     QList<QWidget*> items;
49     QList<void*> uiItems;
50     QDomElement params;
51     QMap<QString, void*> valueItems;
52     void createSliderItem(const QString& name, int val , int min, int max);
53     wipeInfo getWipeInfo(QString value);
54     QString getWipeString(wipeInfo info);
55
56 public slots:
57     void transferParamDesc(const QDomElement&, int , int);
58     void slotSliderMoved(int);
59     void collectAllParameters();
60
61 signals:
62     void parameterChanged(const QDomElement&, const QDomElement&);
63 };
64
65 #endif