+ QRectF srect = m_sceneview->sceneRect();
+ m_sceneview->setSceneRect(srect.x(), -srect.height() / 3 + 10, srect.width(), srect.height() + srect.height() / 3 * 2 - 10);
+ m_scene->setZoom(sc);
+ m_sceneview->centerOn(frameBorder);
+ m_sceneview->setMouseTracking(true);
+ connect(buttonNext , SIGNAL(clicked()) , this , SLOT(slotNextFrame()));
+ connect(buttonPrevious , SIGNAL(clicked()) , this , SLOT(slotPreviousFrame()));
+ connect(buttonDelete , SIGNAL(clicked()) , this , SLOT(slotDeleteFrame()));
+ connect(buttonAdd , SIGNAL(clicked()) , this , SLOT(slotAddFrame()));
+ connect(m_scene, SIGNAL(actionFinished()), this, SLOT(slotUpdateTransitionProperties()));
+
+ buttonhcenter->setIcon(KIcon("kdenlive-align-hor"));
+ buttonhcenter->setToolTip(i18n("Align item horizontally"));
+ buttonvcenter->setIcon(KIcon("kdenlive-align-vert"));
+ buttonvcenter->setToolTip(i18n("Align item vertically"));
+ buttontop->setIcon(KIcon("kdenlive-align-top"));
+ buttontop->setToolTip(i18n("Align item to top"));
+ buttonbottom->setIcon(KIcon("kdenlive-align-bottom"));
+ buttonbottom->setToolTip(i18n("Align item to bottom"));
+ buttonright->setIcon(KIcon("kdenlive-align-right"));
+ buttonright->setToolTip(i18n("Align item to right"));
+ buttonleft->setIcon(KIcon("kdenlive-align-left"));
+ buttonleft->setToolTip(i18n("Align item to left"));
+
+ connect(buttonhcenter, SIGNAL(clicked()), this, SLOT(slotAlignHCenter()));
+ connect(buttonvcenter, SIGNAL(clicked()), this, SLOT(slotAlignVCenter()));
+ connect(buttontop, SIGNAL(clicked()), this, SLOT(slotAlignTop()));
+ connect(buttonbottom, SIGNAL(clicked()), this, SLOT(slotAlignBottom()));
+ connect(buttonright, SIGNAL(clicked()), this, SLOT(slotAlignRight()));
+ connect(buttonleft, SIGNAL(clicked()), this, SLOT(slotAlignLeft()));
+ connect(spinX, SIGNAL(valueChanged(int)), this, SLOT(slotGeometryX(int)));
+ connect(spinY, SIGNAL(valueChanged(int)), this, SLOT(slotGeometryY(int)));
+ connect(spinWidth, SIGNAL(valueChanged(int)), this, SLOT(slotGeometryWidth(int)));
+ connect(spinHeight, SIGNAL(valueChanged(int)), this, SLOT(slotGeometryHeight(int)));
+ connect(spinResize, SIGNAL(editingFinished()), this, SLOT(slotResizeCustom()));
+ connect(buttonResize, SIGNAL(clicked()), this, SLOT(slotResizeOriginal()));
+
+ connect(this, SIGNAL(parameterChanged()), this, SLOT(slotUpdateGeometry()));
+}
+
+
+Geometryval::~Geometryval()
+{
+ m_scene->disconnect();
+ delete m_syncAction;
+ delete m_configMenu;
+ delete m_paramRect;
+ delete m_path;
+ delete m_helper;
+ delete m_geom;
+ delete m_sceneview;
+ delete m_scene;
+}
+
+
+void Geometryval::slotAlignHCenter()
+{
+ if (!keyframeSelected())
+ return;
+ m_paramRect->setPos((m_realWidth - m_paramRect->rect().width()) / 2, m_paramRect->pos().y());
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotAlignVCenter()
+{
+ if (!keyframeSelected())
+ return;
+ m_paramRect->setPos(m_paramRect->pos().x(), (m_profile.height - m_paramRect->rect().height()) / 2);
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotAlignTop()
+{
+ if (!keyframeSelected())
+ return;
+ m_paramRect->setPos(m_paramRect->pos().x(), 0);
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotAlignBottom()
+{
+ if (!keyframeSelected())
+ return;
+ m_paramRect->setPos(m_paramRect->pos().x(), m_profile.height - m_paramRect->rect().height());
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotAlignLeft()
+{
+ if (!keyframeSelected())
+ return;
+ m_paramRect->setPos(0, m_paramRect->pos().y());
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotAlignRight()
+{
+ if (!keyframeSelected())
+ return;
+ m_paramRect->setPos(m_realWidth - m_paramRect->rect().width(), m_paramRect->pos().y());
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotResizeOriginal()
+{
+ if (!keyframeSelected())
+ return;
+ if (m_frameSize.isNull())
+ m_paramRect->setRect(0, 0, m_realWidth, m_profile.height);
+ else
+ m_paramRect->setRect(0, 0, m_frameSize.x(), m_frameSize.y());
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotResizeCustom()
+{
+ if (!keyframeSelected())
+ return;
+ int value = spinResize->value();
+ m_paramRect->setRect(0, 0, m_realWidth * value / 100, m_profile.height * value / 100);
+ slotUpdateTransitionProperties();
+}
+
+void Geometryval::slotTransparencyChanged(int transp)
+{
+ int pos = m_timePos.getValue();