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 <QMouseEvent>
17 // Uncomment for debugging.
23 const int REALTIME_FPS = 30;
25 AbstractGfxScopeWidget::AbstractGfxScopeWidget(bool trackMouse, QWidget *parent) :
26 AbstractScopeWidget(trackMouse, parent)
30 AbstractGfxScopeWidget::~AbstractGfxScopeWidget() { }
32 QImage AbstractGfxScopeWidget::renderScope(uint accelerationFactor)
34 QMutexLocker lock(&m_mutex);
35 return renderGfxScope(accelerationFactor, m_scopeImage);
38 void AbstractGfxScopeWidget::mouseReleaseEvent(QMouseEvent *event)
40 AbstractScopeWidget::mouseReleaseEvent(event);
41 emit signalFrameRequest(widgetName());
48 void AbstractGfxScopeWidget::slotRenderZoneUpdated(const QImage &frame)
50 QMutexLocker lock(&m_mutex);
51 m_scopeImage = frame.rgbSwapped();
52 AbstractScopeWidget::slotRenderZoneUpdated();
55 void AbstractGfxScopeWidget::slotAutoRefreshToggled(bool autoRefresh)
58 emit signalFrameRequest(widgetName());
67 #include "abstractgfxscopewidget.moc"