]> git.sesse.net Git - kdenlive/blob - src/vectorscope.h
* Vectorscope added
[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 *render, QWidget *parent = 0);
26     ~Vectorscope();
27
28 protected:
29     void paintEvent(QPaintEvent *);
30     void mousePressEvent(QMouseEvent *);
31
32 private:
33     Render *m_render;
34     int iPaintMode;
35     float scaling;
36     QPoint mapToCanvas(QRect inside, QPointF point);
37
38 private slots:
39     void slotPaintModeChanged(int index);
40     void slotMagnifyChanged();
41
42 };
43
44 #endif // VECTORSCOPE_H