createOpenGlWidget(m_videoBox, profile);
monitorCreated = true;
//m_glWidget->setFixedSize(width, height);
-#elif defined (USE_OPEN_GL)
+#elif defined(USE_OPENGL)
if (KdenliveSettings::openglmonitors()) {
monitorCreated = createOpenGlWidget(m_videoBox, profile);
}
render = new Render(m_name, (int) m_monitorRefresh->winId(), profile, this);
m_monitorRefresh->setRenderer(render);
}
-#if defined (USE_OPEN_GL)
+#ifdef USE_OPENGL
else if (m_glWidget) {
lay->addWidget(m_glWidget);
m_videoBox->setLayout(lay);
connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
connect(render, SIGNAL(durationChanged(int)), this, SLOT(adjustRulerSize(int)));
connect(render, SIGNAL(rendererStopped(int)), this, SLOT(rendererStopped(int)));
+ connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
if (name != "clip") {
connect(render, SIGNAL(rendererPosition(int)), this, SIGNAL(renderPosition(int)));
return m_name;
}
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
bool Monitor::createOpenGlWidget(QWidget *parent, const QString profile)
{
render = new Render(m_name, 0, profile, this);
data.append(list.join(";").toUtf8());
mimeData->setData("kdenlive/clip", data);
drag->setMimeData(mimeData);
- QPixmap pix = m_currentClip->thumbnail();
+ /*QPixmap pix = m_currentClip->thumbnail();
drag->setPixmap(pix);
- drag->setHotSpot(QPoint(0, 50));
+ drag->setHotSpot(QPoint(0, 50));*/
drag->start(Qt::MoveAction);
//Qt::DropAction dropAction;
KFileDialog *fs = new KFileDialog(KUrl(), "image/png", this);
fs->setOperationMode(KFileDialog::Saving);
fs->setMode(KFile::File);
-#if KDE_IS_VERSION(4,2,0)
fs->setConfirmOverwrite(true);
-#endif
fs->setKeepLocation(true);
fs->exec();
QString path = fs->selectedFile();
void Monitor::stop()
{
- disconnect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
if (render) render->stop();
}
{
if (!isVisible()) return;
if (render) render->start();
- connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
}
void Monitor::refreshMonitor(bool visible)
render->setProducer(prod, render->seekFramePosition());
}
-void Monitor::slotSetClipProducer(DocClipBase *clip, QPoint zone, int position)
+void Monitor::slotSetClipProducer(DocClipBase *clip, QPoint zone, bool forceUpdate, int position)
{
if (render == NULL) return;
if (clip == NULL && m_currentClip != NULL) {
return;
}
- if (clip != m_currentClip) {
+ if (clip != m_currentClip || forceUpdate) {
m_currentClip = clip;
if (m_currentClip) activateMonitor();
updateMarkers(clip);
if (m_overlay) return;
if (m_monitorRefresh == NULL) {
// Using OpenGL display
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
if (m_glWidget->layout()) delete m_glWidget->layout();
m_overlay = new Overlay();
connect(m_overlay, SIGNAL(editMarker()), this, SLOT(slotEditMarker()));
if (m_monitorRefresh) {
m_monitorRefresh->setVisible(!show);
} else {
-#if defined(Q_WS_MAC) || defined(USE_OPEN_GL)
+#ifdef USE_OPENGL
m_glWidget->setVisible(!show);
#endif
}