CuteLogger
Fast and simple logging solution for Qt based applications
audiopeakmeterscopewidget.h
1 /*
2  * Copyright (c) 2015-2017 Meltytech, LLC
3  * Author: Brian Matherly <code@brianmatherly.com>
4  *
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 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef AUDIOPEAKMETERSCOPEWIDGET_H
20 #define AUDIOPEAKMETERSCOPEWIDGET_H
21 
22 #include "scopewidget.h"
23 #include <QMutex>
24 #include <QImage>
25 #include <QVector>
26 #include <MltFilter.h>
27 
28 class AudioMeterWidget;
29 
30 class AudioPeakMeterScopeWidget Q_DECL_FINAL : public ScopeWidget
31 {
32  Q_OBJECT
33 
34 public:
35  explicit AudioPeakMeterScopeWidget();
36  ~AudioPeakMeterScopeWidget();
37  QString getTitle() Q_DECL_OVERRIDE;
38  void setOrientation(Qt::Orientation orientation) Q_DECL_OVERRIDE;
39 
40 private:
41  // Functions run in scope thread.
42  void refreshScope(const QSize& size, bool full) Q_DECL_OVERRIDE;
43 
44  // Members accessed by scope thread.
45  Mlt::Filter* m_filter;
46 
47  // Members accessed by GUI thread.
48  AudioMeterWidget* m_audioMeter;
49  Qt::Orientation m_orientation;
50  int m_channels;
51 
52 private slots:
53  void reconfigureMeter();
54 };
55 
56 #endif // AUDIOPEAKMETERSCOPEWIDGET_H
The ScopeWidget provides a common interface for all scopes in Shotcut.
Definition: scopewidget.h:57
virtual QString getTitle()=0