#include <QWidget>
class QDomElement;
-class QGraphicsRectItem;
class Monitor;
class MonitorScene;
class KeyframeHelper;
class TimecodeDisplay;
+class OnMonitorRectItem;
+
class GeometryWidget : public QWidget
{
public:
/** @brief Sets up the UI and connects it.
* @param monitor Project monitor
+ * @param timecode Timecode needed by timecode display widget
* @param clipPos Position of the clip in timeline
+ * @param isEffect true if used in an effect, false if used in a transition
* @param parent (optional) Parent widget */
GeometryWidget(Monitor *monitor, Timecode timecode, int clipPos, bool isEffect, QWidget* parent = 0);
virtual ~GeometryWidget();
* @param minframe In point of the clip
* @param maxframe Out point of the clip */
void setupParam(const QDomElement elem, int minframe, int maxframe);
+ /** @brief Updates position of the local timeline to @param relTimelinePos. */
+ void slotSyncPosition(int relTimelinePos);
+ /** @brief Switches from normal monitor to monitor scene according to @param show. */
+ void slotShowScene(bool show = true);
private:
Ui::GeometryWidget_UI m_ui;
int m_outPoint;
bool m_isEffect;
MonitorScene *m_scene;
- QGraphicsRectItem *m_rect;
+ OnMonitorRectItem *m_rect;
KeyframeHelper *m_timeline;
/** Stores the different settings in the MLT geometry format. */
Mlt::Geometry *m_geometry;
+ bool m_showScene;
private slots:
/** @brief Updates controls according to position.
/** @brief Resizes the rect by @param value (in perecent) compared to the frame size. */
void slotResize(int value);
+ /** @brief Sets the opacity to @param value. */
+ void slotSetOpacity(int value);
+
/** @brief Moves the rect to the left frame border (x position = 0). */
void slotMoveLeft();
/** @brief Centers the rect horizontally. */
/** @brief Moves the rect to the bottom frame border (y position = frame height - rect height). */
void slotMoveBottom();
+ /** @brief Enables/Disables syncing with the timeline according to @param sync. */
+ void slotSetSynchronize(bool sync);
+
signals:
void parameterChanged();
void checkMonitorPosition(int);