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>
26 #include <mlt++/Mlt.h>
28 #include "ui_geometryval_ui.h"
29 #include "definitions.h"
30 #include "keyframehelper.h"
31 #include "timecodedisplay.h"
33 class GraphicsSceneRectMove;
34 class QGraphicsRectItem;
38 class Geometryval : public QWidget, public Ui::Geometryval
42 explicit Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
43 virtual ~Geometryval();
44 QDomElement getParamDesc();
45 QString getValue() const;
46 void setFrameSize(const QPoint &p);
47 /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */
48 void updateTimecodeFormat();
49 void slotUpdateRange(int inPoint, int outPoint);
52 MltVideoProfile m_profile;
54 GraphicsSceneRectMove *m_scene;
55 QGraphicsRectItem *m_paramRect;
56 Mlt::Geometry *m_geom;
57 KeyframeHelper *m_helper;
58 QGraphicsPathItem *m_path;
60 QAction *m_syncAction;
61 QAction *m_editOptions;
65 void updateTransitionPath();
68 QGraphicsView *m_sceneview;
69 TimecodeDisplay m_timePos;
70 bool keyframeSelected();
73 void setupParam(const QDomElement, int minframe, int maxframe);
74 /** @brief Updates position of the local timeline to @param relTimelinePos. */
75 void slotSyncPosition(int relTimelinePos);
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();
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);
104 void parameterChanged();