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 ***************************************************************************/
17 #include "ui_vectorscope_ui.h"
23 enum PAINT_MODE { GREEN = 0, ORIG = 1, CHROMA = 2 };
25 class Vectorscope : public QWidget, public Ui::Vectorscope_UI {
29 Vectorscope(Monitor *projMonitor, Monitor *clipMonitor, QWidget *parent = 0);
33 void paintEvent(QPaintEvent *);
34 void resizeEvent(QResizeEvent *event);
35 void mousePressEvent(QMouseEvent *);
36 void mouseMoveEvent(QMouseEvent *event);
39 Monitor *m_projMonitor;
40 Monitor *m_clipMonitor;
41 Render *m_activeRender;
46 QPoint mapToCanvas(QRect inside, QPointF point);
51 void updateDimensions();
52 bool initialDimensionUpdateDone;
57 QFuture<void> m_scopeCalcThread;
58 void calculateScope();
60 /** Prods the Scope calculation thread. If it is running, do nothing. If it is not,
62 Returns true if a new thread has been started. */
63 bool prodCalcThread();
65 /** Counts the number of frames that have been rendered in one of the monitors.
66 The frame number will be reset when the vectorscope starts calculating the
71 void signalScopeCalculationFinished();
74 void slotPaintModeChanged(int index);
75 void slotMagnifyChanged();
76 void slotActiveMonitorChanged(bool isClipMonitor);
77 void slotRenderZoneUpdated();
78 void slotScopeCalculationFinished();
82 #endif // VECTORSCOPE_H