1 /***************************************************************************
2 geomeytrval.h - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
23 #include <QDomElement>
24 #include <QGraphicsPathItem>
25 #include <QGraphicsView>
27 #include <mlt++/Mlt.h>
29 #include "ui_geometryval_ui.h"
30 #include "definitions.h"
31 #include "keyframehelper.h"
32 #include "timecodedisplay.h"
34 //class QGraphicsScene;
35 class GraphicsSceneRectMove;
36 class QGraphicsRectItem;
40 class Geometryval : public QWidget, public Ui::Geometryval
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 /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */
50 void updateTimecodeFormat();
51 void slotUpdateRange(int inPoint, int outPoint);
54 MltVideoProfile m_profile;
56 GraphicsSceneRectMove *m_scene;
57 QGraphicsRectItem *m_paramRect;
58 Mlt::Geometry *m_geom;
59 KeyframeHelper *m_helper;
60 QGraphicsPathItem *m_path;
62 QAction *m_syncAction;
63 QAction *m_editOptions;
67 void updateTransitionPath();
70 QGraphicsView *m_sceneview;
71 TimecodeDisplay m_timePos;
72 bool keyframeSelected();
75 void setupParam(const QDomElement, int minframe, int maxframe);
76 /** @brief Updates position of the local timeline to @param relTimelinePos. */
77 void slotSyncPosition(int relTimelinePos);
81 void slotPreviousFrame();
82 void slotPositionChanged(int pos = -1, bool seek = true);
83 void slotDeleteFrame(int pos = -1);
84 void slotAddFrame(int pos = -1);
85 void slotUpdateTransitionProperties();
86 void slotTransparencyChanged(int transp);
87 void slotResizeCustom();
88 void slotResizeOriginal();
89 void slotAlignRight();
92 void slotAlignBottom();
93 void slotAlignHCenter();
94 void slotAlignVCenter();
95 void slotSyncCursor();
96 void slotResetPosition();
97 void slotKeyframeMoved(int);
98 void slotSwitchOptions();
99 void slotUpdateGeometry();
100 void slotGeometryX(int value);
101 void slotGeometryY(int value);
102 void slotGeometryWidth(int value);
103 void slotGeometryHeight(int value);
106 void parameterChanged();