]> git.sesse.net Git - kdenlive/blob - src/geometryval.h
USe const'ref
[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 "timecodedisplay.h"
33
34 //class QGraphicsScene;
35 class GraphicsSceneRectMove;
36 class QGraphicsRectItem;
37
38
39 class Geometryval : public QWidget, public Ui::Geometryval
40 {
41     Q_OBJECT
42 public:
43     explicit Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
44     virtual ~Geometryval();
45     QDomElement getParamDesc();
46     QString getValue() const;
47     void setFrameSize(QPoint p);
48     /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */
49     void updateTimecodeFormat();
50     void slotUpdateRange(int inPoint, int outPoint);
51
52 private:
53     MltVideoProfile m_profile;
54     int m_realWidth;
55     GraphicsSceneRectMove *m_scene;
56     QGraphicsRectItem *m_paramRect;
57     Mlt::Geometry *m_geom;
58     KeyframeHelper *m_helper;
59     QGraphicsPathItem *m_path;
60     QMenu *m_configMenu;
61     QAction *m_syncAction;
62     QAction *m_editOptions;
63     QAction *m_reset;
64     bool m_fixedMode;
65     QPoint m_frameSize;
66     void updateTransitionPath();
67     double m_dar;
68     int m_startPoint;
69     QGraphicsView *m_sceneview;
70     TimecodeDisplay m_timePos;
71     bool keyframeSelected();
72
73 public slots:
74     void setupParam(const QDomElement, int minframe, int maxframe);
75     /** @brief Updates position of the local timeline to @param relTimelinePos.  */
76     void slotSyncPosition(int relTimelinePos);
77
78 private slots:
79     void slotNextFrame();
80     void slotPreviousFrame();
81     void slotPositionChanged(int pos = -1, bool seek = true);
82     void slotDeleteFrame(int pos = -1);
83     void slotAddFrame(int pos = -1);
84     void slotUpdateTransitionProperties();
85     void slotTransparencyChanged(int transp);
86     void slotResizeCustom();
87     void slotResizeOriginal();
88     void slotAlignRight();
89     void slotAlignLeft();
90     void slotAlignTop();
91     void slotAlignBottom();
92     void slotAlignHCenter();
93     void slotAlignVCenter();
94     void slotSyncCursor();
95     void slotResetPosition();
96     void slotKeyframeMoved(int);
97     void slotSwitchOptions();
98     void slotUpdateGeometry();
99     void slotGeometryX(int value);
100     void slotGeometryY(int value);
101     void slotGeometryWidth(int value);
102     void slotGeometryHeight(int value);
103
104 signals:
105     void parameterChanged();
106     void seekToPos(int);
107 };
108
109 #endif