[vlmc-devel] Removed Redundant AudioSpectrumDrawer class
Barun Parruck
git at videolan.org
Tue Mar 1 20:58:53 CET 2016
vlmc | branch: master | Barun Parruck <barun.parruck at gmail.com> | Wed Mar 2 00:35:58 2016 +0530| [0bc3e1e5ee2b3b7dc2f0afcce6d9d0790a86701f] | committer: Hugo Beauzée-Luyssen
Removed Redundant AudioSpectrumDrawer class
The AudioSpectrumDrawe class had not been touched in years, and was throwing compiler warnings, so it was removed from the main code base.
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/0bc3e1e5ee2b3b7dc2f0afcce6d9d0790a86701f
---
src/CMakeLists.txt | 1 -
src/Gui/AudioSpectrumDrawer.cpp | 50 -----------------------------------------
src/Gui/AudioSpectrumDrawer.h | 44 ------------------------------------
3 files changed, 95 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 29fd0fb..26150e2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -106,7 +106,6 @@ ELSE(NOT WITH_GUI)
LIST( APPEND VLMC_SRCS
Commands/KeyboardShortcutHelper.cpp
Gui/About.cpp
- Gui/AudioSpectrumDrawer.cpp
Gui/ClipProperty.cpp
Gui/IntroDialog.cpp
Gui/LanguageHelper.cpp
diff --git a/src/Gui/AudioSpectrumDrawer.cpp b/src/Gui/AudioSpectrumDrawer.cpp
deleted file mode 100644
index 72d5d1c..0000000
--- a/src/Gui/AudioSpectrumDrawer.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * AudioSpectrumDrawer.cpp: Audio Spectrum Drawing Widget
- *****************************************************************************
- * Copyright (C) 2008-2014 VideoLAN
- *
- * Authors: Geoffroy Lacarriere <geoffroylaca at gmail.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#include "AudioSpectrumDrawer.h"
-
-AudioSpectrumDrawer::AudioSpectrumDrawer( QPainter* painter, int height, int width, QList<int>* audioValueList )
- : m_painter( painter ), m_height( height ), m_width( width ), m_audioValueList( audioValueList )
-{
- m_painter->setRenderHint( QPainter::Antialiasing, true );
- m_painter->setPen( QPen( QColor( 79, 106, 25 ), 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin ) );
-}
-
-void
-AudioSpectrumDrawer::run()
-{
- qreal max = 0;
- for( int i = 0; i < m_audioValueList->count(); i++ )
- if ( m_audioValueList->at(i) > max )
- max = m_audioValueList->at(i);
-
- for( int x = 0; x < m_audioValueList->count(); x++ )
- {
- if ( x <= m_height )
- {
- qreal y = ( (qreal)m_audioValueList->at(x) / max ) * 500;
- y -= 365;
- m_path.lineTo( x, y );
- }
- }
- m_painter->drawPath( m_path );
-}
diff --git a/src/Gui/AudioSpectrumDrawer.h b/src/Gui/AudioSpectrumDrawer.h
deleted file mode 100644
index 9cb4ead..0000000
--- a/src/Gui/AudioSpectrumDrawer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * AudioSpectrumDrawer.h: Audio Spectrum Drawing Widget
- *****************************************************************************
- * Copyright (C) 2008-2014 VideoLAN
- *
- * Authors: Geoffroy Lacarriere <geoffroylaca at gmail.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef AUDIOSPECTRUMDRAWER_H
-#define AUDIOSPECTRUMDRAWER_H
-
-#include <QList>
-#include <QPainter>
-#include <QRunnable>
-
-class AudioSpectrumDrawer : public QRunnable
-{
- public:
- AudioSpectrumDrawer( QPainter* painter, int height, int width, QList<int>* audioValueList );
- void run();
-
- private:
- QPainter* m_painter;
- int m_height;
- int m_width;
- QList<int>* m_audioValueList;
- QPainterPath m_path;
-};
-
-#endif // AUDIOSPECTRUMDRAWER_H
More information about the Vlmc-devel
mailing list