Monitor::Monitor(Kdenlive::MONITORID id, MonitorManager *manager, QString profile, QWidget *parent) :
- AbstractMonitor(id, manager, parent),
- render(NULL),
- m_currentClip(NULL),
- m_overlay(NULL),
- m_scale(1),
- m_length(2),
- m_dragStarted(false),
- m_contextMenu(NULL),
- m_effectWidget(NULL),
- m_selectedClip(NULL),
- m_loopClipTransition(true),
+ AbstractMonitor(id, manager, parent)
+ , render(NULL)
+ , m_name(Kdenlive::noMonitor)
+ , m_currentClip(NULL)
+ , m_overlay(NULL)
+ , m_scale(1)
+ , m_length(2)
+ , m_dragStarted(false)
+ , m_loopClipAction(NULL)
+ , m_contextMenu(NULL)
+ , m_effectWidget(NULL)
+ , m_selectedClip(NULL)
+ , m_loopClipTransition(true)
#ifdef USE_OPENGL
- m_glWidget(NULL),
+ , m_glWidget(NULL)
#endif
- m_editMarker(NULL)
+ , m_editMarker(NULL)
{
QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
m_timePos = new TimecodeDisplay(m_monitorManager->timecode(), this);
m_toolbar->addWidget(m_timePos);
connect(m_timePos, SIGNAL(timeCodeEditingFinished()), this, SLOT(slotSeek()));
- m_toolbar->setMaximumHeight(s * 1.5);
+ m_toolbar->setMaximumHeight(m_timePos->height());
layout->addWidget(m_toolbar);
}
}
}
+void Monitor::setMarkers(QList <CommentedTime> markers)
+{
+ m_ruler->setMarkers(markers);
+}
+
void Monitor::slotSeekToPreviousSnap()
{
if (m_currentClip) slotSeek(getSnapForPos(true).frames(m_monitorManager->timecode().fps()));
slotActivateMonitor();
if (position == -1) position = render->seekFramePosition();
render->seek(position);
+ if (zone.isNull()) {
+ zone = m_currentClip->zone();
+ m_ruler->setZone(zone.x(), zone.y());
+ return;
+ }
}
}
if (!zone.isNull()) {
void Monitor::slotSetSelectedClip(AbstractClipItem* item)
{
if (item) {
- m_loopClipAction->setEnabled(true);
+ if (m_loopClipAction) m_loopClipAction->setEnabled(true);
m_selectedClip = item;
} else {
- m_loopClipAction->setEnabled(false);
+ if (m_loopClipAction) m_loopClipAction->setEnabled(false);
}
}