Commit c1ff434e authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Switch from QQuickView to QQuickWidget - fixes broken playback on Mac OS

parent 185e9b9d
Pipeline #157969 passed with stage
in 8 minutes and 33 seconds
......@@ -320,7 +320,6 @@ void MainWindow::init(const QString &mltPath)
});
installEventFilter(this);
pCore->monitorManager()->initMonitors(m_clipMonitor, m_projectMonitor);
connect(m_clipMonitor, &Monitor::addMasterEffect, pCore->bin(), &Bin::slotAddEffect);
m_timelineTabs = new TimelineTabs(this);
ctnLay->addWidget(m_timelineTabs);
......
......@@ -56,8 +56,8 @@
using namespace Mlt;
GLWidget::GLWidget(int id, QObject *parent)
: QQuickView(static_cast<QWindow *>(parent))
GLWidget::GLWidget(int id, QWidget *parent)
: QQuickWidget(parent)
, sendFrameForAnalysis(false)
, m_glslManager(nullptr)
, m_consumer(nullptr)
......@@ -102,6 +102,7 @@ GLWidget::GLWidget(int id, QObject *parent)
m_texture[0] = m_texture[1] = m_texture[2] = 0;
qRegisterMetaType<Mlt::Frame>("Mlt::Frame");
qRegisterMetaType<SharedFrame>("SharedFrame");
setAcceptDrops(true);
if (m_id == Kdenlive::ClipMonitor && !(KdenliveSettings::displayClipMonitorInfo() & 0x01)) {
m_rulerHeight = 0;
......@@ -110,10 +111,10 @@ GLWidget::GLWidget(int id, QObject *parent)
}
m_displayRulerHeight = m_rulerHeight;
setPersistentOpenGLContext(true);
setPersistentSceneGraph(true);
setClearBeforeRendering(false);
setResizeMode(QQuickView::SizeRootObjectToView);
quickWindow()->setPersistentOpenGLContext(true);
quickWindow()->setPersistentSceneGraph(true);
quickWindow()->setClearBeforeRendering(false);
setResizeMode(QQuickWidget::SizeRootObjectToView);
auto fmt = QOpenGLContext::globalShareContext()->format();
fmt.setDepthBufferSize(format().depthBufferSize());
fmt.setStencilBufferSize(format().stencilBufferSize());
......@@ -132,8 +133,8 @@ GLWidget::GLWidget(int id, QObject *parent)
disableGPUAccel();
}
connect(this, &QQuickWindow::sceneGraphInitialized, this, &GLWidget::initializeGL, Qt::DirectConnection);
connect(this, &QQuickWindow::beforeRendering, this, &GLWidget::paintGL, Qt::DirectConnection);
connect(quickWindow(), &QQuickWindow::sceneGraphInitialized, this, &GLWidget::initializeGL, Qt::DirectConnection);
connect(quickWindow(), &QQuickWindow::beforeRendering, this, &GLWidget::paintGL, Qt::DirectConnection);
//connect(pCore.get(), &Core::updateMonitorProfile, this, &GLWidget::reloadProfile);
registerTimelineItems();
......@@ -178,7 +179,7 @@ void GLWidget::initializeGL()
{
if (m_isInitialized) return;
openglContext()->makeCurrent(&m_offscreenSurface);
quickWindow()->openglContext()->makeCurrent(&m_offscreenSurface);
initializeOpenGLFunctions();
// C & D
......@@ -189,6 +190,7 @@ void GLWidget::initializeGL()
createShader();
m_openGLSync = initGPUAccelSync();
quickWindow()->openglContext()->doneCurrent();
// C & D
if (m_glslManager) {
......@@ -198,19 +200,19 @@ void GLWidget::initializeGL()
// See this Qt bug for more info: https://bugreports.qt.io/browse/QTBUG-44677
// TODO: QTBUG-44677 is closed. still applicable?
m_shareContext = new QOpenGLContext;
m_shareContext->setFormat(openglContext()->format());
m_shareContext->setShareContext(openglContext());
m_shareContext->setFormat(quickWindow()->openglContext()->format());
m_shareContext->setShareContext(quickWindow()->openglContext());
m_shareContext->create();
}
m_frameRenderer = new FrameRenderer(openglContext(), &m_offscreenSurface, m_ClientWaitSync);
m_frameRenderer = new FrameRenderer(quickWindow()->openglContext(), &m_offscreenSurface, m_ClientWaitSync);
m_frameRenderer->sendAudioForAnalysis = KdenliveSettings::monitor_audio();
openglContext()->makeCurrent(this);
connect(m_frameRenderer, &FrameRenderer::textureReady, this, &GLWidget::updateTexture, Qt::DirectConnection);
quickWindow()->openglContext()->makeCurrent(quickWindow());
connect(m_frameRenderer, &FrameRenderer::frameDisplayed, this, &GLWidget::onFrameDisplayed, Qt::QueuedConnection);
connect(m_frameRenderer, &FrameRenderer::frameDisplayed, this, &GLWidget::frameDisplayed, Qt::QueuedConnection);
connect(m_frameRenderer, &FrameRenderer::textureReady, this, &GLWidget::updateTexture, Qt::DirectConnection);
m_initSem.release();
m_isInitialized = true;
QMetaObject::invokeMethod(this, "reconfigure", Qt::QueuedConnection);
......@@ -257,8 +259,8 @@ void GLWidget::resizeGL(int width, int height)
void GLWidget::resizeEvent(QResizeEvent *event)
{
QQuickWidget::resizeEvent(event);
resizeGL(event->size().width(), event->size().height());
QQuickView::resizeEvent(event);
}
void GLWidget::createGPUAccelFragmentProg()
......@@ -391,7 +393,7 @@ static void uploadTextures(QOpenGLContext *context, const SharedFrame &frame, GL
void GLWidget::clear()
{
stopGlsl();
update();
quickWindow()->update();
}
void GLWidget::releaseAnalyse()
......@@ -402,12 +404,12 @@ void GLWidget::releaseAnalyse()
bool GLWidget::acquireSharedFrameTextures()
{
// A
if ((m_glslManager == nullptr) && !openglContext()->supportsThreadedOpenGL()) {
if ((m_glslManager == nullptr) && !quickWindow()->openglContext()->supportsThreadedOpenGL()) {
QMutexLocker locker(&m_contextSharedAccess);
if (!m_sharedFrame.is_valid()) {
return false;
}
uploadTextures(openglContext(), m_sharedFrame, m_texture);
uploadTextures(quickWindow()->openglContext(), m_sharedFrame, m_texture);
} else if (m_glslManager) {
// C & D
m_contextSharedAccess.lock();
......@@ -472,7 +474,7 @@ void GLWidget::disableGPUAccel()
bool GLWidget::onlyGLESGPUAccel() const
{
return (m_glslManager != nullptr) && openglContext()->isOpenGLES();
return (m_glslManager != nullptr) && quickWindow()->openglContext()->isOpenGLES();
}
#if defined(Q_OS_WIN)
......@@ -487,9 +489,9 @@ bool GLWidget::initGPUAccelSync()
{
if (!KdenliveSettings::gpu_accel()) return false;
if (m_glslManager == nullptr) return false;
if (!openglContext()->hasExtension("GL_ARB_sync")) return false;
if (!quickWindow()->openglContext()->hasExtension("GL_ARB_sync")) return false;
m_ClientWaitSync = ClientWaitSync_fp(openglContext()->getProcAddress("glClientWaitSync"));
m_ClientWaitSync = ClientWaitSync_fp(quickWindow()->openglContext()->getProcAddress("glClientWaitSync"));
if (m_ClientWaitSync) {
return true;
} else {
......@@ -504,7 +506,7 @@ bool GLWidget::initGPUAccelSync()
void GLWidget::paintGL()
{
QOpenGLFunctions *f = openglContext()->functions();
QOpenGLFunctions *f = quickWindow()->openglContext()->functions();
float width = float(this->width() * devicePixelRatio());
float height = float(this->height() * devicePixelRatio());
......@@ -731,9 +733,11 @@ void GLWidget::mousePressEvent(QMouseEvent *event)
if ((rootObject() != nullptr) && rootObject()->property("captureRightClick").toBool() && !(event->modifiers() & Qt::ControlModifier) &&
!(event->buttons() & Qt::MiddleButton)) {
event->ignore();
QQuickView::mousePressEvent(event);
QQuickWidget::mousePressEvent(event);
return;
}
QQuickWidget::mousePressEvent(event);
event->accept();
if ((event->button() & Qt::LeftButton) != 0u) {
if ((event->modifiers() & Qt::ControlModifier) != 0u) {
// Pan view
......@@ -748,8 +752,6 @@ void GLWidget::mousePressEvent(QMouseEvent *event)
m_panStart = event->pos();
setCursor(Qt::ClosedHandCursor);
}
QQuickView::mousePressEvent(event);
event->accept();
}
void GLWidget::mouseMoveEvent(QMouseEvent *event)
......@@ -757,34 +759,32 @@ void GLWidget::mouseMoveEvent(QMouseEvent *event)
if ((rootObject() != nullptr) && rootObject()->objectName() != QLatin1String("root") && !(event->modifiers() & Qt::ControlModifier) &&
!(event->buttons() & Qt::MiddleButton)) {
event->ignore();
QQuickView::mouseMoveEvent(event);
QQuickWidget::mouseMoveEvent(event);
return;
}
/* if (event->modifiers() == Qt::ShiftModifier && m_producer) {
emit seekTo(m_producer->get_length() * event->x() / width());
QQuickWidget::mouseMoveEvent(event);
if (!(event->buttons() & Qt::LeftButton)) {
event->accept();
return;
}*/
QQuickView::mouseMoveEvent(event);
}
if (!m_panStart.isNull()) {
emit panView(m_panStart - event->pos());
m_panStart = event->pos();
event->accept();
QQuickView::mouseMoveEvent(event);
return;
}
if (!(event->buttons() & Qt::LeftButton)) {
QQuickView::mouseMoveEvent(event);
return;
}
if (!event->isAccepted() && !m_dragStart.isNull() && (event->pos() - m_dragStart).manhattanLength() >= QApplication::startDragDistance()) {
m_dragStart = QPoint();
emit startDrag();
}
event->accept();
}
void GLWidget::keyPressEvent(QKeyEvent *event)
{
QQuickView::keyPressEvent(event);
QQuickWidget::keyPressEvent(event);
if (!event->isAccepted()) {
emit passKeyEvent(event);
}
......@@ -1292,7 +1292,7 @@ void GLWidget::setZoom(float zoom)
double scaley = rootObject()->property("scaley").toDouble() * zoomRatio;
rootObject()->setProperty("scaley", scaley);
}
update();
quickWindow()->update();
}
void GLWidget::onFrameDisplayed(const SharedFrame &frame)
......@@ -1301,18 +1301,24 @@ void GLWidget::onFrameDisplayed(const SharedFrame &frame)
m_sharedFrame = frame;
m_sendFrame = sendFrameForAnalysis;
m_contextSharedAccess.unlock();
update();
quickWindow()->update();
}
void GLWidget::mouseReleaseEvent(QMouseEvent *event)
{
QQuickView::mouseReleaseEvent(event);
if (m_dragStart.isNull() && m_panStart.isNull() && (rootObject() != nullptr) && rootObject()->objectName() != QLatin1String("root") &&
QQuickWidget::mouseReleaseEvent(event);
/*if (m_dragStart.isNull() && m_panStart.isNull() && (rootObject() != nullptr) && rootObject()->objectName() != QLatin1String("root") &&
!(event->modifiers() & Qt::ControlModifier)) {
event->ignore();
event->accept();
qDebug()<<"::::::: MOUSE RELEASED B IGNORED";
return;
}*/
if ((event->modifiers() & Qt::ControlModifier)) {
event->accept();
return;
}
if (!m_dragStart.isNull() && m_panStart.isNull() && ((event->button() & Qt::LeftButton) != 0u) && !event->isAccepted()) {
event->accept();
emit monitorPlay();
}
m_dragStart = QPoint();
......@@ -1331,7 +1337,7 @@ void GLWidget::purgeCache()
void GLWidget::mouseDoubleClickEvent(QMouseEvent *event)
{
QQuickView::mouseDoubleClickEvent(event);
QQuickWidget::mouseDoubleClickEvent(event);
if (event->isAccepted()) {
return;
}
......@@ -1344,11 +1350,10 @@ void GLWidget::mouseDoubleClickEvent(QMouseEvent *event)
void GLWidget::setOffsetX(int x, int max)
{
m_offset.setX(x);
emit offsetChanged();
if (rootObject()) {
rootObject()->setProperty("offsetx", m_zoom > 1.0f ? x - max / 2.0f + 10 * m_zoom : 0);
}
update();
quickWindow()->update();
}
void GLWidget::setOffsetY(int y, int max)
......@@ -1357,7 +1362,7 @@ void GLWidget::setOffsetY(int y, int max)
if (rootObject()) {
rootObject()->setProperty("offsety", m_zoom > 1.0f ? y - max / 2.0f + 10 * m_zoom : 0);
}
update();
quickWindow()->update();
}
std::shared_ptr<Mlt::Consumer> GLWidget::consumer()
......
......@@ -15,7 +15,7 @@
#include <QOpenGLFramebufferObject>
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QQuickView>
#include <QQuickWidget>
#include <QRect>
#include <QSemaphore>
#include <QThread>
......@@ -52,12 +52,11 @@ using thread_function_t = void *(*)(void *);
* C. RGB gl texture multithreaded w/ GPU filter acceleration and no sync
* D. RGB gl texture multithreaded w/ GPU filter acceleration and sync
*/
class GLWidget : public QQuickView, protected QOpenGLFunctions
class GLWidget : public QQuickWidget, protected QOpenGLFunctions
{
Q_OBJECT
Q_PROPERTY(QRect rect READ rect NOTIFY rectChanged)
Q_PROPERTY(float zoom READ zoom NOTIFY zoomChanged)
Q_PROPERTY(QPoint offset READ offset NOTIFY offsetChanged)
public:
friend class MonitorController;
......@@ -65,7 +64,7 @@ public:
friend class MonitorProxy;
using ClientWaitSync_fp = GLenum (*)(GLsync, GLbitfield, GLuint64);
GLWidget(int id, QObject *parent = nullptr);
GLWidget(int id, QWidget *parent = nullptr);
~GLWidget() override;
int requestedSeekPosition;
......@@ -170,7 +169,6 @@ signals:
void playing();
void rectChanged();
void zoomChanged(float zoomRatio);
void offsetChanged();
void monitorPlay();
void switchFullScreen(bool minimizeOnly = false);
void mouseSeek(int eventDelta, uint modifiers);
......
......@@ -59,56 +59,6 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <utility>
#define SEEK_INACTIVE (-1)
QuickEventEater::QuickEventEater(QObject *parent)
: QObject(parent)
{
}
bool QuickEventEater::eventFilter(QObject *obj, QEvent *event)
{
switch (event->type()) {
case QEvent::DragEnter: {
auto *ev = reinterpret_cast<QDragEnterEvent *>(event);
if (ev->mimeData()->hasFormat(QStringLiteral("kdenlive/effect"))) {
ev->acceptProposedAction();
return true;
}
break;
}
case QEvent::DragMove: {
auto *ev = reinterpret_cast<QDragEnterEvent *>(event);
if (ev->mimeData()->hasFormat(QStringLiteral("kdenlive/effect"))) {
ev->acceptProposedAction();
return true;
}
break;
}
case QEvent::Drop: {
auto *ev = static_cast<QDropEvent *>(event);
if (ev) {
QStringList effectData;
effectData << QString::fromUtf8(ev->mimeData()->data(QStringLiteral("kdenlive/effect")));
QStringList source = QString::fromUtf8(ev->mimeData()->data(QStringLiteral("kdenlive/effectsource"))).split(QLatin1Char('-'));
effectData << source;
emit addEffect(effectData);
ev->accept();
return true;
}
break;
}
if (event->type() == QEvent::KeyPress) {
auto *ev = static_cast<QKeyEvent *>(event);
if (ev) {
emit doKeyPressEvent(ev);
return true;
}
}
default:
break;
}
return QObject::eventFilter(obj, event);
}
VolumeAction::VolumeAction(QObject *parent)
: QWidgetAction(parent)
{
......@@ -169,24 +119,18 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
// Create container widget
m_glWidget = new QWidget;
m_glWidget = new QWidget(this);
m_glWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
auto *glayout = new QGridLayout(m_glWidget);
glayout->setSpacing(0);
glayout->setContentsMargins(0, 0, 0, 0);
// Create QML OpenGL widget
m_glMonitor = new GLWidget(id);
m_glMonitor = new GLWidget(id, this);
connect(m_glMonitor, &GLWidget::passKeyEvent, this, &Monitor::doKeyPressEvent);
connect(m_glMonitor, &GLWidget::panView, this, &Monitor::panView);
connect(m_glMonitor->getControllerProxy(), &MonitorProxy::requestSeek, this, &Monitor::processSeek, Qt::DirectConnection);
connect(m_glMonitor->getControllerProxy(), &MonitorProxy::positionChanged, this, &Monitor::slotSeekPosition);
m_videoWidget = QWidget::createWindowContainer(qobject_cast<QWindow *>(m_glMonitor));
m_videoWidget->setAcceptDrops(true);
auto *leventEater = new QuickEventEater(this);
m_videoWidget->installEventFilter(leventEater);
connect(leventEater, &QuickEventEater::addEffect, this, &Monitor::slotAddEffect);
connect(leventEater, &QuickEventEater::doKeyPressEvent, this, &Monitor::doKeyPressEvent);
connect(m_glMonitor->getControllerProxy(), &MonitorProxy::addTimelineEffect, this, &Monitor::addTimelineEffect);
m_qmlManager = new QmlManager(m_glMonitor);
connect(m_qmlManager, &QmlManager::effectChanged, this, &Monitor::effectChanged);
......@@ -195,7 +139,7 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
emit activateTrack(ix, false);
});
glayout->addWidget(m_videoWidget, 0, 0);
glayout->addWidget(m_glMonitor, 0, 0);
m_verticalScroll = new QScrollBar(Qt::Vertical);
glayout->addWidget(m_verticalScroll, 0, 1);
m_verticalScroll->hide();
......@@ -206,7 +150,6 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
connect(m_verticalScroll, &QAbstractSlider::valueChanged, this, &Monitor::setOffsetY);
connect(m_glMonitor, &GLWidget::frameDisplayed, this, &Monitor::onFrameDisplayed, Qt::DirectConnection);
connect(m_glMonitor, &GLWidget::mouseSeek, this, &Monitor::slotMouseSeek);
connect(m_glMonitor, &GLWidget::startDrag, this, &Monitor::slotStartDrag);
connect(m_glMonitor, &GLWidget::switchFullScreen, this, &Monitor::slotSwitchFullScreen);
connect(m_glMonitor, &GLWidget::zoomChanged, this, &Monitor::setZoom);
connect(m_glMonitor, SIGNAL(lockMonitor(bool)), this, SLOT(slotLockMonitor(bool)), Qt::DirectConnection);
......@@ -279,6 +222,7 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
m_recManager = new RecManager(this);
connect(m_recManager, &RecManager::warningMessage, this, &Monitor::warningMessage);
connect(m_recManager, &RecManager::addClipToProject, this, &Monitor::addClipToProject);
connect(m_glMonitor, &GLWidget::startDrag, this, &Monitor::slotStartDrag);
// Show timeline clip usage
connect(pCore.get(), &Core::clipInstanceResized, this, [this](const QString &binId) {
if (m_controller && activeClipId() == binId) {
......@@ -540,7 +484,6 @@ Monitor::~Monitor()
{
delete m_audioMeterWidget;
delete m_glMonitor;
delete m_videoWidget;
delete m_glWidget;
delete m_timePos;
}
......@@ -568,17 +511,6 @@ void Monitor::slotGetCurrentImage(bool request)
}
}
void Monitor::slotAddEffect(const QStringList &effect)
{
if (m_id == Kdenlive::ClipMonitor) {
if (m_controller) {
emit addMasterEffect(m_controller->AbstractProjectItem::clipId(), effect);
}
} else {
emit addEffect(effect);
}
}
void Monitor::refreshIcons()
{
QList<QAction *> allMenus = this->findChildren<QAction *>();
......@@ -740,14 +672,14 @@ void Monitor::slotForceSize(QAction *a)
// resize full size
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
profileHeight += m_glMonitor->m_displayRulerHeight;
m_videoWidget->setMinimumSize(profileWidth, profileHeight);
m_videoWidget->setMaximumSize(profileWidth, profileHeight);
m_glMonitor->setMinimumSize(profileWidth, profileHeight);
m_glMonitor->setMaximumSize(profileWidth, profileHeight);
setMinimumSize(QSize(profileWidth, profileHeight + m_toolbar->height()));
break;
default:
// Free resize
m_videoWidget->setMinimumSize(profileWidth, profileHeight);
m_videoWidget->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
m_glMonitor->setMinimumSize(profileWidth, profileHeight);
m_glMonitor->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
setMinimumSize(QSize(profileWidth, profileHeight + m_toolbar->height() + m_glMonitor->getControllerProxy()->rulerHeight()));
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
break;
......@@ -1017,7 +949,7 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
m_glWidget->setParent(nullptr);
}
m_glWidget->showFullScreen();
m_videoWidget->setFocus();
setFocus();
} else {
m_glWidget->showNormal();
auto *lay = static_cast<QVBoxLayout *>(layout());
......@@ -1028,7 +960,7 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
void Monitor::fixFocus()
{
m_videoWidget->setFocus();
setFocus();
}
// virtual
......@@ -1075,60 +1007,10 @@ void Monitor::slotStartDrag()
mimeData->setData(QStringLiteral("kdenlive/producerslist"), prodData);
mimeData->setData(QStringLiteral("kdenlive/dragid"), QUuid::createUuid().toByteArray());
drag->setMimeData(mimeData);
drag->exec(Qt::MoveAction);
drag->exec(Qt::CopyAction);
emit pCore->bin()->processDragEnd();
}
// virtual
void Monitor::mouseMoveEvent(QMouseEvent *event)
{
if (m_dragStarted || m_controller == nullptr) {
return;
}
if ((event->pos() - m_DragStartPosition).manhattanLength() < QApplication::startDragDistance()) {
return;
}
{
auto *drag = new QDrag(this);
auto *mimeData = new QMimeData;
m_dragStarted = true;
QStringList list;
list.append(m_controller->AbstractProjectItem::clipId());
QPoint p = m_glMonitor->getControllerProxy()->zone();
list.append(QString::number(p.x()));
list.append(QString::number(p.y()));
QByteArray clipData;
clipData.append(list.join(QLatin1Char(';')).toUtf8());
mimeData->setData(QStringLiteral("kdenlive/clip"), clipData);
drag->setMimeData(mimeData);
drag->exec(Qt::MoveAction);
}
event->accept();
}
/*void Monitor::dragMoveEvent(QDragMoveEvent * event) {
event->setDropAction(Qt::IgnoreAction);
event->setDropAction(Qt::MoveAction);
if (event->mimeData()->hasText()) {
event->acceptProposedAction();
}
}
Qt::DropActions Monitor::supportedDropActions() const {
// returns what actions are supported when dropping
return Qt::MoveAction;
}*/
QStringList Monitor::mimeTypes() const
{
QStringList qstrList;
// list of accepted MIME types for drop
qstrList.append(QStringLiteral("kdenlive/clip"));
return qstrList;
}
// virtual
void Monitor::wheelEvent(QWheelEvent *event)
{
......
......@@ -43,20 +43,6 @@ class Profile;
class Filter;
} // namespace Mlt
class QuickEventEater : public QObject
{
Q_OBJECT
public:
explicit QuickEventEater(QObject *parent = nullptr);
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
signals:
void addEffect(const QStringList &);
void doKeyPressEvent(QKeyEvent *);
};
class VolumeAction : public QWidgetAction
{
Q_OBJECT
......@@ -172,8 +158,6 @@ protected:
* opposite on mouse wheel up/forward.
* Ctrl + wheel moves by a second, without Ctrl it moves by a single frame. */
void wheelEvent(QWheelEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
virtual QStringList mimeTypes() const;
void updateBgColor();
private:
......@@ -186,8 +170,6 @@ private:
QScrollBar *m_verticalScroll;
/** @brief Scrollbar for our monitor view, used when zooming the monitor **/
QScrollBar *m_horizontalScroll;
/** @brief Widget holding the window for the QQuickView **/
QWidget *m_videoWidget;
/** @brief Manager for qml overlay for the QQuickView **/
QmlManager *m_qmlManager;
std::shared_ptr<SnapModel> m_snaps;
......@@ -263,7 +245,6 @@ private slots:
/** @brief Display a non blocking error message to user **/
void warningMessage(const QString &text, int timeout = 5000, const QList<QAction *> &actions = QList<QAction *>());
void slotLockMonitor(bool lock);
void slotAddEffect(const QStringList &effect);
void slotSwitchPlay();
void slotEditInlineMarker();
/** @brief Pass keypress event to mainwindow */
......@@ -379,8 +360,7 @@ signals:
void addClipToProject(const QUrl &);
/** @brief Request display of current bin clip. */
void refreshCurrentClip();
void addEffect(const QStringList &);
void addMasterEffect(QString, const QStringList &);
void addTimelineEffect(const QStringList &);
void passKeyPress(QKeyEvent *);
/** @brief Enable / disable project monitor multitrack view (split view with one track in each quarter). */
void multitrackView(bool, bool);
......