]> git.sesse.net Git - kdenlive/blob - src/vectorscope.h
d9a2922d2abebdacd4d09e076d9f2568be0c25f1
[kdenlive] / src / vectorscope.h
1 /***************************************************************************
2  *   Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com)      *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  ***************************************************************************/
9
10 #ifndef VECTORSCOPE_H
11 #define VECTORSCOPE_H
12
13 #include "renderer.h"
14 #include "ui_vectorscope_ui.h"
15
16 class Render;
17 class Vectorscope_UI;
18
19 enum PAINT_MODE { GREEN = 0, ORIG = 1, CHROMA = 2 };
20
21 class Vectorscope : public QWidget, public Ui::Vectorscope_UI {
22     Q_OBJECT
23
24 public:
25     Vectorscope(Render *projRender, Render *clipRender, QWidget *parent = 0);
26     ~Vectorscope();
27
28 protected:
29     void paintEvent(QPaintEvent *);
30     void mousePressEvent(QMouseEvent *);
31     void mouseMoveEvent(QMouseEvent *event);
32
33 private:
34     Render *m_projRender;
35     Render *m_clipRender;
36     Render *m_activeRender;
37     QImage m_scope;
38     int iPaintMode;
39     float scaling;
40     QPoint mapToCanvas(QRect inside, QPointF point);
41
42     bool circleOnly;
43     QPoint mousePos;
44
45 private slots:
46     void slotPaintModeChanged(int index);
47     void slotMagnifyChanged();
48     void slotActiveMonitorChanged(bool isClipMonitor);
49
50 };
51
52 #endif // VECTORSCOPE_H