]> git.sesse.net Git - kdenlive/blob - src/geometryval.h
Fix indent
[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 "timecodedisplay.h"
32
33 class GraphicsSceneRectMove;
34 class QGraphicsRectItem;
35 class QGraphicsView;
36
37
38 class Geometryval : public QWidget, public Ui::Geometryval
39 {
40     Q_OBJECT
41 public:
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);
50
51 private:
52     MltVideoProfile m_profile;
53     int m_realWidth;
54     GraphicsSceneRectMove *m_scene;
55     QGraphicsRectItem *m_paramRect;
56     Mlt::Geometry *m_geom;
57     KeyframeHelper *m_helper;
58     QGraphicsPathItem *m_path;
59     QMenu *m_configMenu;
60     QAction *m_syncAction;
61     QAction *m_editOptions;
62     QAction *m_reset;
63     bool m_fixedMode;
64     QPoint m_frameSize;
65     void updateTransitionPath();
66     double m_dar;
67     int m_startPoint;
68     QGraphicsView *m_sceneview;
69     TimecodeDisplay m_timePos;
70     bool keyframeSelected();
71
72 public slots:
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);
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
103 signals:
104     void parameterChanged();
105     void seekToPos(int);
106 };
107
108 #endif