]> git.sesse.net Git - kdenlive/blob - src/geometryval.h
Fix force aspect ratio:
[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
40 {
41     Q_OBJECT
42 public:
43     explicit Geometryval(const MltVideoProfile profile, QPoint frame_size, QWidget* parent = 0);
44     QDomElement getParamDesc();
45     void setFrameSize(QPoint p);
46
47 private:
48     Ui::Geometryval m_ui;
49     MltVideoProfile m_profile;
50     //QGraphicsScene* scene;
51     GraphicsSceneRectMove *m_scene;
52     QDomElement m_param;
53     QGraphicsRectItem *m_paramRect;
54     Mlt::Geometry *m_geom;
55     KeyframeHelper *m_helper;
56     QGraphicsPathItem *m_path;
57     QMenu *m_scaleMenu;
58     QMenu *m_alignMenu;
59     QAction *m_syncAction;
60     bool m_fixedMode;
61     QPoint m_frameSize;
62     void updateTransitionPath();
63     Ui::GeometryPosition_UI *m_view;
64
65 public slots:
66     void setupParam(const QDomElement&, int, int);
67
68 private slots:
69     void slotNextFrame();
70     void slotPreviousFrame();
71     void slotPositionChanged(int pos, bool seek = true);
72     void slotDeleteFrame();
73     void slotAddFrame();
74     void slotUpdateTransitionProperties();
75     void slotTransparencyChanged(int transp);
76     void slotResize50();
77     void slotResize100();
78     void slotResize200();
79     void slotResizeCustom();
80     void slotResizeOriginal();
81     void slotAlignRight();
82     void slotAlignLeft();
83     void slotAlignTop();
84     void slotAlignBottom();
85     void slotAlignCenter();
86     void slotAlignHCenter();
87     void slotAlignVCenter();
88     void slotSyncCursor();
89     void slotGeometry();
90     void slotResetPosition();
91
92 signals:
93     void parameterChanged();
94     void seekToPos(int);
95 };
96
97 #endif