CustomTrackScene::CustomTrackScene(KdenliveDoc *doc, QObject *parent) :
QGraphicsScene(parent),
m_document(doc),
- m_scale(1.0, 1.0)
+ m_scale(1.0, 1.0),
+ m_editMode(NormalEdit)
{
}
if (qAbs((int)(pos - m_snapPoints.at(i).frames(m_document->fps()))) < maximumOffset) {
return m_snapPoints.at(i).frames(m_document->fps());
}
- if (m_snapPoints.at(i).frames(m_document->fps()) > pos) break;
+ if (m_snapPoints.at(i).frames(m_document->fps()) > pos)
+ break;
}
}
return GenTime(pos, m_document->fps()).frames(m_document->fps());
}
-void CustomTrackScene::setSnapList(QList <GenTime> snaps)
+void CustomTrackScene::setSnapList(const QList <GenTime>& snaps)
{
m_snapPoints = snaps;
}
-GenTime CustomTrackScene::previousSnapPoint(GenTime pos) const
+GenTime CustomTrackScene::previousSnapPoint(const GenTime &pos) const
{
for (int i = 0; i < m_snapPoints.size(); ++i) {
if (m_snapPoints.at(i) >= pos) {
return GenTime();
}
-GenTime CustomTrackScene::nextSnapPoint(GenTime pos) const
+GenTime CustomTrackScene::nextSnapPoint(const GenTime &pos) const
{
for (int i = 0; i < m_snapPoints.size(); ++i) {
if (m_snapPoints.at(i) > pos) {
return m_document->mltProfile();
}
+void CustomTrackScene::setEditMode(EditMode mode)
+{
+ m_editMode = mode;
+}
+
+EditMode CustomTrackScene::editMode() const
+{
+ return m_editMode;
+}
+
#include "customtrackscene.moc"