CuteLogger
Fast and simple logging solution for Qt based applications
videovectorscopewidget.h
1/*
2 * Copyright (c) 2019 Meltytech, LLC
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 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef VIDEOVECTORSCOPEWIDGET_H
19#define VIDEOVECTORSCOPEWIDGET_H
20
21#include "scopewidget.h"
22#include <QMutex>
23#include <QImage>
24
25class VideoVectorScopeWidget Q_DECL_FINAL : public ScopeWidget
26{
27 Q_OBJECT
28
29public:
30 explicit VideoVectorScopeWidget();
31 virtual ~VideoVectorScopeWidget();
32 QString getTitle() Q_DECL_OVERRIDE;
33
34private:
35 enum {
36 BLUE_75 = 0,
37 CYAN_75,
38 GREEN_75,
39 YELLOW_75,
40 RED_75,
41 MAGENTA_75,
42 BLUE_100,
43 CYAN_100,
44 GREEN_100,
45 YELLOW_100,
46 RED_100,
47 MAGENTA_100,
48 COLOR_POINT_COUNT,
49 };
50
51 // Called in scope thread
52 void refreshScope(const QSize &size, bool full) Q_DECL_OVERRIDE;
53 void drawGraticuleLines(QPainter &p, qreal lineWidth);
54 void drawSkinToneLine(QPainter &p, qreal lineWidth);
55 void drawGraticuleMark(QPainter &p, const QPoint &point, QColor color, qreal lineWidth,
56 qreal LineLength);
57
58 // Called in UI thread
59 void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
60 void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
61 QRect getCenteredSquare();
62
63 // Only accessed by the scope thread
64 SharedFrame m_frame;
65 QImage m_renderImg;
66 QImage m_graticuleImg;
67
68 // Variables accessed from multiple threads (mutex protected)
69 QMutex m_mutex;
70 QImage m_displayImg;
71 QPoint m_points[COLOR_POINT_COUNT];
72 bool m_profileChanged;
73
74private slots:
75 void profileChanged();
76};
77
78#endif // VIDEOVECTORSCOPEWIDGET_H
The ScopeWidget provides a common interface for all scopes in Shotcut.
Definition scopewidget.h:57
virtual QString getTitle()=0
virtual void refreshScope(const QSize &size, bool full)=0
The SharedFrame provides thread safe access to Mlt::Frame data.
Definition sharedframe.h:49