]> git.sesse.net Git - kdenlive/blobdiff - src/scopes/audioscopes/audiospectrum.cpp
Fix includes
[kdenlive] / src / scopes / audioscopes / audiospectrum.cpp
index a4ee112ef1cadfc5e2beb170780142c25b0105c1..63b477a3579670d5200cb1a93dd9c4dd84ef686b 100644 (file)
@@ -14,9 +14,8 @@
 #include "lib/audio/fftTools.h"
 #include "lib/external/kiss_fft/tools/kiss_fftr.h"
 
-#include <QMenu>
 #include <QPainter>
-#include <QMouseEvent>
+#include <QMenu>
 
 #include <iostream>
 
 
 AudioSpectrum::AudioSpectrum(QWidget *parent) :
     AbstractAudioScopeWidget(true, parent)
-    , m_fftTools()
-    , m_lastFFT()
-    , m_lastFFTLock(1)
-    , m_peaks()
+  , m_fftTools()
+  , m_lastFFT()
+  , m_lastFFTLock(1)
+  , m_peaks()
   #ifdef DEBUG_AUDIOSPEC
-    , m_timeTotal(0)
-    , m_showTotal(0)
+  , m_timeTotal(0)
+  , m_showTotal(0)
   #endif
-    , m_dBmin(-70)
-    , m_dBmax(0)
-    , m_freqMax(0)
-    , m_customFreq(false)
-    ,colorizeFactor(0)
+  , m_dBmin(-70)
+  , m_dBmax(0)
+  , m_freqMax(0)
+  , m_customFreq(false)
+  ,colorizeFactor(0)
 {
     ui = new Ui::AudioSpectrum_UI;
     ui->setupUi(this);
@@ -181,7 +180,7 @@ QImage AudioSpectrum::renderAudioScope(uint, const QVector<int16_t> &audioFrame,
     if (
             audioFrame.size() > 63
             && m_innerScopeRect.width() > 0 && m_innerScopeRect.height() > 0    // <= 0 if widget is too small (resized by user)
-    ) {
+            ) {
         if (!m_customFreq) {
             m_freqMax = freq / 2;
         }
@@ -503,21 +502,21 @@ QImage AudioSpectrum::renderHUD(uint)
 QRect AudioSpectrum::scopeRect()
 {
     m_scopeRect = QRect(
-            QPoint(
+                QPoint(
                     10,                                     // Left
                     ui->verticalSpacer->geometry().top()+6  // Top
-            ),
-            AbstractAudioScopeWidget::rect().bottomRight()
-    );
+                    ),
+                AbstractAudioScopeWidget::rect().bottomRight()
+                );
     m_innerScopeRect = QRect(
-            QPoint(
+                QPoint(
                     m_scopeRect.left()+6,                   // Left
                     m_scopeRect.top()+6                     // Top
-            ), QPoint(
+                    ), QPoint(
                     ui->verticalSpacer->geometry().right()-70,
                     ui->verticalSpacer->geometry().bottom()-40
-            )
-    );
+                    )
+                );
     return m_scopeRect;
 }