1 /***************************************************************************
2 * Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com) *
3 * This file is part of kdenlive. See www.kdenlive.org. *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #include "abstractgfxscopewidget.h"
13 #include "monitormanager.h"
15 #include <QtConcurrentRun>
19 #include <QMouseEvent>
22 // Uncomment for debugging.
29 const int REALTIME_FPS = 30;
31 AbstractGfxScopeWidget::AbstractGfxScopeWidget(bool trackMouse, QWidget *parent) :
32 AbstractScopeWidget(trackMouse, parent)
36 AbstractGfxScopeWidget::~AbstractGfxScopeWidget() { }
38 QImage AbstractGfxScopeWidget::renderScope(uint accelerationFactor)
40 QMutexLocker lock(&m_mutex);
41 return renderGfxScope(accelerationFactor, m_scopeImage);
44 void AbstractGfxScopeWidget::mouseReleaseEvent(QMouseEvent *event)
46 AbstractScopeWidget::mouseReleaseEvent(event);
47 emit signalFrameRequest(widgetName());
54 void AbstractGfxScopeWidget::slotRenderZoneUpdated(const QImage &frame)
56 QMutexLocker lock(&m_mutex);
57 m_scopeImage = frame.rgbSwapped();
58 AbstractScopeWidget::slotRenderZoneUpdated();
61 void AbstractGfxScopeWidget::slotAutoRefreshToggled(bool autoRefresh)
64 emit signalFrameRequest(widgetName());
73 #include "abstractgfxscopewidget.moc"