]> git.sesse.net Git - kdenlive/blob - src/geometryval.h
Fix seek to pos in composite transition:
[kdenlive] / src / geometryval.h
1 /***************************************************************************
2                           geomeytrval.h  -  description
3                              -------------------
4     begin                : 03 Aug 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 GEOMETRYVAL_H
19 #define GEOMETRYVAL_H
20
21
22 #include <QWidget>
23 #include <QDomElement>
24 #include <QGraphicsPathItem>
25 #include <QGraphicsView>
26
27 #include <mlt++/Mlt.h>
28
29 #include "ui_geometryval_ui.h"
30 #include "definitions.h"
31 #include "keyframehelper.h"
32 #include "ui_geometryposition_ui.h"
33
34 //class QGraphicsScene;
35 class GraphicsSceneRectMove;
36 class QGraphicsRectItem;
37 class QMouseEvent;
38
39
40 class Geometryval : public QWidget, public Ui::Geometryval
41 {
42     Q_OBJECT
43 public:
44     explicit Geometryval(const MltVideoProfile profile, QPoint frame_size, int startPoint = 0, QWidget* parent = 0);
45     virtual ~Geometryval();
46     QDomElement getParamDesc();
47     QString getValue() const;
48     void setFrameSize(QPoint p);
49
50 private:
51     MltVideoProfile m_profile;
52     int m_realWidth;
53     GraphicsSceneRectMove *m_scene;
54     QGraphicsRectItem *m_paramRect;
55     Mlt::Geometry *m_geom;
56     KeyframeHelper *m_helper;
57     QGraphicsPathItem *m_path;
58     QMenu *m_configMenu;
59     QMenu *m_scaleMenu;
60     QMenu *m_alignMenu;
61     QAction *m_syncAction;
62     QAction *m_editGeom;
63     bool m_fixedMode;
64     QPoint m_frameSize;
65     Ui::GeometryPosition_UI m_view;
66     void updateTransitionPath();
67     double m_dar;
68     int m_startPoint;
69     QGraphicsView *m_sceneview;
70
71 public slots:
72     void setupParam(const QDomElement, int, int);
73
74 private slots:
75     void slotNextFrame();
76     void slotPreviousFrame();
77     void slotPositionChanged(int pos, bool seek = true);
78     void slotDeleteFrame(int pos = -1);
79     void slotAddFrame(int pos = -1);
80     void slotUpdateTransitionProperties();
81     void slotTransparencyChanged(int transp);
82     void slotResize50();
83     void slotResize100();
84     void slotResize200();
85     void slotResizeCustom();
86     void slotResizeOriginal();
87     void slotAlignRight();
88     void slotAlignLeft();
89     void slotAlignTop();
90     void slotAlignBottom();
91     void slotAlignCenter();
92     void slotAlignHCenter();
93     void slotAlignVCenter();
94     void slotSyncCursor();
95     void slotGeometry();
96     void slotResetPosition();
97     void slotKeyframeMoved(int);
98
99 signals:
100     void parameterChanged();
101     void seekToPos(int);
102 };
103
104 #endif