CuteLogger
Fast and simple logging solution for Qt based applications
audiovectorscopewidget.h
1/*
2 * Copyright (c) 2024 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 AUDIOVECTORSCOPEWIDGET_H
19#define AUDIOVECTORSCOPEWIDGET_H
20
21#include "scopewidget.h"
22
23#include <QMutex>
24#include <QImage>
25
26class QComboBox;
27class QLabel;
28
29class AudioVectorScopeWidget Q_DECL_FINAL : public ScopeWidget
30{
31 Q_OBJECT
32
33public:
34 explicit AudioVectorScopeWidget();
35 ~AudioVectorScopeWidget();
36 QString getTitle() Q_DECL_OVERRIDE;
37
38private:
39 // Functions run in scope thread.
40 void refreshScope(const QSize &size, bool full) Q_DECL_OVERRIDE;
41
42 // Functions run in GUI thread.
43 void setComboBoxOptions();
44 Q_INVOKABLE void onNewDisplayImage();
45
46 // Members accessed only in scope thread (no thread protection).
47 QImage m_renderImg;
48 SharedFrame m_frame;
49
50 // Members accessed only in GUI thread (no thread protection).
51 QComboBox *m_c1Combo;
52 QComboBox *m_c2Combo;
53 QLabel *m_imgLabel;
54
55 // Members accessed in multiple threads (mutex protected).
56 QMutex m_mutex;
57 QImage m_displayImg;
58 int m_c1Index;
59 int m_c2Index;
60
61};
62
63#endif // AUDIOVECTORSCOPEWIDGET_H
The ScopeWidget provides a common interface for all scopes in Shotcut.
Definition scopewidget.h:57
virtual QString getTitle()=0
The SharedFrame provides thread safe access to Mlt::Frame data.
Definition sharedframe.h:49