]> git.sesse.net Git - kdenlive/blob - src/geometryval.h
4ba289e720739967700baf408bb4a1fc6a3ce3fc
[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, Timecode t, 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     /* update the timecode display depending on what the user wants (frame number or hh:mm:ss:ff) */
50     void updateTimecodeFormat();
51
52 private:
53     MltVideoProfile m_profile;
54     Timecode m_timecode;
55     int m_realWidth;
56     GraphicsSceneRectMove *m_scene;
57     QGraphicsRectItem *m_paramRect;
58     Mlt::Geometry *m_geom;
59     KeyframeHelper *m_helper;
60     QGraphicsPathItem *m_path;
61     QMenu *m_configMenu;
62     QAction *m_syncAction;
63     QAction *m_editOptions;
64     QAction *m_reset;
65     bool m_fixedMode;
66     QPoint m_frameSize;
67     Ui::GeometryPosition_UI m_view;
68     void updateTransitionPath();
69     double m_dar;
70     int m_startPoint;
71     QGraphicsView *m_sceneview;
72     bool keyframeSelected();
73
74 public slots:
75     void setupParam(const QDomElement, int, int);
76
77 private slots:
78     void slotNextFrame();
79     void slotPreviousFrame();
80     void slotPositionChanged(int pos = -1, bool seek = true);
81     void slotDeleteFrame(int pos = -1);
82     void slotAddFrame(int pos = -1);
83     void slotUpdateTransitionProperties();
84     void slotTransparencyChanged(int transp);
85     void slotResizeCustom();
86     void slotResizeOriginal();
87     void slotAlignRight();
88     void slotAlignLeft();
89     void slotAlignTop();
90     void slotAlignBottom();
91     void slotAlignHCenter();
92     void slotAlignVCenter();
93     void slotSyncCursor();
94     void slotResetPosition();
95     void slotKeyframeMoved(int);
96     void slotSwitchOptions();
97     void slotUpdateGeometry();
98     void slotGeometryX(int value);
99     void slotGeometryY(int value);
100     void slotGeometryWidth(int value);
101     void slotGeometryHeight(int value);
102     void slotPosUp();
103     void slotPosDown();
104
105 signals:
106     void parameterChanged();
107     void seekToPos(int);
108 };
109
110 #endif