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