]> git.sesse.net Git - kdenlive/commitdiff
Add keyframe support to new geometry widget
authorTill Theato <root@ttill.de>
Thu, 12 Aug 2010 20:03:50 +0000 (20:03 +0000)
committerTill Theato <root@ttill.de>
Thu, 12 Aug 2010 20:03:50 +0000 (20:03 +0000)
svn path=/trunk/kdenlive/; revision=4708

src/effectstackedit.cpp
src/geometrywidget.cpp
src/geometrywidget.h
src/monitorscene.cpp
src/monitorscene.h
src/timecodedisplay.cpp
src/widgets/geometrywidget_ui.ui

index 8781876511f90c1601804b57b92c88f6dd6d10ec..b3bda1440b834a7f8b5800ec3a0889045e8e3b8b 100644 (file)
@@ -124,9 +124,14 @@ void EffectStackEdit::updateTimecodeFormat()
         QString type = pa.attributes().namedItem("type").nodeValue();
         QString paramName = i18n(na.toElement().text().toUtf8().data());
 
-        if (type == "geometry" && !KdenliveSettings::on_monitor_effects()) {
-            Geometryval *geom = ((Geometryval*)m_valueItems[paramName+"geometry"]);
-            geom->updateTimecodeFormat();
+        if (type == "geometry") {
+            if (KdenliveSettings::on_monitor_effects()) {
+                GeometryWidget *geom = (GeometryWidget*)m_valueItems[paramName+"geometry"];
+                geom->updateTimecodeFormat();
+            } else {
+                Geometryval *geom = ((Geometryval*)m_valueItems[paramName+"geometry"]);
+                geom->updateTimecodeFormat();
+            }
             break;
         }
         if (type == "position") {
@@ -260,7 +265,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
             connect(pl, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
         } else if (type == "geometry") {
             if (KdenliveSettings::on_monitor_effects()) {
-                GeometryWidget *geometry = new GeometryWidget(m_monitor, pos, isEffect, this);
+                GeometryWidget *geometry = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, this);
                 if (minFrame == maxFrame)
                     geometry->setupParam(pa, m_in, m_out);
                 else
@@ -269,6 +274,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
                 m_valueItems[paramName+"geometry"] = geometry;
                 connect(geometry, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
                 connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
+                connect(geometry, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
             } else {
                 Geometryval *geo = new Geometryval(m_profile, m_timecode, m_frameSize, pos);
                 if (minFrame == maxFrame)
index 6e3fdc917cc8a9688dc183dfac121716452a97d9..72572e44ab63779e225639a7b3ad11e9a7f0f13e 100644 (file)
 #include "geometrywidget.h"
 #include "monitor.h"
 #include "renderer.h"
+#include "keyframehelper.h"
+#include "timecodedisplay.h"
 #include "monitorscene.h"
+#include "kdenlivesettings.h"
 
 #include <QtCore>
 #include <QGraphicsView>
 #include <QGraphicsRectItem>
+#include <QVBoxLayout>
+#include <QGridLayout>
 
-GeometryWidget::GeometryWidget(Monitor* monitor, int clipPos, bool isEffect, QWidget* parent ):
+GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, bool isEffect, QWidget* parent ):
         QWidget(parent),
         m_monitor(monitor),
+        m_timePos(new TimecodeDisplay(timecode)),
         m_clipPos(clipPos),
         m_inPoint(0),
         m_outPoint(1),
@@ -38,7 +44,39 @@ GeometryWidget::GeometryWidget(Monitor* monitor, int clipPos, bool isEffect, QWi
         m_geometry(NULL)
 {
     m_ui.setupUi(this);
-    m_scene = monitor->getEffectScene();
+
+
+    /*
+        Setup of timeline and keyframe controls
+    */
+
+    ((QGridLayout *)(m_ui.widgetTimeWrapper->layout()))->addWidget(m_timePos, 1, 4);
+
+    QVBoxLayout *layout = new QVBoxLayout(m_ui.frameTimeline);
+    m_timeline = new KeyframeHelper(m_ui.frameTimeline);
+    layout->addWidget(m_timeline);
+    layout->setContentsMargins(0, 0, 0, 0);
+
+    m_ui.buttonPrevious->setIcon(KIcon("media-skip-backward"));
+    m_ui.buttonPrevious->setToolTip(i18n("Go to previous keyframe"));
+    m_ui.buttonNext->setIcon(KIcon("media-skip-forward"));
+    m_ui.buttonNext->setToolTip(i18n("Go to next keyframe"));
+    m_ui.buttonAddDelete->setIcon(KIcon("document-new"));
+    m_ui.buttonAddDelete->setToolTip(i18n("Add keyframe"));
+
+    connect(m_timeline, SIGNAL(positionChanged(int)), this, SLOT(slotPositionChanged(int)));
+    connect(m_timeline, SIGNAL(keyframeMoved(int)),   this, SLOT(slotKeyframeMoved(int)));
+    connect(m_timeline, SIGNAL(addKeyframe(int)),     this, SLOT(slotAddKeyframe(int)));
+    connect(m_timeline, SIGNAL(removeKeyframe(int)),  this, SLOT(slotDeleteKeyframe(int)));
+    connect(m_timePos, SIGNAL(editingFinished()), this , SLOT(slotPositionChanged()));
+    connect(m_ui.buttonPrevious,  SIGNAL(clicked()), this, SLOT(slotPreviousKeyframe()));
+    connect(m_ui.buttonNext,      SIGNAL(clicked()), this, SLOT(slotNextKeyframe()));
+    connect(m_ui.buttonAddDelete, SIGNAL(clicked()), this, SLOT(slotAddDeleteKeyframe()));
+
+
+    /*
+        Setup of geometry controls
+    */
 
     m_ui.buttonMoveLeft->setIcon(KIcon("kdenlive-align-left"));
     m_ui.buttonMoveLeft->setToolTip(i18n("Move to left"));
@@ -53,7 +91,6 @@ GeometryWidget::GeometryWidget(Monitor* monitor, int clipPos, bool isEffect, QWi
     m_ui.buttonMoveBottom->setIcon(KIcon("kdenlive-align-bottom"));
     m_ui.buttonMoveBottom->setToolTip(i18n("Move to bottom"));
 
-
     connect(m_ui.spinX,            SIGNAL(valueChanged(int)), this, SLOT(slotSetX(int)));
     connect(m_ui.spinY,            SIGNAL(valueChanged(int)), this, SLOT(slotSetY(int)));
     connect(m_ui.spinWidth,        SIGNAL(valueChanged(int)), this, SLOT(slotSetWidth(int)));
@@ -68,18 +105,27 @@ GeometryWidget::GeometryWidget(Monitor* monitor, int clipPos, bool isEffect, QWi
     connect(m_ui.buttonCenterV,    SIGNAL(clicked()), this, SLOT(slotCenterV()));
     connect(m_ui.buttonMoveBottom, SIGNAL(clicked()), this, SLOT(slotMoveBottom()));
 
+
+    m_scene = monitor->getEffectScene();
     connect(m_scene, SIGNAL(actionFinished()), this, SLOT(slotUpdateGeometry()));
-    connect(m_monitor->render, SIGNAL(rendererPosition(int)), this, SLOT(slotCheckPosition(int)));
+    connect(m_monitor->render, SIGNAL(rendererPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
     connect(this, SIGNAL(parameterChanged()), this, SLOT(slotUpdateProperties()));
 }
 
 GeometryWidget::~GeometryWidget()
 {
+    delete m_timePos;
+    delete m_timeline;
     m_scene->removeItem(m_rect);
     delete m_geometry;
     m_monitor->slotEffectScene(false);
 }
 
+void GeometryWidget::updateTimecodeFormat()
+{
+    m_timePos->slotUpdateTimeCodeFormat();
+}
+
 QString GeometryWidget::getValue() const
 {
     return m_geometry->serialise();
@@ -89,15 +135,23 @@ void GeometryWidget::setupParam(const QDomElement elem, int minframe, int maxfra
 {
     m_inPoint = minframe;
     m_outPoint = maxframe;
-    QString value = elem.attribute("value");
 
-    char *tmp = (char *) qstrdup(value.toUtf8().data());
+    char *tmp = (char *) qstrdup(elem.attribute("value").toUtf8().data());
     if (m_geometry)
         m_geometry->parse(tmp, maxframe - minframe, m_monitor->render->renderWidth(), m_monitor->render->renderHeight());
     else
         m_geometry = new Mlt::Geometry(tmp, maxframe - minframe, m_monitor->render->renderWidth(), m_monitor->render->renderHeight());
     delete[] tmp;
 
+    if (elem.attribute("fixed") == "1") {
+        // Keyframes are disabled
+        m_ui.widgetTimeWrapper->setHidden(true);
+    } else {
+        m_timeline->setKeyGeometry(m_geometry, m_outPoint - m_inPoint - 1);
+        m_timeline->update();
+        m_timePos->setRange(0, m_outPoint - m_inPoint - 1);
+    }
+
     Mlt::GeometryItem item;
 
     m_geometry->fetch(&item, 0);
@@ -113,11 +167,120 @@ void GeometryWidget::setupParam(const QDomElement elem, int minframe, int maxfra
     m_rect->setBrush(Qt::transparent);
     m_scene->addItem(m_rect);
 
+    slotPositionChanged(0, false);
     slotUpdateProperties();
-    slotCheckPosition(m_monitor->render->seekFramePosition());
+    slotCheckMonitorPosition(m_monitor->render->seekFramePosition());
+}
+
+
+void GeometryWidget::slotPositionChanged(int pos, bool seek)
+{
+    if (pos == -1)
+        pos = m_timePos->getValue();
+
+    m_timePos->setValue(pos);
+    m_timeline->blockSignals(true);
+    m_timeline->setValue(pos);
+    m_timeline->blockSignals(false);
+
+    Mlt::GeometryItem item;
+    if (m_geometry->fetch(&item, pos) || item.key() == false) {
+        // no keyframe
+        m_scene->setEnabled(false);
+        m_ui.widgetGeometry->setEnabled(false);
+        m_ui.buttonAddDelete->setIcon(KIcon("document-new"));
+        m_ui.buttonAddDelete->setToolTip(i18n("Add keyframe"));
+    } else {
+        // keyframe
+        m_scene->setEnabled(true);
+        m_ui.widgetGeometry->setEnabled(true);
+        m_ui.buttonAddDelete->setIcon(KIcon("edit-delete"));
+        m_ui.buttonAddDelete->setToolTip(i18n("Delete keyframe"));
+    }
+
+    m_rect->setPos(item.x(), item.y());
+    m_rect->setRect(0, 0, item.w(), item.h());
+    slotUpdateProperties();
+
+    if (seek && KdenliveSettings::transitionfollowcursor())
+        emit seekToPos(m_clipPos + pos);
 }
 
-void GeometryWidget::slotCheckPosition(int renderPos)
+void GeometryWidget::slotKeyframeMoved(int pos)
+{
+    slotPositionChanged(pos);
+    slotUpdateGeometry();
+}
+
+void GeometryWidget::slotAddKeyframe(int pos)
+{
+    Mlt::GeometryItem item;
+    if (pos == -1)
+        pos = m_timePos->getValue();
+    item.frame(pos);
+    QRectF r = m_rect->rect().normalized();
+    QPointF rectpos = m_rect->pos();
+    item.x(rectpos.x());
+    item.y(rectpos.y());
+    item.w(r.width());
+    item.h(r.height());
+    m_geometry->insert(item);
+
+    m_timeline->update();
+    slotPositionChanged(pos, false);
+    emit parameterChanged();
+}
+
+void GeometryWidget::slotDeleteKeyframe(int pos)
+{
+    Mlt::GeometryItem item;
+    if (pos == -1)
+        pos = m_timePos->getValue();
+    // check there is more than one keyframe, do not allow to delete last one
+    if (m_geometry->next_key(&item, pos + 1)) {
+        if (m_geometry->prev_key(&item, pos - 1) || item.frame() == pos)
+            return;
+    }
+    m_geometry->remove(pos);
+
+    m_timeline->update();
+    slotPositionChanged(pos, false);
+    emit parameterChanged();
+}
+
+void GeometryWidget::slotPreviousKeyframe()
+{
+    Mlt::GeometryItem item;
+    // Go to start if no keyframe is found
+    int pos = 0;
+    if(!m_geometry->prev_key(&item, m_timeline->value() - 1))
+        pos = item.frame();
+
+    slotPositionChanged(pos);
+}
+
+void GeometryWidget::slotNextKeyframe()
+{
+    Mlt::GeometryItem item;
+    // Go to end if no keyframe is found
+    int pos = m_timeline->frameLength;
+    if (!m_geometry->next_key(&item, m_timeline->value() + 1))
+        pos = item.frame();
+
+    slotPositionChanged(pos);
+}
+
+void GeometryWidget::slotAddDeleteKeyframe()
+{
+    Mlt::GeometryItem item;
+    if (m_geometry->fetch(&item, m_timePos->getValue()) || item.key() == false)
+        slotAddKeyframe();
+    else
+        slotDeleteKeyframe();
+}
+
+
+void GeometryWidget::slotCheckMonitorPosition(int renderPos)
 {
     /*
         We do only get the position in timeline if this geometry belongs to a transition,
@@ -135,10 +298,14 @@ void GeometryWidget::slotCheckPosition(int renderPos)
     }
 }
 
+
 void GeometryWidget::slotUpdateGeometry()
 {
     Mlt::GeometryItem item;
-    m_geometry->next_key(&item, 0);
+    int pos = m_timePos->getValue();
+    // get keyframe and make sure it is the correct one
+    if (m_geometry->next_key(&item, pos) || item.frame() != pos)
+        return;
 
     QRectF rectSize = m_rect->rect().normalized();
     QPointF rectPos = m_rect->pos();
index 79e5baf7a688b6627a478bca796a29837454e8f6..35369f434154e2d27016ccf26dde65934da3b968 100644 (file)
@@ -22,6 +22,7 @@
 #define GEOMETRYWIDGET_H
 
 #include "ui_geometrywidget_ui.h"
+#include "timecode.h"
 #include <mlt++/Mlt.h>
 
 #include <QWidget>
@@ -30,6 +31,8 @@ class QDomElement;
 class QGraphicsRectItem;
 class Monitor;
 class MonitorScene;
+class KeyframeHelper;
+class TimecodeDisplay;
 
 class GeometryWidget : public QWidget
 {
@@ -39,10 +42,12 @@ public:
     * @param monitor Project monitor
     * @param clipPos Position of the clip in timeline
     * @param parent (optional) Parent widget */
-    GeometryWidget(Monitor *monitor, int clipPos, bool isEffect, QWidget* parent = 0);
+    GeometryWidget(Monitor *monitor, Timecode timecode, int clipPos, bool isEffect, QWidget* parent = 0);
     virtual ~GeometryWidget();
     /** @brief Gets the geometry as a serialized string. */
     QString getValue() const;
+    /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */
+    void updateTimecodeFormat();
 
 public slots:
     /** @brief Sets up the rect and the geometry object.
@@ -54,6 +59,7 @@ public slots:
 private:
     Ui::GeometryWidget_UI m_ui;
     Monitor *m_monitor;
+    TimecodeDisplay *m_timePos;
     /** Position of the clip in timeline. */
     int m_clipPos;
     /** In point of the clip (crop from start). */
@@ -63,12 +69,37 @@ private:
     bool m_isEffect;
     MonitorScene *m_scene;
     QGraphicsRectItem *m_rect;
+    KeyframeHelper *m_timeline;
+    /** Stores the different settings in the MLT geometry format. */
     Mlt::Geometry *m_geometry;
 
 private slots:
+    /** @brief Updates controls according to position.
+    * @param pos (optional) Position to update to
+    * @param seek (optional, default = true) Whether to seek timleine & project monitor to pos
+    * If pos = -1 (default) the value of m_timePos is used. */
+    void slotPositionChanged(int pos = -1, bool seek = true);
+    /** @brief Updates settings after a keyframe was moved to @param pos. */
+    void slotKeyframeMoved(int pos);
+    /** @brief Adds a keyframe.
+    * @param pos (optional) Position where the keyframe should be added
+    * If pos = -1 (default) the value of m_timePos is used. */
+    void slotAddKeyframe(int pos = -1);
+    /** @brief Deletes a keyframe.
+    * @param pos (optional) Position of the keyframe which should be deleted
+    * If pos = -1 (default) the value of m_timePos is used. */
+    void slotDeleteKeyframe(int pos = -1);
+    /** @brief Goes to the next keyframe or to the end if none is available. */
+    void slotNextKeyframe();
+    /** @brief Goes to the previous keyframe or to the beginning if none is available. */
+    void slotPreviousKeyframe();
+    /** @brief Adds or deletes a keyframe depending on whether there is already a keyframe at the current position. */
+    void slotAddDeleteKeyframe();
+
     /** @brief Makes sure the monitor effect scene is only visible if the clip this geometry belongs to is visible.
     * @param renderPos Postion of the Monitor / Timeline cursor */
-    void slotCheckPosition(int renderPos);
+    void slotCheckMonitorPosition(int renderPos);
+
     /** @brief Updates the Mlt::Geometry object. */
     void slotUpdateGeometry();
     /** @brief Updates the spinBoxes according to the rect. */
@@ -102,6 +133,7 @@ private slots:
 signals:
     void parameterChanged();
     void checkMonitorPosition(int);
+    void seekToPos(int);
 };
 
 #endif
index fc80d705dea0bf6e71764e5da9e919bc541c9836..7048f12b3d83e51f240a410a015ce77fde23a373 100644 (file)
@@ -33,7 +33,8 @@ MonitorScene::MonitorScene(Render *renderer, QObject* parent) :
         m_selectedItem(NULL),
         m_resizeMode(NoResize),
         m_clickPoint(0, 0),
-        m_backgroundImage(QImage())
+        m_backgroundImage(QImage()),
+        m_enabled(true)
 {
     setBackgroundBrush(QBrush(QColor(KdenliveSettings::window_background().name())));
 
@@ -74,6 +75,11 @@ void MonitorScene::setUp()
     slotUpdateBackground(true);
 }
 
+void MonitorScene::setEnabled(bool enabled)
+{
+    m_enabled = enabled;
+}
+
 void MonitorScene::slotUpdateBackground(bool fit)
 {
     if (m_view && m_view->isVisible()) {
@@ -137,6 +143,9 @@ resizeModes MonitorScene::getResizeMode(QGraphicsRectItem *item, QPoint pos)
 
 void MonitorScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
 {
+    if (!m_enabled)
+        return;
+
     m_resizeMode = NoResize;
     m_selectedItem = NULL;
 
@@ -159,6 +168,9 @@ void MonitorScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
 
 void MonitorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
 {
+    if (!m_enabled)
+        return;
+
     QPointF mousePos = event->scenePos();
 
     if (m_selectedItem && event->buttons() & Qt::LeftButton) {
@@ -276,6 +288,9 @@ void MonitorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
 
 void MonitorScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
 {
+    if (!m_enabled)
+        return;
+
     QGraphicsScene::mouseReleaseEvent(event);
     emit actionFinished();
 }
index 87c36968478bde7a66b73289679c501eb703c710..ac26f4e56bdb721ba86d1117bebc403df1d999dc 100644 (file)
@@ -34,6 +34,7 @@ class MonitorScene : public QGraphicsScene
 public:
     MonitorScene(Render *renderer, QObject* parent = 0);
     void setUp();
+    void setEnabled(bool enabled = true);
 
 protected:
     virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
@@ -58,6 +59,7 @@ private:
     resizeModes m_resizeMode;
     QPointF m_clickPoint;
     QImage m_backgroundImage;
+    bool m_enabled;
 
 signals:
     void actionFinished();
index 77b49599dbabe3323b728571cc05f53d50fd056a..72bbd863e0e62c4e7860293d7b9fa013a7d3871c 100644 (file)
@@ -39,7 +39,7 @@ TimecodeDisplay::TimecodeDisplay(Timecode t, QWidget *parent)
     lineedit->setFont(KGlobalSettings::toolBarFont());
     QFontMetrics fm = lineedit->fontMetrics();
     lineedit->setMaximumWidth(fm.width("88:88:88:888"));
-    setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
+    setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
 
     setTimeCodeFormat(KdenliveSettings::frametimecode(), true);
 
index 264b4d6148748f9b6d0d304a273cdaf5006bebb9..fac79bf979e861e932d1dac5051d5a1870853c76 100644 (file)
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>274</width>
-    <height>133</height>
+    <width>285</width>
+    <height>187</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="1">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>X</string>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="2">
-    <widget class="QSpinBox" name="spinX">
-     <property name="minimum">
-      <number>-10000</number>
-     </property>
-     <property name="maximum">
-      <number>10000</number>
-     </property>
-    </widget>
-   </item>
    <item row="1" column="1">
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Y</string>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1">
-    <widget class="QLabel" name="label_3">
-     <property name="text">
-      <string>Width</string>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="1">
-    <widget class="QLabel" name="label_4">
-     <property name="text">
-      <string>Height</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="2">
-    <widget class="QSpinBox" name="spinY">
-     <property name="minimum">
-      <number>-10000</number>
-     </property>
-     <property name="maximum">
-      <number>10000</number>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="2">
-    <widget class="QSpinBox" name="spinWidth">
-     <property name="minimum">
-      <number>1</number>
-     </property>
-     <property name="maximum">
-      <number>10000</number>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="2">
-    <widget class="QSpinBox" name="spinHeight">
-     <property name="minimum">
-      <number>1</number>
-     </property>
-     <property name="maximum">
-      <number>10000</number>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="4" rowspan="3">
-    <widget class="QFrame" name="frame">
-     <property name="frameShape">
-      <enum>QFrame::StyledPanel</enum>
-     </property>
-     <property name="frameShadow">
-      <enum>QFrame::Raised</enum>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_2">
+    <widget class="QWidget" name="widgetGeometry" native="true">
+     <layout class="QGridLayout" name="gridLayout_3">
       <item row="0" column="0">
-       <widget class="QToolButton" name="buttonMoveLeft">
+       <widget class="QLabel" name="label">
         <property name="text">
-         <string>...</string>
+         <string>X</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="2">
-       <widget class="QToolButton" name="buttonMoveRight">
-        <property name="text">
-         <string>...</string>
+      <item row="2" column="1">
+       <widget class="QSpinBox" name="spinY">
+        <property name="minimum">
+         <number>-10000</number>
+        </property>
+        <property name="maximum">
+         <number>10000</number>
         </property>
        </widget>
       </item>
       <item row="0" column="1">
-       <widget class="QToolButton" name="buttonCenterH">
-        <property name="text">
-         <string>...</string>
+       <widget class="QSpinBox" name="spinX">
+        <property name="minimum">
+         <number>-10000</number>
+        </property>
+        <property name="maximum">
+         <number>10000</number>
         </property>
        </widget>
       </item>
-      <item row="1" column="0">
-       <widget class="QToolButton" name="buttonMoveTop">
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_2">
         <property name="text">
-         <string>...</string>
+         <string>Y</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="1">
-       <widget class="QToolButton" name="buttonCenterV">
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_3">
         <property name="text">
-         <string>...</string>
+         <string>Width</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="2">
-       <widget class="QToolButton" name="buttonMoveBottom">
-        <property name="text">
-         <string>...</string>
+      <item row="3" column="1">
+       <widget class="QSpinBox" name="spinWidth">
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>10000</number>
         </property>
        </widget>
       </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="0" column="4">
-    <widget class="QWidget" name="widget" native="true">
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QLabel" name="label_5">
+      <item row="4" column="0">
+       <widget class="QLabel" name="label_4">
         <property name="text">
-         <string>Resize:</string>
+         <string>Height</string>
         </property>
        </widget>
       </item>
-      <item>
-       <widget class="QSpinBox" name="spinSize">
-        <property name="suffix">
-         <string>%</string>
-        </property>
+      <item row="4" column="1">
+       <widget class="QSpinBox" name="spinHeight">
         <property name="minimum">
          <number>1</number>
         </property>
         <property name="maximum">
-         <number>500</number>
+         <number>10000</number>
         </property>
-        <property name="value">
-         <number>100</number>
+       </widget>
+      </item>
+      <item row="0" column="3">
+       <widget class="QWidget" name="widget" native="true">
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QLabel" name="label_5">
+           <property name="text">
+            <string>Resize:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="spinSize">
+           <property name="suffix">
+            <string>%</string>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>500</number>
+           </property>
+           <property name="value">
+            <number>100</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="2" column="3" rowspan="3">
+       <widget class="QFrame" name="frame">
+        <property name="frameShape">
+         <enum>QFrame::StyledPanel</enum>
+        </property>
+        <property name="frameShadow">
+         <enum>QFrame::Raised</enum>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_2">
+         <item row="0" column="0">
+          <widget class="QToolButton" name="buttonMoveLeft">
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="2">
+          <widget class="QToolButton" name="buttonMoveRight">
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QToolButton" name="buttonCenterH">
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QToolButton" name="buttonMoveTop">
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QToolButton" name="buttonCenterV">
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="2">
+          <widget class="QToolButton" name="buttonMoveBottom">
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="0" column="2" rowspan="5">
+       <widget class="Line" name="line">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
-   <item row="0" column="5" rowspan="4">
-    <spacer name="horizontalSpacer">
+   <item row="1" column="0">
+    <spacer name="horizontalSpacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      </property>
     </spacer>
    </item>
-   <item row="0" column="3" rowspan="4">
-    <widget class="Line" name="line">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="0" rowspan="4">
-    <spacer name="horizontalSpacer_2">
+   <item row="1" column="2">
+    <spacer name="horizontalSpacer">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      </property>
     </spacer>
    </item>
+   <item row="0" column="0" colspan="3">
+    <widget class="QWidget" name="widgetTimeWrapper" native="true">
+     <layout class="QGridLayout" name="gridLayout_4">
+      <property name="margin">
+       <number>0</number>
+      </property>
+      <item row="1" column="0">
+       <widget class="QToolButton" name="buttonPrevious">
+        <property name="text">
+         <string>...</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QToolButton" name="buttonNext">
+        <property name="text">
+         <string>...</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QToolButton" name="buttonAddDelete">
+        <property name="text">
+         <string>...</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <spacer name="horizontalSpacer_3">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="0" column="0" colspan="5">
+       <widget class="QFrame" name="frameTimeline">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>0</width>
+          <height>15</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>15</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="4">
+       <widget class="QFrame" name="frameTimePos"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>