]> git.sesse.net Git - kdenlive/blobdiff - src/geometryval.cpp
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / src / geometryval.cpp
index 5182c83d7efa449e284b2daae31737019ecdcd6b..7fa246e65c99893f9003940ea58f35efe66ccfea 100644 (file)
@@ -29,7 +29,7 @@
 #include <QTimer>
 
 
-Geometryval::Geometryval(const MltVideoProfile profile, Timecode t, QPoint frame_size, int startPoint, QWidget* parent) :
+Geometryval::Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint, QWidget* parent) :
         QWidget(parent),
         m_profile(profile),
         m_paramRect(NULL),
@@ -65,7 +65,7 @@ Geometryval::Geometryval(const MltVideoProfile profile, Timecode t, QPoint frame
     m_sceneview->setScene(m_scene);
     m_dar = (m_profile.height * m_profile.display_aspect_num / (double) m_profile.display_aspect_den) / (double) m_profile.width;
 
-    m_realWidth = (int)(profile.height * profile.display_aspect_num / (double) profile.display_aspect_den);
+    m_realWidth = (int)(profile.height * profile.display_aspect_num / (double) profile.display_aspect_den + 0.5);
     QGraphicsRectItem *frameBorder = new QGraphicsRectItem(QRectF(0, 0, m_realWidth, profile.height));
     frameBorder->setZValue(-1100);
     frameBorder->setBrush(QColor(255, 255, 0, 30));
@@ -419,7 +419,7 @@ void Geometryval::setupParam(const QDomElement par, int minFrame, int maxFrame)
     slotUpdateGeometry();
     if (!m_fixedMode) {
         m_timePos.setRange(0, maxFrame - minFrame - 1);
-        connect(&m_timePos, SIGNAL(editingFinished()), this , SLOT(slotPositionChanged()));
+        connect(&m_timePos, SIGNAL(timeCodeEditingFinished()), this , SLOT(slotPositionChanged()));
     }
     connect(spinTransp, SIGNAL(valueChanged(int)), this , SLOT(slotTransparencyChanged(int)));
 }
@@ -489,7 +489,7 @@ void Geometryval::slotResetPosition()
     }
 }
 
-void Geometryval::setFrameSize(QPoint p)
+void Geometryval::setFrameSize(const QPoint &p)
 {
     m_frameSize = p;
 }
@@ -578,4 +578,11 @@ bool Geometryval::keyframeSelected()
 }
 
 
+void Geometryval::slotUpdateRange(int inPoint, int outPoint)
+{
+    m_helper->setKeyGeometry(m_geom, outPoint - inPoint - 1);
+    m_helper->update();
+    m_timePos.setRange(0, outPoint - inPoint - 1);
+}
 
+#include "geometryval.moc"