X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmonitor.cpp;h=e994710b89aa35b1cd9c36a5a49528b4e725ed7b;hb=811f9353acff73a0006562b7814d3b673f420763;hp=7d202c9b82c4fa14bcec7664416c6b4306fcbf2e;hpb=c52ef0665ba3abbb849b73ae405b221fec2dcc65;p=kdenlive diff --git a/src/monitor.cpp b/src/monitor.cpp index 7d202c9b..e994710b 100644 --- a/src/monitor.cpp +++ b/src/monitor.cpp @@ -155,7 +155,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget 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); } @@ -169,7 +169,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget 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); @@ -183,6 +183,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int))); if (name != "clip") { + connect(render, SIGNAL(rendererPosition(int)), this, SIGNAL(renderPosition(int))); connect(render, SIGNAL(durationChanged(int)), this, SIGNAL(durationChanged(int))); connect(m_ruler, SIGNAL(zoneChanged(QPoint)), this, SIGNAL(zoneUpdated(QPoint))); } else { @@ -229,7 +230,7 @@ const QString Monitor::name() const 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); @@ -502,9 +503,9 @@ void Monitor::mouseMoveEvent(QMouseEvent *event) 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; @@ -577,9 +578,7 @@ void Monitor::slotExtractCurrentFrame() 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(); @@ -915,7 +914,7 @@ void Monitor::slotSwitchMonitorInfo(bool show) 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())); @@ -995,7 +994,7 @@ void Monitor::slotEffectScene(bool show) 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 }